Definition at line 37 of file GDSBrowserView.java.
Public Member Functions | |
GDSBrowserView () | |
Creates a new GDSBrowserView object. | |
ActionEvent | processEvent (ActionEvent evt) |
Responsible for processing events sent to the view. | |
void | show () |
Displays the view. | |
String | toString () |
Returns a string representation of this object. |
|
Creates a new GDSBrowserView object.
Definition at line 52 of file GDSBrowserView.java. References GDSBrowserI18NFactory.getString(), and GDSBrowserI18NFactory.i18n_APP_TITLE. 00052 { 00053 frame = new JFrame( 00054 i18n.getString(i18n.i18n_APP_TITLE)); 00055 frame.setDefaultCloseOperation(frame.DO_NOTHING_ON_CLOSE); 00056 frame.addWindowListener(new WindowAdapter() { 00057 public void windowClosing(WindowEvent evt) { 00058 frame.setVisible(false); 00059 notifyController(new ActionEvent(this, 00060 GDSBrowserEvents.APPEXIT_EVENT, null)); 00061 } 00062 }); 00063 initComponents(); 00064 }
|
|
Responsible for processing events sent to the view. Such events include updating the display of the logfile and GDS file as well as displaying information and error dialog boxes.
Definition at line 76 of file GDSBrowserView.java. 00076 { 00077 if(evt != null) { 00078 if(evt.getID() == GDSBrowserEvents.ERROR_EVENT) { 00079 displayError(evt.getActionCommand()); 00080 } else if(evt.getID() == GDSBrowserEvents.INFO_EVENT) { 00081 displayInfo(evt.getActionCommand()); 00082 } else if(evt.getID() == GDSBrowserEvents.SETLOG_EVENT) { 00083 browser.setLog(evt.getActionCommand()); 00084 } else if(evt.getID() == GDSBrowserEvents.SETGDS_EVENT) { 00085 browser.setGds(evt.getActionCommand()); 00086 } else if(evt.getID() == GDSBrowserEvents.PARSE_EVENT) { 00087 if(frame.isVisible()){browser.parseDesign();} 00088 else { 00089 GDSParser batchParser = new GDSParser(); 00090 OutputStream out = System.out; 00091 if(browser.getLog().trim().length() > 0) { 00092 try { 00093 out = new BufferedOutputStream(new FileOutputStream( 00094 browser.getLog())); 00095 } catch(IOException ex) { 00096 /* default to System.out */ 00097 } 00098 } 00099 batchParser.parseDesign(new File(browser.getGds()), out); 00100 notifyController(new ActionEvent(this, GDSBrowserEvents.APPEXIT_EVENT, 00101 null)); 00102 } 00103 } 00104 } // end if 00105 00106 return null; 00107 } // end method processEvent
|
|
Displays the view.
Definition at line 110 of file GDSBrowserView.java. 00110 {frame.setVisible(true);}
|
|
Returns a string representation of this object.
Definition at line 117 of file GDSBrowserView.java. 00117 {return super.toString();}
|