com::cosylab::cdb::browser::CDBLogic Class Reference

Inheritance diagram for com::cosylab::cdb::browser::CDBLogic:
Inheritance graph
[legend]
Collaboration diagram for com::cosylab::cdb::browser::CDBLogic:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void treeExpanded (TreeExpansionEvent event)
void treeCollapsed (TreeExpansionEvent event)
void valueChanged (TreeSelectionEvent event)
void keyPressed (KeyEvent e)
void keyReleased (KeyEvent e)
void keyTyped (KeyEvent e)

Static Public Member Functions

static JTree setUpCDBTree (String strIOR)
static void setDAL (DAL dal)
static void setKey (String key)
static String getKey ()
static Object[][] getData (LinkedHashMap attributes)
static void saveXMLString (boolean ok)
static void resetXMLString ()
static void resetTable ()
static void saveTable ()
static void addListener (JTextArea XMLArea)
static boolean isXMLTabSelected ()
static void clearCache ()
static String stringPath (TreePath tp)
static void clearHashMaps ()
static String getCurl ()
static void addNode ()
static void deleteNode ()

Static Public Attributes

static boolean XMLStringChanged = false

Static Package Attributes

static JTree CDBTree = null
static final String titleCol1 = "ATTRIBUTE NAME"
static final String titleCol2 = "ATTRIBUTE VALUE"
static final String rootPrefix = "/root"
static final int tableIndex = 0
static final int xmlIndex = 1
static boolean tableChanged = false
static boolean XMLIndexEnabled = false
static HashMap tabbedPanes = new HashMap()
static HashMap tables = new HashMap()
static HashMap tableModels = new HashMap()
static HashMap xmls = new HashMap()
static JTabbedPane selectedTabbedPane
static JTextArea selectedXMLArea
static CDBTable selectedTable
static CDBTableModel selectedTableModel

Static Private Attributes

static DAL dal
static WDAL wdal = null
static JDAL jdal = null
static String hashMapKey
static String originalXMLString = null
static boolean tableIndexEnabled = false

Member Function Documentation

static void com::cosylab::cdb::browser::CDBLogic::addListener ( JTextArea  XMLArea  )  [inline, static]

Add a key listener to the XML text Area.

static void com::cosylab::cdb::browser::CDBLogic::addNode (  )  [inline, static]
static void com::cosylab::cdb::browser::CDBLogic::clearCache (  )  [inline, static]
static void com::cosylab::cdb::browser::CDBLogic::clearHashMaps (  )  [inline, static]

remove all elements inside HashMaps.

References selectedTabbedPane, selectedTable, selectedTableModel, selectedXMLArea, tabbedPanes, tableModels, tables, and xmls.

static void com::cosylab::cdb::browser::CDBLogic::deleteNode (  )  [inline, static]
static String com::cosylab::cdb::browser::CDBLogic::getCurl (  )  [inline, static]

References rootPrefix.

Referenced by addNode(), and deleteNode().

static Object [][] com::cosylab::cdb::browser::CDBLogic::getData ( LinkedHashMap  attributes  )  [inline, static]

Creates a two dimensional array used to create the tables data.

Parameters:
hashM the data of the table.
static String com::cosylab::cdb::browser::CDBLogic::getKey (  )  [inline, static]

Get the current key.

Returns:
the current key.

References hashMapKey.

static boolean com::cosylab::cdb::browser::CDBLogic::isXMLTabSelected (  )  [inline, static]

Checks if any XML tab is selected.

Returns:
true if XML tab is selected, false otherwise

References selectedTabbedPane, and xmlIndex.

void com::cosylab::cdb::browser::CDBLogic::keyPressed ( KeyEvent  e  )  [inline]

Invoked when a key has been pressed (inside a XML text area).

References CDBTree, originalXMLString, selectedTabbedPane, selectedXMLArea, tableIndex, tableIndexEnabled, and XMLStringChanged.

void com::cosylab::cdb::browser::CDBLogic::keyReleased ( KeyEvent  e  )  [inline]

Invoked when a key has been released.

void com::cosylab::cdb::browser::CDBLogic::keyTyped ( KeyEvent  e  )  [inline]

Invoked when a key has been typed.

static void com::cosylab::cdb::browser::CDBLogic::resetTable (  )  [inline, static]
static void com::cosylab::cdb::browser::CDBLogic::resetXMLString (  )  [inline, static]

Reset the XML String of the selected tabbed pane to its original value No interaction with jDAL needed.

References CDBTree, originalXMLString, selectedTabbedPane, selectedXMLArea, tableIndex, tableIndexEnabled, and XMLStringChanged.

static void com::cosylab::cdb::browser::CDBLogic::saveTable (  )  [inline, static]
static void com::cosylab::cdb::browser::CDBLogic::saveXMLString ( boolean  ok  )  [inline, static]
static void com::cosylab::cdb::browser::CDBLogic::setDAL ( DAL  dal  )  [inline, static]

Set the DAL server.

References jdal, and wdal.

static void com::cosylab::cdb::browser::CDBLogic::setKey ( String  key  )  [inline, static]

Sets the key of all hash maps used to store the data.

Parameters:
key the unique key of the next entry to be stored.

References hashMapKey.

static JTree com::cosylab::cdb::browser::CDBLogic::setUpCDBTree ( String  strIOR  )  [inline, static]

Create the CDB Tree.

References CDBTree.

static String com::cosylab::cdb::browser::CDBLogic::stringPath ( TreePath  tp  )  [inline, static]

Return a String representation of the selected path.

Parameters:
tp the selected Tree Path

Referenced by treeCollapsed(), treeExpanded(), and valueChanged().

void com::cosylab::cdb::browser::CDBLogic::treeCollapsed ( TreeExpansionEvent  event  )  [inline]

Called whenever an item in the tree has been collapsed.

Parameters:
event the event that characterizes the change.

References CDBTree, and stringPath().

void com::cosylab::cdb::browser::CDBLogic::treeExpanded ( TreeExpansionEvent  event  )  [inline]

Called whenever an item in the tree has been expanded.

Parameters:
event the event that characterizes the change.

References CDBTree, and stringPath().

void com::cosylab::cdb::browser::CDBLogic::valueChanged ( TreeSelectionEvent  event  )  [inline]

Called whenever the value of the selection changes.

Parameters:
event the event that characterizes the change.

References selectedTabbedPane, selectedTable, selectedTableModel, selectedXMLArea, stringPath(), tabbedPanes, tableModels, tables, and xmls.


Member Data Documentation

JTree com::cosylab::cdb::browser::CDBLogic::CDBTree = null [static, package]

Instance of the DAL server.

The string is used as a key for the hashMaps used to store the components. String is the full tree paht of the component. (set in BrowserJNDIContext & BrowserJNDIXMLContext).

Referenced by getKey(), and setKey().

Reference to JDAL interface if it is implemented by DAL

Referenced by clearCache(), and setDAL().

Stores the original XML String how it is before the user starts editing

Referenced by keyPressed(), resetXMLString(), and saveXMLString().

final String com::cosylab::cdb::browser::CDBLogic::rootPrefix = "/root" [static, package]

The prefix added to each curl

Referenced by getCurl(), and saveXMLString().

The currently selected tabbed pane (can be null).

Referenced by clearHashMaps(), isXMLTabSelected(), keyPressed(), resetTable(), resetXMLString(), saveTable(), saveXMLString(), and valueChanged().

The currently selected table component (can be null).

Referenced by clearHashMaps(), resetTable(), saveTable(), and valueChanged().

The currently selected table model (can be null).

Referenced by clearHashMaps(), resetTable(), saveTable(), and valueChanged().

The currently selected XML component (can be null).

Referenced by clearHashMaps(), keyPressed(), resetXMLString(), saveXMLString(), and valueChanged().

HashMap com::cosylab::cdb::browser::CDBLogic::tabbedPanes = new HashMap() [static, package]

HashMap that stored the tabbed panes (JTebbedPane).

Referenced by clearHashMaps(), and valueChanged().

boolean com::cosylab::cdb::browser::CDBLogic::tableChanged = false [static, package]

Boolean that tells id the table has been edited.

Referenced by resetTable(), and saveTable().

final int com::cosylab::cdb::browser::CDBLogic::tableIndex = 0 [static, package]

The index of the tab containing the Table.

Referenced by keyPressed(), resetXMLString(), and saveXMLString().

Boolean that tells if a tabbed pane has a table tab. If false -> no table view available.

Referenced by keyPressed(), resetXMLString(), and saveXMLString().

HashMap com::cosylab::cdb::browser::CDBLogic::tableModels = new HashMap() [static, package]

HashMap that stores the table models (CDBTableModel)

Referenced by clearHashMaps(), and valueChanged().

HashMap com::cosylab::cdb::browser::CDBLogic::tables = new HashMap() [static, package]

HashMap that stores the tables (CDBTable).

Referenced by clearHashMaps(), and valueChanged().

final String com::cosylab::cdb::browser::CDBLogic::titleCol1 = "ATTRIBUTE NAME" [static, package]

The name of the first table column.

final String com::cosylab::cdb::browser::CDBLogic::titleCol2 = "ATTRIBUTE VALUE" [static, package]

The name of the second table column.

Reference to writable DAL interface if it is implemented by DAL

Referenced by addNode(), deleteNode(), saveTable(), saveXMLString(), and setDAL().

final int com::cosylab::cdb::browser::CDBLogic::xmlIndex = 1 [static, package]

The index of the tab containing the XML String.

Referenced by isXMLTabSelected(), resetTable(), and saveTable().

boolean com::cosylab::cdb::browser::CDBLogic::XMLIndexEnabled = false [static, package]

Boolean that tells if a tabbed pane has a XML tab. If false -> no XML View.

Referenced by resetTable(), and saveTable().

HashMap com::cosylab::cdb::browser::CDBLogic::xmls = new HashMap() [static, package]

HashMap that stores the XML components (JTextArea).

Referenced by clearHashMaps(), and valueChanged().

Boolean that tells if the XML string has been edited.

Referenced by keyPressed(), resetXMLString(), and saveXMLString().


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2