Inherits javax::swing::JFrame, and java::awt::event::ActionListener.
Public Member Functions | |
| void | createGUI () |
| void | createTabbedPane (LinkedHashMap attributes, String XML) |
| void | setRightComp (JComponent component, boolean showButtons) |
| void | setLeftComp () |
| void | display (String message, boolean newLine) |
| void | setPath (String newLoc) |
| String | getPath () |
| void | enableButtons (boolean enable) |
| boolean | buttonsEnabled () |
| void | actionPerformed (ActionEvent e) |
Static Public Member Functions | |
| static Browser | getInstance () |
| static void | main (String[]args) |
Package Functions | |
| Browser () | |
This class is responsible for initialising and placing all Components inside the GUI.
| com.cosylab.cdb.browser.Browser.Browser | ( | ) | [package] |
Constructor of the Browser class.
References com.cosylab.cdb.browser.Browser.buttonsEnabled().
Referenced by com.cosylab.cdb.browser.Browser.getInstance().
| void com.cosylab.cdb.browser.Browser.actionPerformed | ( | ActionEvent | e | ) |
Invoked when an action occurs (User presses the button).
| e | A semantic event which indicates that a component-defined action occured. |
References com.cosylab.cdb.browser.Browser.buttonsEnabled(), com.cosylab.cdb.browser.Browser.display(), com.cosylab.cdb.browser.Browser.getPath(), com.cosylab.cdb.browser.Browser.setLeftComp(), com.cosylab.cdb.browser.Browser.setPath(), and com.cosylab.cdb.browser.Browser.setRightComp().
| boolean com.cosylab.cdb.browser.Browser.buttonsEnabled | ( | ) |
Checks if the buttons (on top pf the tabbed pane) are enabled. true if buttons are enabled; false otherwise.
Referenced by com.cosylab.cdb.browser.Browser.actionPerformed(), and com.cosylab.cdb.browser.Browser.Browser().
| void com.cosylab.cdb.browser.Browser.createGUI | ( | ) |
Sets up the Graphical User Interface (GUI) of the Browser. The GUI is divided into three sections: left side, where the CDB Tree will be visible; right side for the output (tabbed pane) and the bottom for the message text area. CDB tree (left) and the tabbed panes (right) are separeted by a JSplitPane object. On top of the GUI there is a location bar (shows the current selected path in th tree).
References com.cosylab.cdb.browser.Browser.setLeftComp(), and com.cosylab.cdb.browser.Browser.setRightComp().
Referenced by com.cosylab.cdb.browser.Browser.main().
| void com.cosylab.cdb.browser.Browser.createTabbedPane | ( | LinkedHashMap | attributes, | |
| String | XML | |||
| ) |
Create the tabbed pane with two tabs (Table View and XML View).
| nodeHashMap | data of the entry (null is possible). | |
| xml | XML record of the node (null is possible). |
References com.cosylab.cdb.browser.Browser.setRightComp().
| void com.cosylab.cdb.browser.Browser.display | ( | String | message, | |
| boolean | newLine | |||
| ) |
Adds some text to the message area at the buttom of the GUI.
| message | the text to be added. | |
| newLine | dispalay message in the next (new) line. |
Referenced by com.cosylab.cdb.browser.Browser.actionPerformed().
| void com.cosylab.cdb.browser.Browser.enableButtons | ( | boolean | enable | ) |
Enables/Disables both buttons: saveChanges & resetData
| enable | enable or disable both buttons. |
| static Browser com.cosylab.cdb.browser.Browser.getInstance | ( | ) | [static] |
Only one instance of the Browser class can be created at any time during program execution.
References com.cosylab.cdb.browser.Browser.Browser().
Referenced by com.cosylab.cdb.browser.Browser.main().
| String com.cosylab.cdb.browser.Browser.getPath | ( | ) |
Returns the path of the current selected tree node.
Referenced by com.cosylab.cdb.browser.Browser.actionPerformed().
| static void com.cosylab.cdb.browser.Browser.main | ( | String[] | args | ) | [static] |
The main method.
| args | the IOR (Input Output reference) which represents the DAL access parameters. |
References com.cosylab.cdb.browser.Browser.createGUI(), and com.cosylab.cdb.browser.Browser.getInstance().
| void com.cosylab.cdb.browser.Browser.setLeftComp | ( | ) |
Sets the cdb Tree in the left side of the GUI.
Referenced by com.cosylab.cdb.browser.Browser.actionPerformed(), and com.cosylab.cdb.browser.Browser.createGUI().
| void com.cosylab.cdb.browser.Browser.setPath | ( | String | newLoc | ) |
Updates the location text field.
| newLoc | the new selected location. |
Referenced by com.cosylab.cdb.browser.Browser.actionPerformed().
| void com.cosylab.cdb.browser.Browser.setRightComp | ( | JComponent | component, | |
| boolean | showButtons | |||
| ) |
Sets the right component either a tabbed Pane or an empty text area.
| component | the component that is added to the right side of the GUI. | |
| showButtons | true only if component is instance of JTabbedPane. |
Referenced by com.cosylab.cdb.browser.Browser.actionPerformed(), com.cosylab.cdb.browser.Browser.createGUI(), and com.cosylab.cdb.browser.Browser.createTabbedPane().
1.7.0