

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 () | |
Private Attributes | |
| JTextArea | messageTextArea |
| JSplitPane | splitPane |
| final int | dividerLocation = 240 |
| JTextField | currentLocation |
| final JButton | saveChanges = new JButton(" Save Changes to XML record ") |
| final JButton | resetData = new JButton(" Reset Data ") |
| JButton | refreshTree = new JButton(" Refrest CDB Tree ") |
| final String | titleCol1 = "ATTRIBUTE NAME" |
| final String | titleCol2 = "ATTRIBUTE VALUE" |
Static Private Attributes | |
| static Browser | instance = null |
| static String | strIOR = null |
This class is responsible for initialising and placing all Components inside the GUI.
| com::cosylab::cdb::browser::Browser::Browser | ( | ) | [inline, package] |
| void com::cosylab::cdb::browser::Browser::actionPerformed | ( | ActionEvent | e | ) | [inline] |
Invoked when an action occurs (User presses the button).
| e | A semantic event which indicates that a component-defined action occured. |
References buttonsEnabled(), display(), getPath(), messageTextArea, refreshTree, resetData, saveChanges, setLeftComp(), setPath(), and setRightComp().
| boolean com::cosylab::cdb::browser::Browser::buttonsEnabled | ( | ) | [inline] |
Checks if the buttons (on top pf the tabbed pane) are enabled. true if buttons are enabled; false otherwise.
References resetData, and saveChanges.
Referenced by actionPerformed(), and Browser().
| void com::cosylab::cdb::browser::Browser::createGUI | ( | ) | [inline] |
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 currentLocation, messageTextArea, refreshTree, resetData, saveChanges, setLeftComp(), setRightComp(), and splitPane.
Referenced by main().
| void com::cosylab::cdb::browser::Browser::createTabbedPane | ( | LinkedHashMap | attributes, | |
| String | XML | |||
| ) | [inline] |
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 setRightComp(), titleCol1, and titleCol2.
| void com::cosylab::cdb::browser::Browser::display | ( | String | message, | |
| boolean | newLine | |||
| ) | [inline] |
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. |
References messageTextArea.
Referenced by actionPerformed().
| void com::cosylab::cdb::browser::Browser::enableButtons | ( | boolean | enable | ) | [inline] |
Enables/Disables both buttons: saveChanges & resetData
| enable | enable or disable both buttons. |
References resetData, and saveChanges.
| static Browser com::cosylab::cdb::browser::Browser::getInstance | ( | ) | [inline, static] |
| String com::cosylab::cdb::browser::Browser::getPath | ( | ) | [inline] |
Returns the path of the current selected tree node.
References currentLocation.
Referenced by actionPerformed().
| static void com::cosylab::cdb::browser::Browser::main | ( | String[] | args | ) | [inline, static] |
The main method.
| args | the IOR (Input Output reference) which represents the DAL access parameters. |
References createGUI(), getInstance(), instance, and strIOR.
| void com::cosylab::cdb::browser::Browser::setLeftComp | ( | ) | [inline] |
Sets the cdb Tree in the left side of the GUI.
References dividerLocation, splitPane, and strIOR.
Referenced by actionPerformed(), and createGUI().
| void com::cosylab::cdb::browser::Browser::setPath | ( | String | newLoc | ) | [inline] |
Updates the location text field.
| newLoc | the new selected location. |
References currentLocation.
Referenced by actionPerformed().
| void com::cosylab::cdb::browser::Browser::setRightComp | ( | JComponent | component, | |
| boolean | showButtons | |||
| ) | [inline] |
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. |
References dividerLocation, resetData, saveChanges, and splitPane.
Referenced by actionPerformed(), createGUI(), and createTabbedPane().
JTextField com::cosylab::cdb::browser::Browser::currentLocation [private] |
Text Field that shows the selected tree path. Located on top of the Browsers GUI.
Referenced by createGUI(), getPath(), and setPath().
final int com::cosylab::cdb::browser::Browser::dividerLocation = 240 [private] |
The location where the separation occurs.
Referenced by setLeftComp(), and setRightComp().
Browser com::cosylab::cdb::browser::Browser::instance = null [static, private] |
The instance of the Browser class used during execution.
Referenced by getInstance(), and main().
JTextArea com::cosylab::cdb::browser::Browser::messageTextArea [private] |
The message text area (Bottom of the GUI)
Referenced by actionPerformed(), createGUI(), and display().
JButton com::cosylab::cdb::browser::Browser::refreshTree = new JButton(" Refrest CDB Tree ") [private] |
Button used to refresh the CDB tree (located on top of the CDB tree).
Referenced by actionPerformed(), and createGUI().
final JButton com::cosylab::cdb::browser::Browser::resetData = new JButton(" Reset Data ") [private] |
Button used to reset an XML record (located on top of the tabbed pane).
Referenced by actionPerformed(), buttonsEnabled(), createGUI(), enableButtons(), and setRightComp().
final JButton com::cosylab::cdb::browser::Browser::saveChanges = new JButton(" Save Changes to XML record ") [private] |
Button used to Save Changes to an XML record (located on top of the tabbed pane).
Referenced by actionPerformed(), buttonsEnabled(), createGUI(), enableButtons(), and setRightComp().
JSplitPane com::cosylab::cdb::browser::Browser::splitPane [private] |
JSlit Pane used to separete the CDB tree and the tabbed Pane window.
Referenced by createGUI(), setLeftComp(), and setRightComp().
String com::cosylab::cdb::browser::Browser::strIOR = null [static, private] |
The IOR (Input Output reference) string which represents the DAL access parameters.
Referenced by main(), and setLeftComp().
final String com::cosylab::cdb::browser::Browser::titleCol1 = "ATTRIBUTE NAME" [private] |
Referenced by createTabbedPane().
final String com::cosylab::cdb::browser::Browser::titleCol2 = "ATTRIBUTE VALUE" [private] |
Referenced by createTabbedPane().
1.6.2