Main Page   Packages   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

ViewerTabbedPane.java

00001 package edu.ksu.cis.bandera.pdgslicer.dependency;
00002 
00003 import javax.swing.*;
00004 import java.awt.*;
00005 /**
00006  * Insert the type's description here.
00007  * Creation date: (00-11-30 15:08:45)
00008  * @author: 
00009  */
00010 public class ViewerTabbedPane extends JTabbedPane implements javax.swing.event.ChangeListener {
00011     static final int CRITERION =0;
00012     static final int QUERY = 1;
00013     static final int JIMPLE = 2;
00014     private boolean firstClickTab = true;
00015     private CriterionViewer ivjCriterionViewer = null;
00016     private JimpleViewer ivjJimpleViewer = null;
00017     private QueryPanel ivjQueryPanel = null;
00018 
00019 class IvjEventHandler implements javax.swing.event.ChangeListener {
00020         public void stateChanged(javax.swing.event.ChangeEvent e) {
00021             if (e.getSource() == ViewerTabbedPane.this) 
00022                 connEtoC1();
00023         };
00024     };
00025     IvjEventHandler ivjEventHandler = new IvjEventHandler();
00026 /**
00027  * ViewerTabbedPane constructor comment.
00028  */
00029 public ViewerTabbedPane() {
00030     super();
00031     initialize();
00032 }
00033 /**
00034  * ViewerTabbedPane constructor comment.
00035  * @param tabPlacement int
00036  */
00037 public ViewerTabbedPane(int tabPlacement) {
00038     super(tabPlacement);
00039 }
00040 /**
00041  * connEtoC1:  (ViewerTabbedPane.change. --> ViewerTabbedPane.viewerTabbedPane_ChangeEvents()V)
00042  */
00043 /* WARNING: THIS METHOD WILL BE REGENERATED. */
00044 private void connEtoC1() {
00045     try {
00046         // user code begin {1}
00047         // user code end
00048         this.viewerTabbedPane_ChangeEvents();
00049         // user code begin {2}
00050         // user code end
00051     } catch (java.lang.Throwable ivjExc) {
00052         // user code begin {3}
00053         // user code end
00054         handleException(ivjExc);
00055     }
00056 }
00057 /**
00058  * Insert the method's description here.
00059  * Creation date: (00-12-1 15:03:39)
00060  * @return java.awt.Component
00061  * @param x int
00062  * @param y int
00063  */
00064 public Component findComponentAt(int x, int y) {
00065     if (!contains(x, y)) {
00066         return null;
00067     }
00068     //int ncomponents = this.ncomponents;
00069     //Component component[] = this.component;
00070     Component component[] = this.getComponents();
00071     int ncomponents = component.length;
00072     for (int i = 0; i < ncomponents; i++) {
00073         Component comp = component[i];
00074         if (comp != null) {
00075             if (comp instanceof Container) {
00076                 if (comp.isVisible()) {
00077                     int compx = (int) comp.getLocation().getX();
00078                     int compy = (int) comp.getLocation().getY();
00079                     comp = ((Container) comp).findComponentAt(x - compx, y - compy);
00080                 } else
00081                     continue;
00082             } else {
00083                 int compx = (int) comp.getLocation().getX();
00084                 int compy = (int) comp.getLocation().getY();
00085                 comp = comp.getComponentAt(x - compx, y - compy);
00086             }
00087             if (comp != null && comp.isVisible()) {
00088                 return comp;
00089             }
00090         }
00091     }
00092     return this;
00093 }
00094 /**
00095  * 
00096  */
00097 /* WARNING: THIS METHOD WILL BE REGENERATED. */
00098 private static void getBuilderData() {
00099 /*V1.1
00100 **start of data**
00101     D0CB838494G88G88G6AFB4CAAGGGGGGGGGGGG8CGGGE2F5E9ECE4E5F2A0E4E1F4E1359A8BCCDB5795A6103A15D6515AEEE8C3DA54E5D33AE6A95D6814262956ED59C635F44D3AF64D56CC4D2AD4CD554F22B5D2D157CE4FD082C99CE2BE811BC0F000A4A69007B5E42514B4FCCC889F0383AEC1ABEDF936DF6091E33B76A3401AEEBB67FE1E9F6619FC54A09D5DF74F3D771CF34F6F1EFB31D0D235BC5710DDA28806DC017D3DEB9004178F8BC2CAF76EDA0EEB5815E890B4FF07G8A05097E
00102     3721ED0531B6FB2241A40C3667C35F85FD93744B603BD87838BD2396BE6270C90131BF7E7A412FAE4D676C994EA70F749F69B1C2DBG60865C9C40FA64A9EC6AB1B3FC9A748B58B702A1DB9092F6631CDFFA4C9AFC7EEEBA4F8D6DA4C06D9E1C73DACF859B4F849C4E598230034DB5421CDDC43A4F861B593CF579AB855FF3C71277A2AF8DFD8E7EBDF46DB2568A693FCDC2C56488D3BDE7F0EF2ECB939FC83E997B25480C5DABC76C9EB160134222BD641B0878E52F94367B2410843800F73E25E5C416E62530DB
00103     74F8A41FCB8CC8A0944A7D12A71F50843901CF8A41BD6AC3DDB960FB8CC0B1F259DFF536B25946DFF9C0305E5E98D7760DC6AA738EE3D476E6636B59AB76A27D0ADEA3DB5784FDBFG1545574BE55936174B720BE11CEBADC8B4B483388AB87E020878C968A7G2496F0991FBB43E574CFBEA8ECFD36A9F9DF9C99538B28EC1B8A22B2AA6E4B599662AFCF34214DCB7681DF00FE009040B200F4008344CFEFBBF38C5AF60F52991C1E8E865AC3218E3FAF6C8C7AA4BFFC37344088438DC95EE058A788549737FB9A
00104     F464611039EF219FA2503DDD90386F24E62F96669EBF131C2B33B7C7697E644D0C4676FD513DD9CD283753926A4D845F8626EB0A6FA6F81F86CFED75B871856CABB036494475FC270D4BE27C7A8AA12D4C1A1C27A30BEB36B539351045CBE1D4962A63D59D286384402781E4GECGF89940D844F57C741913D753F1CFC011428151BFBC638909E125E3C676C39CB0DDD777AE25EBBD206B9A2FFB9D554B4A13DA9BE5CD556A6AA564EFCC3695D1FD3495C575C2F94BF1F90F97AD760D8255066F3A51D6CAD12CED
00105     5B89BE29A856360F8EF35B5E89E3D9GF47EEFC8EC0D954752F90A607D4531F4BE96B91DABB03685005A375701B951D112E898871883D886108E3081E0CB8937F1F55B09EB0CA317463EF46DB3ED2550CAF3CAD86C89C494B16015C64430ACFA7CD2C4E0F3363621DEBD8B563DC8625B8BBC3A25GE4CDC58E86003AB8AD01B3C5681C3F3595621C30C4C65D7234848C26C382277BC6DBB16AC30CA89F06FC22A2C5E750716CF674094B6288D08482705D389F75156745BCA740F745FE2E2B59AE44A950CF594F75
00106     72C5FB9134FD605C123F2545A1FBD18CB1BC4FFD34D342B3EE79FEB5BF0FF25F4BFAFE3510F971102E6F91DFAB25FEE4AE0D75BDA72159D64A4F4D27FC2357998785CC26EB0F35D7EF08C74EB54E237AFD7EAC7A68B86C6B8AC0DAA957711AF6AB753D8EB1A2F1EF9B8C0323C83E2846695C87BA70AC11AECB814541CED6A542EC3D2EE3D7548FAF86D59F79B941E3DE6A84C70928784C0EC20A879ADA2F66639B493828A8E159B323C8431222480109687ACDC41648021497E1FBFD219B771A81FB5CG30D95D2B
00107     58D92C71277EE07052CC480D11427CB2011C3F5BE1FEFE99377FE9B77AC3035A6FA67D68786343FA36437957EB4F787E31CD1747355A7F5AF87CCE44FD99547EB324FFCE5D27D79C9574E3694B13618A6171E56DAB96288F389D71FD78A3073E8F0B8EFD9F1EF0AC6D23C1071E0F52314B8E2CDD0233810D4FFF6E40FC678D86829289BCF509C06B5ED75D388FB9A0AB97E45F04248C4B7F01B2B6358CFD77A04929A178CEAA6379F0360667C35F48BDC26371C25DFAE9594F5ECB5E4C7CF5FBD9B49FD2192EF4E1
00108     ACC9FEE99A9455991C89A8947F95122F99BE12C3F04659A1E82D3658D23B41BBA986A6A43B7578718F2C0B86AF47A0BE6DA4333B50C491DB5DC8DDA34FE165648EE3B2431D8320554C637A9FDDB84E631AA52F4E205FCF5588E34B4D28237FCAA51AFD3B4D749E94750D174E1A50DE52E7B3F0E510B0B174C9737CACBCDB94B3B6A27AE722E76C9BE777C06B5764940AFF25DBDFFF2FF5E3FCDDD2693F5E3DD3403312522476CE9711E6A8ACCFC38A46A4496EE35F6C555E473641BE706ED6E2C9B458G685AB543
00109     3817D8E527DAF03D51436FEAED961A6BC6AD14065FC27531154CBB6565771193AA6EC7BE447D95045F1B43EBBE27C9FB279BCBEC5475B384DBB9255FDA9EDB8B8F125CBB86F8FFB9376BE76734793ABD9289FAE5D20AB05DDAFB34BEC8F107FBF6C3FBD18EC720AE76C9F35CBE75BDA8AB56AA8C4DF4FCEF7DE9E1F16D55651315E0189F071D3344995D41CEA8174E0109BB5590C5858BDC8F5FFAC7FBBF3CE2ACCE5E93C78F89EC7F4BB5FA285D79FAB61529BE3FD2E0775BA97132B8E70F4CC2DEE9E969555EDE
00110     597D555047ED34251C5F8DD777234F198FA49A9A814E8150BA7514474876BD8E38D4G9A37E99E4C3FACC819DE26062D680FD709CD3AEF41554676354A11AE0C7E69306E1DF30325AAF963813A5F2C8351FD773FD31EB38E406EF86FAC70259F8E4475A5C78525B1DA916BCBA77BC9AD8978DBAA38AFFD3F27D063CBF09F05D2F942AF29316F6E4D2171487A233D39BC9E851EFFC2CE4C9FE9C0F38D40C600EDG79151C47333DD73D2BF54DADF1D75B5937541D4BD6393826207712EAA75A3535125ECB72D43C1D
00111     605D9ABC75038C629F5877435846CAFE463F3F68DE5EF4F0A1CFD7CC1F2E6BD9344E9E53D7E256D1FD7EEAG73D08A0C2D84F884E0B300D08577820036AA2ED7FB1FDE0CAE54EB3CG0D56151467CE977A46B8508E2974EF6D5B2B718DD7D08EA82ADFB477E3DE8E066589B940F127894E9B8C13431B62661C716B0A7FB9756B0AE427FEDDF12BF3695A788EE73C3A03563115A4A7A4407ED22B38EDED449756C1FF9340F6955FC4707956C4C383004B4A71EB7BEF64CEC2EA082A282DB7D5AD7659F5AA6F5F5FB0
00112     0FBC4DF72E4EB846F2A5E99FAD5DC7F49909C89162A48ED19159588B4AFEC1275E9A00CBB023D1AC04BD3B581CAEA55879CF55869B87625B7B6981FDFB7FF9G7DAC921C89FB25D81BEE9DB02BE3D16F6DD124E994075592E43DA20621760BDD3F032C27E371563FB530F43D3A4705F9E2CE6D6FA37DF9011F15774F62F9F6B1ACCE433261106495728F213FB57571FAC4817F3985E0A5C0A640B6ABBFE36E13D0DF1DE199729FBBB7C1FABA76E2A31E5967E7A42CF2A086396E1F28C15F6C1527C3D0ED1185347E
00113     19F0EA6B9F57A1DA4324C11B8EC067748CEA67E432B926EA289D2B791C3F1C574EE92D26F31220CD2D66EF327FA63104FAC8875C36EA445D52272DA3D15642EC1A7368785A85632873BAC1BB7E7202F174153BF23463D77A3563391A75740C2C7F0857996EFF2D95ECA7AB633EC3B7563037C7562E7824B1A96543729CEA4F12AFBE902E7B9DBD56042C8E790EB31F491AD2436B10EF8C207D56C3FFB3400E9ADE1B6EEEF96F7A79EA5D0371CC9C64BC0D351C277DBCF93B077E9800D24BF9BE187F7E7573543A9E
00114     63E999D2772972B411F74475505F8C3023166737CF17BC4F75005AB74F4D6DFB67FD5F037A26A4EE9DE9BCCC6D5A405AC6D7E3D274FC7D500C7EBD86E3F3GE9G99G19GDB8E73336F5DB21491CFD0A8F95B95C574CE12EA1A9F2C3879A89A031E6EED05F3293D6DB83CB06F679F61EF2B3B87D1D795C7E8CD02C0714584EF5360E92D12B6207E2F8446D20FF05D363A16627F6611057CCDC7B97F3B09FF549E0D65FFAF41B79E0D655FF41E73EF053165C7B97F03C3CB71FF5B36103F594679A791DFE9304572
00115     3F0D601BED317CCB07B9FF870C2D34717752EFDBB0C7986B604E87508FB08E2054F13BFEDED6CD6D2AE353AE5F841EB178DA2C70DC7F09B97EF9A6192F7E469CB0E38E778495A5B80D74B9DEB1233E14E008A0A9EE5E0CFE8EA55524C22772BA490C316517AE92B42DE59EF272DAE6996C0D628E8EA0AE837A19F55C9E26C192B9645B22793EFB60C6EB0CEB2DC38A0507EEAA8F3A67E1975743132A9EFEC2F0D950B79E63FAD8F9BE3A777BB55FAD67EF3E9E06EFAA8F3A67D3C3DC8F66E3DC8F2984578AFD172A
00116     072F8DC777FE07663BC277AD754B5543291B4A03464AF7AD71637587162B476B0FAD646D84624CBD9FE275619A8B396BDC3C9811543C7030452462FAA22EE0C4463AB2F48C757E04DA070D9DDBDC67539A6E9409D5C57438E545AF2DB9063FD5F8218A6DC1E9CC39B80DB76352F84C351846CF2DD19A7DC31C0629BE9E0D7B069653D805BF15E067FA16DA3F54567377533F0735F5561BEE27EE1D657E03B1F90C71CD280F3EC5E0CB691CE8563EE9E4BCD61CEC502103104156BF2221C365DB6662726D286735E9
00117     D82DC59A9A385F3F3560DC7681FE2EE1697FC5507344D403BACC0139AB81B6GEC854882B09D67E74A76C3B6E8C74429452FE4006C976703B38AB9D742A2DC2159DB8C7E12057952296A437156432954ABDE9687BDD3F0F1F10B93EAAC5D35601C2F85D91A0FAF3D9F3AEEF641795C8FEB462F320E6612926A2FB0772DDC0E3390DC8A601E4D66FB3154440FBFEB4D55632F2EC67F3CBCD133783CEC2A51BFAFDBEA961F172BDCDC7E17F2387C773B387C1D599CF77B901F376FED0E3BE3084FFBB81B5F7944A3D8
00118     FF607F9CE451FFC176A91394DFB137B70ABFA721EC50273FDF2A6C2B01F655ABC22EA26CD26F8B0A1007B53CACC594E1A72D2CD9FC2C6B5246C7457A23F15F7C126C5406297658B73FCFC87CBE89786DF66E2F2B7B0FAF61EF4353225F2F087ECB6D819F7ADE473CA2C56F42DEA7520F70B9EC100ECD11F71BA94D1A7F83D0CB87883FF464661C8DGG94A6GGD0CB818294G94G88G88G6AFB4CAA3FF464661C8DGG94A6GG8CGGGGGGGGGGGGGGGGGE2F5E9ECE4E5F2A0E4E1F4E1
00119     D0CB8586GGGG81G81GBAGGG568DGGGG
00120 **end of data**/
00121 }
00122 /**
00123  * Return the CriterionViewer1 property value.
00124  * @return edu.ksu.cis.bandera.pdgslicer.dependency.CriterionViewer
00125  */
00126 /* WARNING: THIS METHOD WILL BE REGENERATED. */
00127 public CriterionViewer getCriterionViewer() {
00128     if (ivjCriterionViewer == null) {
00129         try {
00130             ivjCriterionViewer = new edu.ksu.cis.bandera.pdgslicer.dependency.CriterionViewer();
00131             ivjCriterionViewer.setName("CriterionViewer");
00132             // user code begin {1}
00133             // user code end
00134         } catch (java.lang.Throwable ivjExc) {
00135             // user code begin {2}
00136             // user code end
00137             handleException(ivjExc);
00138         }
00139     }
00140     return ivjCriterionViewer;
00141 }
00142 /**
00143  * Return the JimpleViewer1 property value.
00144  * @return edu.ksu.cis.bandera.pdgslicer.dependency.JimpleViewer
00145  */
00146 /* WARNING: THIS METHOD WILL BE REGENERATED. */
00147 public JimpleViewer getJimpleViewer() {
00148     if (ivjJimpleViewer == null) {
00149         try {
00150             ivjJimpleViewer = new edu.ksu.cis.bandera.pdgslicer.dependency.JimpleViewer();
00151             ivjJimpleViewer.setName("JimpleViewer");
00152             // user code begin {1}
00153             // user code end
00154         } catch (java.lang.Throwable ivjExc) {
00155             // user code begin {2}
00156             // user code end
00157             handleException(ivjExc);
00158         }
00159     }
00160     return ivjJimpleViewer;
00161 }
00162 /**
00163  * Return the QueryPanel property value.
00164  * @return edu.ksu.cis.bandera.pdgslicer.dependency.QueryPanel
00165  */
00166 /* WARNING: THIS METHOD WILL BE REGENERATED. */
00167 public QueryPanel getQueryPanel() {
00168     if (ivjQueryPanel == null) {
00169         try {
00170             ivjQueryPanel = new edu.ksu.cis.bandera.pdgslicer.dependency.QueryPanel();
00171             ivjQueryPanel.setName("QueryPanel");
00172             // user code begin {1}
00173             // user code end
00174         } catch (java.lang.Throwable ivjExc) {
00175             // user code begin {2}
00176             // user code end
00177             handleException(ivjExc);
00178         }
00179     }
00180     return ivjQueryPanel;
00181 }
00182 /**
00183  * Called whenever the part throws an exception.
00184  * @param exception java.lang.Throwable
00185  */
00186 private void handleException(java.lang.Throwable exception) {
00187 
00188     /* Uncomment the following lines to print uncaught exceptions to stdout */
00189     // System.out.println("--------- UNCAUGHT EXCEPTION ---------");
00190     // exception.printStackTrace(System.out);
00191 }
00192 /**
00193  * Initializes connections
00194  * @exception java.lang.Exception The exception description.
00195  */
00196 /* WARNING: THIS METHOD WILL BE REGENERATED. */
00197 private void initConnections() throws java.lang.Exception {
00198     // user code begin {1}
00199     // user code end
00200     this.addChangeListener(ivjEventHandler);
00201 }
00202 /**
00203  * Initialize the class.
00204  */
00205 /* WARNING: THIS METHOD WILL BE REGENERATED. */
00206 private void initialize() {
00207     try {
00208         // user code begin {1}
00209         // user code end
00210         setName("ViewerTabbedPane");
00211         setSize(458, 264);
00212         insertTab("Criterion", null, getCriterionViewer(), null, 0);
00213         insertTab("Queries", null, getQueryPanel(), null, 1);
00214         insertTab("Jimple", null, getJimpleViewer(), null, 2);
00215         initConnections();
00216     } catch (java.lang.Throwable ivjExc) {
00217         handleException(ivjExc);
00218     }
00219     // user code begin {2}
00220 
00221     // user code end
00222 }
00223 /**
00224  * main entrypoint - starts the part when it is run as an application
00225  * @param args java.lang.String[]
00226  */
00227 public static void main(java.lang.String[] args) {
00228     try {
00229         JFrame frame = new javax.swing.JFrame();
00230         ViewerTabbedPane aViewerTabbedPane;
00231         aViewerTabbedPane = new ViewerTabbedPane();
00232         frame.setContentPane(aViewerTabbedPane);
00233         frame.setSize(aViewerTabbedPane.getSize());
00234         frame.addWindowListener(new java.awt.event.WindowAdapter() {
00235             public void windowClosing(java.awt.event.WindowEvent e) {
00236                 System.exit(0);
00237             };
00238         });
00239         frame.setVisible(true);
00240     } catch (Throwable exception) {
00241         System.err.println("Exception occurred in main() of javax.swing.JTabbedPane");
00242         exception.printStackTrace(System.out);
00243     }
00244 }
00245 /**
00246  * Method to handle events for the ChangeListener interface.
00247  * @param e javax.swing.event.ChangeEvent
00248  */
00249 /* WARNING: THIS METHOD WILL BE REGENERATED. */
00250 public void stateChanged(javax.swing.event.ChangeEvent e) {
00251     // user code begin {1}
00252     // user code end
00253     if (e.getSource() == this) 
00254         connEtoC1();
00255     // user code begin {2}
00256     // user code end
00257 }
00258 /**
00259  * Comment
00260  */
00261 public void viewerTabbedPane_ChangeEvents() {
00262     if (firstClickTab) {
00263         getCriterionViewer().getPointVarSplitPane().setDividerLocation(0.75);
00264         getCriterionViewer().getStmtControlSplitPane().setDividerLocation(0.4);
00265         getCriterionViewer().getLocationsVarsSplitPane().setDividerLocation(0.6);
00266         firstClickTab = false;
00267     }
00268     return;
00269 }
00270 }

Generated at Thu Feb 7 06:59:11 2002 for Bandera by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001