KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > tools > ant > taskdefs > optional > ide > VAJAntToolGUI


1 /*
2  * Copyright 2001-2004 The Apache Software Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */

17
18 package org.apache.tools.ant.taskdefs.optional.ide;
19
20
21 import java.awt.BorderLayout JavaDoc;
22 import java.awt.Button JavaDoc;
23 import java.awt.Choice JavaDoc;
24 import java.awt.Dialog JavaDoc;
25 import java.awt.FileDialog JavaDoc;
26 import java.awt.FlowLayout JavaDoc;
27 import java.awt.Font JavaDoc;
28 import java.awt.Frame JavaDoc;
29 import java.awt.GridBagConstraints JavaDoc;
30 import java.awt.GridBagLayout JavaDoc;
31 import java.awt.Insets JavaDoc;
32 import java.awt.Label JavaDoc;
33 import java.awt.List JavaDoc;
34 import java.awt.Menu JavaDoc;
35 import java.awt.MenuBar JavaDoc;
36 import java.awt.MenuItem JavaDoc;
37 import java.awt.Panel JavaDoc;
38 import java.awt.SystemColor JavaDoc;
39 import java.awt.TextArea JavaDoc;
40 import java.awt.TextField JavaDoc;
41 import java.awt.Toolkit JavaDoc;
42 import java.awt.event.ActionEvent JavaDoc;
43 import java.awt.event.ActionListener JavaDoc;
44 import java.awt.event.ItemEvent JavaDoc;
45 import java.awt.event.ItemListener JavaDoc;
46 import java.awt.event.TextEvent JavaDoc;
47 import java.awt.event.TextListener JavaDoc;
48 import java.awt.event.WindowEvent JavaDoc;
49 import java.awt.event.WindowListener JavaDoc;
50 import java.beans.PropertyChangeListener JavaDoc;
51 import java.util.Vector JavaDoc;
52 import org.apache.tools.ant.BuildEvent;
53 import org.apache.tools.ant.BuildException;
54 import org.apache.tools.ant.BuildListener;
55 import org.apache.tools.ant.Project;
56 import org.apache.tools.ant.util.DateUtils;
57 import org.apache.tools.ant.util.StringUtils;
58
59 /**
60  * This is a simple grafical user interface to provide the information needed
61  * by ANT and to start the build-process within IBM VisualAge for Java.
62  * <p>
63  * I was using AWT to make it independent from the JDK-version. Please don't
64  * ask me for a Swing-version:I am very familiar with Swing and I really think
65  * that it's not necessary for such a simple gui!
66  * <p>
67  * It is completely developed in VAJ using the visual composition editor.
68  * About 90% of the code is generated by VAJ,
69  * but in fact I did a lot of <i>code-beautification</i> ;-).
70  * <p>
71  * @version 1.0 h
72  */

73 public class VAJAntToolGUI extends Frame JavaDoc {
74     /**
75      * Members
76      */

77     private VAJBuildLogger logger = new VAJBuildLogger();
78     private static final String JavaDoc lineSeparator = "\r\n";
79     private PrivateEventHandler iEventHandler = new PrivateEventHandler();
80
81     /**
82      * Members of the main-window
83      */

84     // main model
85
private VAJBuildInfo iBuildInfo = null;
86     // Menue
87
private MenuBar JavaDoc iAntMakeMenuBar = null;
88     private Menu JavaDoc iFileMenu = null;
89     private MenuItem JavaDoc iSaveMenuItem = null;
90     private MenuItem JavaDoc iMenuSeparator = null;
91     private MenuItem JavaDoc iShowLogMenuItem = null;
92     private Menu JavaDoc iHelpMenu = null;
93     private MenuItem JavaDoc iAboutMenuItem = null;
94     // Container
95
private Panel JavaDoc iContentsPane = null;
96     private Panel JavaDoc iOptionenPanel = null;
97     private Panel JavaDoc iCommandButtonPanel = null;
98     // Project name
99
private Label JavaDoc iProjectLabel = null;
100     private Label JavaDoc iProjectText = null;
101     // XML-file
102
private Label JavaDoc iBuildFileLabel = null;
103     private TextField JavaDoc iBuildFileTextField = null;
104     private boolean iConnPtoP2Aligning = false;
105     private Button JavaDoc iBrowseButton = null;
106     private FileDialog JavaDoc iFileDialog = null;
107     // Options
108
private Choice JavaDoc iMessageOutputLevelChoice = null;
109     private Label JavaDoc iMessageOutputLevelLabel = null;
110     private Label JavaDoc iTargetLabel = null;
111     private List JavaDoc iTargetList = null;
112     // Command-buttons
113
private Button JavaDoc iBuildButton = null;
114     private Button JavaDoc iReloadButton = null;
115     private Button JavaDoc iCloseButton = null;
116     /**
117      * log-Window
118      */

119     // Container
120
private Frame JavaDoc iMessageFrame = null;
121     private Panel JavaDoc iMessageCommandPanel = null;
122     private Panel JavaDoc iMessageContentPanel = null;
123     // Components
124
private TextArea JavaDoc iMessageTextArea = null;
125     private Button JavaDoc iMessageOkButton = null;
126     private Button JavaDoc iMessageClearLogButton = null;
127     /**
128      * About-dialog
129      */

130     // Container
131
private Dialog JavaDoc iAboutDialog = null;
132     private Panel JavaDoc iAboutDialogContentPanel = null;
133     private Panel JavaDoc iAboutInfoPanel = null;
134     private Panel JavaDoc iAboutCommandPanel = null;
135     // Labels
136
private Label JavaDoc iAboutTitleLabel = null;
137     private Label JavaDoc iAboutDevLabel = null;
138     private Label JavaDoc iAboutContactLabel = null;
139     // Buttons
140
private Button JavaDoc iAboutOkButton = null;
141
142     /**
143      * This internal BuildLogger, to be honest, is just a BuildListener.
144      * It does nearly the same as the DefaultLogger, but uses the Loggin-Window for output.
145      */

146     private class VAJBuildLogger implements BuildListener {
147         private long startTime = System.currentTimeMillis();
148
149         /**
150          * VAJBuildLogger constructor comment.
151          */

152         public VAJBuildLogger() {
153             super();
154         }
155
156         /**
157          * Fired after the last target has finished. This event
158          * will still be thrown if an error occurred during the build.
159          *
160          * @see BuildEvent#getException()
161          */

162         public void buildFinished(BuildEvent event) {
163             getStopButton().setEnabled(false);
164             getBuildButton().setEnabled(true);
165             getBuildButton().requestFocus();
166
167             Throwable JavaDoc error = event.getException();
168
169             if (error == null) {
170                 getMessageTextArea().append(lineSeparator + "BUILD SUCCESSFUL");
171             } else {
172                 logException(error);
173             }
174
175             getMessageTextArea().append(lineSeparator + "Total time: "
176                 + DateUtils.formatElapsedTime(System.currentTimeMillis() - startTime));
177         }
178
179
180         /**
181          * Outputs an exception.
182          */

183         public void logException(Throwable JavaDoc error) {
184             getMessageTextArea().append(lineSeparator + "BUILD FAILED" + lineSeparator);
185
186             if (error instanceof BuildException) {
187                 getMessageTextArea().append(error.toString());
188
189                 Throwable JavaDoc nested = ((BuildException) error).getException();
190                 if (nested != null) {
191                     nested.printStackTrace(System.err);
192                 }
193             } else {
194                 error.printStackTrace(System.err);
195             }
196         }
197
198         /**
199          * Fired before any targets are started.
200          */

201         public void buildStarted(BuildEvent event) {
202             getStopButton().setEnabled(true);
203             getBuildButton().setEnabled(false);
204             getStopButton().requestFocus();
205
206             startTime = System.currentTimeMillis();
207             getMessageTextArea().append(lineSeparator);
208         }
209
210         /**
211          * Fired whenever a message is logged.
212          *
213          * @see BuildEvent#getMessage()
214          * @see BuildEvent#getPriority()
215          */

216         public void messageLogged(BuildEvent event) {
217             if (event.getPriority() <= getBuildInfo().getOutputMessageLevel()) {
218                 String JavaDoc msg = "";
219                 if (event.getTask() != null) {
220                     msg = "[" + event.getTask().getTaskName() + "] ";
221                 }
222                 getMessageTextArea().append(lineSeparator + msg + event.getMessage());
223             }
224         }
225
226         /**
227          * Fired when a target has finished. This event will
228          * still be thrown if an error occurred during the build.
229          *
230          * @see BuildEvent#getException()
231          */

232         public void targetFinished(BuildEvent event) {
233         }
234
235         /**
236          * Fired when a target is started.
237          *
238          * @see BuildEvent#getTarget()
239          */

240         public void targetStarted(BuildEvent event) {
241             if (getBuildInfo().getOutputMessageLevel() <= Project.MSG_INFO) {
242                 getMessageTextArea().append(lineSeparator + event.getTarget().getName() + ":");
243             }
244         }
245
246         /**
247          * Fired when a task has finished. This event will still
248          * be throw if an error occurred during the build.
249          *
250          * @see BuildEvent#getException()
251          */

252         public void taskFinished(BuildEvent event) {
253         }
254
255         /**
256          * Fired when a task is started.
257          *
258          * @see BuildEvent#getTask()
259          */

260         public void taskStarted(BuildEvent event) {
261         }
262     }
263
264     /**
265      * Eventhandler to handle all AWT-events
266      */

267     private class PrivateEventHandler
268         implements ActionListener JavaDoc, ItemListener JavaDoc, TextListener JavaDoc,
269                    WindowListener JavaDoc, PropertyChangeListener JavaDoc {
270         /**
271          * ActionListener method
272          */

273         public void actionPerformed(ActionEvent JavaDoc e) {
274             try {
275                 /* #### Main App-Frame #### */
276                 // browse XML-File with filechooser
277
if (e.getSource() == VAJAntToolGUI.this.getBrowseButton()) {
278                     getFileDialog().setDirectory(getBuildFileTextField().getText().substring(0, getBuildFileTextField().getText().lastIndexOf('\\') + 1));
279                     getFileDialog().setFile("*.xml");
280                     getFileDialog().show();
281                     if (!getFileDialog().getFile().equals("")) {
282                         getBuildFileTextField().setText(getFileDialog().getDirectory()
283                         + getFileDialog().getFile());
284                     }
285                 }
286                 // dispose and exit application
287
if (e.getSource() == VAJAntToolGUI.this.getCloseButton()) {
288                     dispose();
289                     System.exit(0);
290                 }
291                 // start build-process
292
if (e.getSource() == VAJAntToolGUI.this.getBuildButton()) {
293                     executeTarget();
294                 }
295                 if (e.getSource() == VAJAntToolGUI.this.getStopButton()) {
296                     getBuildInfo().cancelBuild();
297                 }
298                 if (e.getSource() == VAJAntToolGUI.this.getReloadButton()) {
299                     try {
300                         getBuildInfo().updateTargetList();
301                         fillList();
302                     } catch (Throwable JavaDoc fileNotFound) {
303                         handleException(fileNotFound);
304                         getTargetList().removeAll();
305                         getBuildButton().setEnabled(false);
306                     }
307                 }
308                 // MenuItems
309
if (e.getSource() == VAJAntToolGUI.this.getSaveMenuItem()) {
310                     saveBuildInfo();
311                 }
312                 if (e.getSource() == VAJAntToolGUI.this.getAboutMenuItem()) {
313                     getAboutDialog().show();
314                 }
315                 if (e.getSource() == VAJAntToolGUI.this.getShowLogMenuItem()) {
316                     getMessageFrame().show();
317                 }
318                 /* #### About dialog #### */
319                 if (e.getSource() == VAJAntToolGUI.this.getAboutOkButton()) {
320                     getAboutDialog().dispose();
321                 }
322                 /* #### Log frame #### */
323                 if (e.getSource() == VAJAntToolGUI.this.getMessageOkButton()) {
324                     getMessageFrame().dispose();
325                 }
326                 if (e.getSource() == VAJAntToolGUI.this.getMessageClearLogButton()) {
327                     getMessageTextArea().setText("");
328                 }
329                 if (e.getSource() == VAJAntToolGUI.this.getMessageOkButton()) {
330                     getMessageFrame().dispose();
331                 }
332             } catch (Throwable JavaDoc exc) {
333                 handleException(exc);
334             }
335         }
336
337         /**
338          * ItemListener method
339          */

340         public void itemStateChanged(ItemEvent JavaDoc e) {
341             try {
342                 if (e.getSource() == VAJAntToolGUI.this.getTargetList()) {
343                     getBuildButton().setEnabled(true);
344                 }
345                 if (e.getSource() == VAJAntToolGUI.this.getMessageOutputLevelChoice()) {
346                     getBuildInfo().setOutputMessageLevel(getMessageOutputLevelChoice().getSelectedIndex());
347                 }
348                 if (e.getSource() == VAJAntToolGUI.this.getTargetList()) {
349                     getBuildInfo().setTarget(getTargetList().getSelectedItem());
350                 }
351             } catch (Throwable JavaDoc exc) {
352                 handleException(exc);
353             }
354         }
355
356         /**
357          * PropertyChangeListener method
358          */

359         public void propertyChange(java.beans.PropertyChangeEvent JavaDoc evt) {
360             if (evt.getSource() == VAJAntToolGUI.this.getBuildInfo()
361                 && (evt.getPropertyName().equals("projectName"))) {
362                 connectProjectNameToLabel();
363             }
364             if (evt.getSource() == VAJAntToolGUI.this.getBuildInfo()
365                 && (evt.getPropertyName().equals("buildFileName"))) {
366                 connectBuildFileNameToTextField();
367             }
368         }
369
370         /**
371          * TextListener method
372          */

373         public void textValueChanged(TextEvent JavaDoc e) {
374             if (e.getSource() == VAJAntToolGUI.this.getBuildFileTextField()) {
375                 connectTextFieldToBuildFileName();
376             }
377         }
378
379         /**
380          * WindowListener methods
381          */

382         public void windowClosing(WindowEvent JavaDoc e) {
383             try {
384                 if (e.getSource() == VAJAntToolGUI.this) {
385                     dispose();
386                     System.exit(0);
387                 }
388                 if (e.getSource() == VAJAntToolGUI.this.getAboutDialog()) {
389                     getAboutDialog().dispose();
390                 }
391                 if (e.getSource() == VAJAntToolGUI.this.getMessageFrame()) {
392                     getMessageFrame().dispose();
393                 }
394             } catch (Throwable JavaDoc exc) {
395                 handleException(exc);
396             }
397         }
398         public void windowActivated(WindowEvent JavaDoc e) {
399         }
400         public void windowClosed(WindowEvent JavaDoc e) {
401         }
402         public void windowDeactivated(WindowEvent JavaDoc e) {
403         }
404         public void windowDeiconified(WindowEvent JavaDoc e) {
405         }
406         public void windowIconified(WindowEvent JavaDoc e) {
407         }
408         public void windowOpened(WindowEvent JavaDoc e) {
409         }
410     }
411
412     /**
413      * AntMake default-constructor.
414      */

415     private VAJAntToolGUI() {
416         super();
417         initialize();
418     }
419     /**
420      * AntMake constructor called by VAJAntTool integration.
421      * @param newBuildInfo VAJBuildInfo
422      */

423     public VAJAntToolGUI(VAJBuildInfo newBuildInfo) {
424         super();
425         setBuildInfo(newBuildInfo);
426         initialize();
427     }
428     /**
429      * This method is used to center dialogs.
430      */

431     public static void centerDialog(Dialog JavaDoc dialog) {
432         dialog.setLocation((Toolkit.getDefaultToolkit().getScreenSize().width / 2) - (dialog.getSize().width / 2), (java.awt.Toolkit.getDefaultToolkit().getScreenSize().height / 2) - (dialog.getSize().height / 2));
433     }
434     /**
435      * connectBuildFileNameToTextField: (BuildInfo.buildFileName <--> BuildFileTextField.text)
436      */

437     private void connectBuildFileNameToTextField() {
438         /* Set the target from the source */
439         try {
440             if (iConnPtoP2Aligning == false) {
441                 iConnPtoP2Aligning = true;
442                 if ((getBuildInfo() != null)) {
443                     getBuildFileTextField().setText(getBuildInfo().getBuildFileName());
444                 }
445                 iConnPtoP2Aligning = false;
446             }
447         } catch (Throwable JavaDoc iExc) {
448             iConnPtoP2Aligning = false;
449             handleException(iExc);
450         }
451     }
452     /**
453      * connectProjectNameToLabel: (BuildInfo.vajProjectName <--> ProjectText.text)
454      */

455     private void connectProjectNameToLabel() {
456         /* Set the target from the source */
457         try {
458             if ((getBuildInfo() != null)) {
459                 getProjectText().setText(getBuildInfo().getVAJProjectName());
460             }
461         } catch (Throwable JavaDoc iExc) {
462             handleException(iExc);
463         }
464     }
465     /**
466      * connectTextFieldToBuildFileName: (BuildInfo.buildFileName <--> BuildFileTextField.text)
467      */

468     private void connectTextFieldToBuildFileName() {
469         /* Set the source from the target */
470         try {
471             if (iConnPtoP2Aligning == false) {
472                 iConnPtoP2Aligning = true;
473                 if ((getBuildInfo() != null)) {
474                     getBuildInfo().setBuildFileName(getBuildFileTextField().getText());
475                 }
476                 iConnPtoP2Aligning = false;
477             }
478         } catch (Throwable JavaDoc iExc) {
479             iConnPtoP2Aligning = false;
480             handleException(iExc);
481         }
482     }
483     /**
484      * external build of a .jar-file
485      */

486     private void executeTarget() {
487         try {
488             getMessageFrame().show();
489             getBuildInfo().executeProject(logger);
490         } catch (Throwable JavaDoc exc) {
491             logger.logException(exc);
492         }
493         return;
494     }
495     /**
496      * Fills the taget-list with project-targets
497      */

498     private void fillList() {
499         getTargetList().removeAll();
500         Vector JavaDoc targets = getBuildInfo().getProjectTargets();
501         for (int i = 0; i < targets.size(); i++) {
502             getTargetList().add(targets.elementAt(i).toString());
503         }
504         getTargetList().select(iBuildInfo.getProjectTargets().indexOf(iBuildInfo.getTarget()));
505         if (getTargetList().getSelectedIndex() >= 0) {
506             getBuildButton().setEnabled(true);
507         }
508     }
509
510     /**
511      * Return the AboutCommandPanel property value.
512      * @return java.awt.Panel
513      */

514     private Panel JavaDoc getAboutCommandPanel() {
515         if (iAboutCommandPanel == null) {
516             try {
517                 iAboutCommandPanel = new Panel JavaDoc();
518                 iAboutCommandPanel.setName("AboutCommandPanel");
519                 iAboutCommandPanel.setLayout(new java.awt.FlowLayout JavaDoc());
520                 getAboutCommandPanel().add(getAboutOkButton(), getAboutOkButton().getName());
521             } catch (Throwable JavaDoc iExc) {
522                 handleException(iExc);
523             }
524         }
525         return iAboutCommandPanel;
526     }
527     /**
528      * Return the AboutContactLabel property value.
529      * @return java.awt.Label
530      */

531     private Label JavaDoc getAboutContactLabel() {
532         if (iAboutContactLabel == null) {
533             try {
534                 iAboutContactLabel = new Label JavaDoc();
535                 iAboutContactLabel.setName("AboutContactLabel");
536                 iAboutContactLabel.setAlignment(java.awt.Label.CENTER);
537                 iAboutContactLabel.setText("contact: wolf.siberski@tui.de or "
538                     + "christoph.wilhelms@tui.de");
539             } catch (Throwable JavaDoc iExc) {
540                 handleException(iExc);
541             }
542         }
543         return iAboutContactLabel;
544     }
545     /**
546      * Return the AboutDevLabel property value.
547      * @return java.awt.Label
548      */

549     private Label JavaDoc getAboutDevLabel() {
550         if (iAboutDevLabel == null) {
551             try {
552                 iAboutDevLabel = new Label JavaDoc();
553                 iAboutDevLabel.setName("AboutDevLabel");
554                 iAboutDevLabel.setAlignment(java.awt.Label.CENTER);
555                 iAboutDevLabel.setText("developed by Wolf Siberski & Christoph Wilhelms");
556             } catch (Throwable JavaDoc iExc) {
557                 handleException(iExc);
558             }
559         }
560         return iAboutDevLabel;
561     }
562     /**
563      * Return the AboutDialog property value.
564      * @return java.awt.Dialog
565      */

566     private Dialog JavaDoc getAboutDialog() {
567         if (iAboutDialog == null) {
568             try {
569                 iAboutDialog = new Dialog JavaDoc(this);
570                 iAboutDialog.setName("AboutDialog");
571                 iAboutDialog.setResizable(false);
572                 iAboutDialog.setLayout(new java.awt.BorderLayout JavaDoc());
573                 iAboutDialog.setBounds(550, 14, 383, 142);
574                 iAboutDialog.setModal(true);
575                 iAboutDialog.setTitle("About...");
576                 getAboutDialog().add(getAboutDialogContentPanel(), "Center");
577                 iAboutDialog.pack();
578                 centerDialog(iAboutDialog);
579             } catch (Throwable JavaDoc iExc) {
580                 handleException(iExc);
581             }
582         }
583         return iAboutDialog;
584     }
585     /**
586      * Return the AboutDialogContentPanel property value.
587      * @return java.awt.Panel
588      */

589     private Panel JavaDoc getAboutDialogContentPanel() {
590         if (iAboutDialogContentPanel == null) {
591             try {
592                 iAboutDialogContentPanel = new Panel JavaDoc();
593                 iAboutDialogContentPanel.setName("AboutDialogContentPanel");
594                 iAboutDialogContentPanel.setLayout(new java.awt.BorderLayout JavaDoc());
595                 getAboutDialogContentPanel().add(getAboutCommandPanel(), "South");
596                 getAboutDialogContentPanel().add(getAboutInfoPanel(), "Center");
597             } catch (Throwable JavaDoc iExc) {
598                 handleException(iExc);
599             }
600         }
601         return iAboutDialogContentPanel;
602     }
603     /**
604      * Return the AboutInfoPanel property value.
605      * @return java.awt.Panel
606      */

607     private Panel JavaDoc getAboutInfoPanel() {
608         if (iAboutInfoPanel == null) {
609             try {
610                 iAboutInfoPanel = new Panel JavaDoc();
611                 iAboutInfoPanel.setName("AboutInfoPanel");
612                 iAboutInfoPanel.setLayout(new GridBagLayout JavaDoc());
613
614                 GridBagConstraints JavaDoc constraintsAboutTitleLabel = new GridBagConstraints JavaDoc();
615                 constraintsAboutTitleLabel.gridx = 0; constraintsAboutTitleLabel.gridy = 0;
616                 constraintsAboutTitleLabel.fill = GridBagConstraints.HORIZONTAL;
617                 constraintsAboutTitleLabel.weightx = 1.0;
618                 constraintsAboutTitleLabel.weighty = 1.0;
619                 constraintsAboutTitleLabel.insets = new Insets JavaDoc(4, 0, 4, 0);
620                 getAboutInfoPanel().add(getAboutTitleLabel(), constraintsAboutTitleLabel);
621
622                 GridBagConstraints JavaDoc constraintsAboutDevLabel = new GridBagConstraints JavaDoc();
623                 constraintsAboutDevLabel.gridx = 0; constraintsAboutDevLabel.gridy = 1;
624                 constraintsAboutDevLabel.fill = GridBagConstraints.HORIZONTAL;
625                 constraintsAboutDevLabel.weightx = 1.0;
626                 constraintsAboutDevLabel.insets = new Insets JavaDoc(4, 0, 0, 0);
627                 getAboutInfoPanel().add(getAboutDevLabel(), constraintsAboutDevLabel);
628
629                 GridBagConstraints JavaDoc constraintsAboutContactLabel = new GridBagConstraints JavaDoc();
630                 constraintsAboutContactLabel.gridx = 0; constraintsAboutContactLabel.gridy = 2;
631                 constraintsAboutContactLabel.fill = GridBagConstraints.HORIZONTAL;
632                 constraintsAboutContactLabel.weightx = 1.0;
633                 constraintsAboutContactLabel.insets = new Insets JavaDoc(2, 0, 4, 0);
634                 getAboutInfoPanel().add(getAboutContactLabel(), constraintsAboutContactLabel);
635             } catch (Throwable JavaDoc iExc) {
636                 handleException(iExc);
637             }
638         }
639         return iAboutInfoPanel;
640     }
641     /**
642      * Return the AboutMenuItem property value.
643      * @return java.awt.MenuItem
644      */

645     private MenuItem JavaDoc getAboutMenuItem() {
646         if (iAboutMenuItem == null) {
647             try {
648                 iAboutMenuItem = new MenuItem JavaDoc();
649                 iAboutMenuItem.setLabel("About...");
650             } catch (Throwable JavaDoc iExc) {
651                 handleException(iExc);
652             }
653         }
654         return iAboutMenuItem;
655     }
656     /**
657      * Return the AboutOkButton property value.
658      * @return java.awt.Button
659      */

660     private Button JavaDoc getAboutOkButton() {
661         if (iAboutOkButton == null) {
662             try {
663                 iAboutOkButton = new Button JavaDoc();
664                 iAboutOkButton.setName("AboutOkButton");
665                 iAboutOkButton.setLabel("OK");
666             } catch (Throwable JavaDoc iExc) {
667                 handleException(iExc);
668             }
669         }
670         return iAboutOkButton;
671     }
672     /**
673      * Return the AboutTitleLabel property value.
674      * @return java.awt.Label
675      */

676     private Label JavaDoc getAboutTitleLabel() {
677         if (iAboutTitleLabel == null) {
678             try {
679                 iAboutTitleLabel = new Label JavaDoc();
680                 iAboutTitleLabel.setName("AboutTitleLabel");
681                 iAboutTitleLabel.setFont(new Font JavaDoc("Arial", 1, 12));
682                 iAboutTitleLabel.setAlignment(Label.CENTER);
683                 iAboutTitleLabel.setText("Ant VisualAge for Java Tool-Integration");
684             } catch (Throwable JavaDoc iExc) {
685                 handleException(iExc);
686             }
687         }
688         return iAboutTitleLabel;
689     }
690     /**
691      * Return the AntMakeMenuBar property value.
692      * @return java.awt.MenuBar
693      */

694     private MenuBar JavaDoc getAntMakeMenuBar() {
695         if (iAntMakeMenuBar == null) {
696             try {
697                 iAntMakeMenuBar = new MenuBar JavaDoc();
698                 iAntMakeMenuBar.add(getFileMenu());
699                 iAntMakeMenuBar.add(getHelpMenu());
700      &