Public Member Functions | Static Public Member Functions | Package Functions

com.cosylab.cdb.browser.Browser Class Reference

Inherits javax::swing::JFrame, and java::awt::event::ActionListener.

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

static Browser getInstance ()
static void main (String[]args)

Package Functions

 Browser ()

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 (  )  [package]

Member Function Documentation

void com.cosylab.cdb.browser.Browser.actionPerformed ( ActionEvent  e  ) 
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).

Parameters:
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.

Parameters:
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

Parameters:
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.

Returns:
always the same instance of the Browser class.

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.

Returns:
String current selected tree path.

Referenced by com.cosylab.cdb.browser.Browser.actionPerformed().

static void com.cosylab.cdb.browser.Browser.main ( String[]  args  )  [static]

The main method.

Parameters:
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.

Parameters:
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.

Parameters:
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().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties