Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

com::cosylab::cdb::browser::Browser Class Reference

Collaboration diagram for com::cosylab::cdb::browser::Browser:

Collaboration graph
[legend]
List of all members.

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

Browser getInstance ()
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

Browser instance = null
String strIOR = null

Detailed Description

This class is responsible for initialising and placing all Components inside the GUI.

Author:
Hernan Raffi
Version:
2.0


Constructor & Destructor Documentation

com::cosylab::cdb::browser::Browser::Browser  )  [inline, package]
 

Constructor of the Browser class.


Member Function Documentation

void com::cosylab::cdb::browser::Browser::actionPerformed ActionEvent  e  )  [inline]
 

Invoked when an action occurs (User presses the button).

Parameters:
e A semantic event which indicates that a component-defined action occured.

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.

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).

void com::cosylab::cdb::browser::Browser::createTabbedPane LinkedHashMap  attributes,
String  XML
[inline]
 

Create the tabbed pane with two tabs (Table View and XML View).

Parameters:
nodeHashMap data of the entry (null is possible).
xml XML record of the node (null is possible).

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.

Parameters:
message the text to be added.
newLine dispalay message in the next (new) line.

void com::cosylab::cdb::browser::Browser::enableButtons boolean  enable  )  [inline]
 

Enables/Disables both buttons: saveChanges & resetData

Parameters:
enable enable or disable both buttons.

Browser com::cosylab::cdb::browser::Browser::getInstance  )  [inline, static]
 

Only one instance of the Browser class can be created at any time during program execution.

Returns:
always the same instance of the Browser class.

String com::cosylab::cdb::browser::Browser::getPath  )  [inline]
 

Returns the path of the current selected tree node.

Returns:
String current selected tree path.

void com::cosylab::cdb::browser::Browser::main String[]  args  )  [inline, static]
 

The main method.

Parameters:
args the IOR (Input Output reference) which represents the DAL access parameters.

void com::cosylab::cdb::browser::Browser::setLeftComp  )  [inline]
 

Sets the cdb Tree in the left side of the GUI.

void com::cosylab::cdb::browser::Browser::setPath String  newLoc  )  [inline]
 

Updates the location text field.

Parameters:
newLoc the new selected location.

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.

Parameters:
component the component that is added to the right side of the GUI.
showButtons true only if component is instance of JTabbedPane.


Member Data Documentation

JTextField com::cosylab::cdb::browser::Browser::currentLocation [private]
 

Text Field that shows the selected tree path. Located on top of the Browsers GUI.

final int com::cosylab::cdb::browser::Browser::dividerLocation = 240 [private]
 

The location where the separation occurs.

Browser com::cosylab::cdb::browser::Browser::instance = null [static, private]
 

The instance of the Browser class used during execution.

JTextArea com::cosylab::cdb::browser::Browser::messageTextArea [private]
 

The message text area (Bottom of the GUI)

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).

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).

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).

JSplitPane com::cosylab::cdb::browser::Browser::splitPane [private]
 

JSlit Pane used to separete the CDB tree and the tabbed Pane window.

String com::cosylab::cdb::browser::Browser::strIOR = null [static, private]
 

The IOR (Input Output reference) string which represents the DAL access parameters.

final String com::cosylab::cdb::browser::Browser::titleCol1 = "ATTRIBUTE NAME" [private]
 

final String com::cosylab::cdb::browser::Browser::titleCol2 = "ATTRIBUTE VALUE" [private]
 


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 03:12:13 2009 for ACS Java API by doxygen 1.3.8