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

alma::acs::gui::loglevel::tree::LogLvlTreeModel Class Reference

Inheritance diagram for alma::acs::gui::loglevel::tree::LogLvlTreeModel:

Inheritance graph
[legend]
Collaboration diagram for alma::acs::gui::loglevel::tree::LogLvlTreeModel:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LogLvlTreeModel (ORB theOrb, Logger theLogger)
void start () throws Exception
void stop ()
void refreshTree ()
DefaultMutableTreeNode findNode (DefaultMutableTreeNode node, String name, int handle)
void clientLoggedIn (ClientInfo clientInfo)
void clientLoggedOut (int clientHandle)
void componentLoggedIn (ComponentInfo compInfo)
void componentReleased (ComponentInfo compInfo)
void componentLoggedOut (int compHandle)
void containerLoggedIn (ContainerInfo contInfo)
void containerLoggedOut (int conthandle)
void showComponents (boolean show)
void showClients (boolean show)
Manager getManagerRef ()

Private Member Functions

void buildClientsNode ()
void buildContainersNode ()
void buildComponentsNode ()
String formatManagerLoc (String manLoc)
boolean checkNodeContent (DefaultMutableTreeNode node, String name, int handle)
void updateComponent (ComponentInfo info)
void removeComponent (int handle)
void removeFromComponentSubtree (int compHandle)
void addNode (TreeContentInfo newItem, DefaultMutableTreeNode node)

Private Attributes

AdministratorClient admin = null
ORB orb = null
Logger log = null
DefaultMutableTreeNode managerNode = null
DefaultMutableTreeNode clientsNode = new NoLeafNode("Clients")
DefaultMutableTreeNode containersNode = new NoLeafNode("Containers")
DefaultMutableTreeNode componentsNode = new NoLeafNode("Components")

Detailed Description

The model for the tree of containers/components

Author:
acaproni


Constructor & Destructor Documentation

alma::acs::gui::loglevel::tree::LogLvlTreeModel::LogLvlTreeModel ORB  theOrb,
Logger  theLogger
[inline]
 

Constructor


Member Function Documentation

void alma::acs::gui::loglevel::tree::LogLvlTreeModel::addNode TreeContentInfo  newItem,
DefaultMutableTreeNode  node
[inline, private]
 

Add an entry to a node. The new node is inserted ordered by its name.

Parameters:
newItem The new entry to add
node The node where the entry has to be addded

void alma::acs::gui::loglevel::tree::LogLvlTreeModel::buildClientsNode  )  [inline, private]
 

Build the node of clients by reading the active clients

Parameters:
clients 

void alma::acs::gui::loglevel::tree::LogLvlTreeModel::buildComponentsNode  )  [inline, private]
 

Build the list of components by reading the running components

Parameters:
container 

void alma::acs::gui::loglevel::tree::LogLvlTreeModel::buildContainersNode  )  [inline, private]
 

Build the node of containers by reading the active containers

boolean alma::acs::gui::loglevel::tree::LogLvlTreeModel::checkNodeContent DefaultMutableTreeNode  node,
String  name,
int  handle
[inline, private]
 

Check the content of the passed node. The check is done taking the content of the Node and checking if its name (or handle) is equal to the passed parameter. The comparison is done on the name if the name param is not null, otherwise on the handle.

If the node is the root, name is checked against the string or rootNode

Parameters:
node The node whose content has to be checked
name The name of the component/client/container If it is null, it is ignored
handle The handle (ignored if the name is not null)
Returns:
true if the name or the handle contained in the node are equal to the passed parameter false otherwise (even if the node is null)

void alma::acs::gui::loglevel::tree::LogLvlTreeModel::clientLoggedIn ClientInfo  clientInfo  )  [inline]
 

See also:
LogLevelListener

Implements alma::acs::gui::loglevel::tree::LogLevelListener.

void alma::acs::gui::loglevel::tree::LogLvlTreeModel::clientLoggedOut int  clientHandle  )  [inline]
 

See also:
LogLevelListener

Implements alma::acs::gui::loglevel::tree::LogLevelListener.

void alma::acs::gui::loglevel::tree::LogLvlTreeModel::componentLoggedIn ComponentInfo  compInfo  )  [inline]
 

See also:
LogLevelListener

Implements alma::acs::gui::loglevel::tree::LogLevelListener.

void alma::acs::gui::loglevel::tree::LogLvlTreeModel::componentLoggedOut int  compHandle  )  [inline]
 

See also:
LogLevelListener

Implements alma::acs::gui::loglevel::tree::LogLevelListener.

void alma::acs::gui::loglevel::tree::LogLvlTreeModel::componentReleased ComponentInfo  compInfo  )  [inline]
 

See also:
LogLevelListener

Implements alma::acs::gui::loglevel::tree::LogLevelListener.

void alma::acs::gui::loglevel::tree::LogLvlTreeModel::containerLoggedIn ContainerInfo  contInfo  )  [inline]
 

See also:
LogLevelListener

Implements alma::acs::gui::loglevel::tree::LogLevelListener.

void alma::acs::gui::loglevel::tree::LogLvlTreeModel::containerLoggedOut int  conthandle  )  [inline]
 

See also:
LogLevelListener

Implements alma::acs::gui::loglevel::tree::LogLevelListener.

DefaultMutableTreeNode alma::acs::gui::loglevel::tree::LogLvlTreeModel::findNode DefaultMutableTreeNode  node,
String  name,
int  handle
[inline]
 

Navigate the tree to find a container with the given name or handle. The search begins from the passed node and scans all the childs until it finds the node. The search is done comparing the name with the name of the item hold by the tree node and its childreen. If the name param is null, the handle is used.

The method is recursive.

Parameters:
node The root of the subtree to look for the node. If it is null, the search starts from the root.
name The name of the node i.e. the name of the client/conatainer/component hold by the node If null, the handle is used during the search
handle The handle of the client/component/container to search This param is used only if name is null
Returns:
The first node in the tree with the given mane null If such a node does not exist

String alma::acs::gui::loglevel::tree::LogLvlTreeModel::formatManagerLoc String  manLoc  )  [inline, private]
 

Fromat the manager loc in a more readable string

Parameters:
manLoc The managerLoc (like corbaloc::....)
Returns:
A humager readable string

Manager alma::acs::gui::loglevel::tree::LogLvlTreeModel::getManagerRef  )  [inline]
 

Return the manager reference

Returns:
The manager reference or null if the reference is not available

void alma::acs::gui::loglevel::tree::LogLvlTreeModel::refreshTree  )  [inline]
 

Build the tree. It read the clients, components and containers and add them to the tree.

void alma::acs::gui::loglevel::tree::LogLvlTreeModel::removeComponent int  handle  )  [inline, private]
 

Remove all the occurrencies of the component with the given handle from the tree

Parameters:
handle The handle of the component to remove

void alma::acs::gui::loglevel::tree::LogLvlTreeModel::removeFromComponentSubtree int  compHandle  )  [inline, private]
 

Remove a node from the subtree of components

Parameters:
compHandle The handle of the component to remove

void alma::acs::gui::loglevel::tree::LogLvlTreeModel::showClients boolean  show  )  [inline]
 

show/hide the clients subtree

Parameters:
show If true the clients node is set to visible

void alma::acs::gui::loglevel::tree::LogLvlTreeModel::showComponents boolean  show  )  [inline]
 

show/hide the components subtree

Parameters:
show If true the components node is set to visible

void alma::acs::gui::loglevel::tree::LogLvlTreeModel::start  )  throws Exception [inline]
 

Start the computation

Exceptions:
Exception if an error happens while connecting

void alma::acs::gui::loglevel::tree::LogLvlTreeModel::stop  )  [inline]
 

Terminate the computation

void alma::acs::gui::loglevel::tree::LogLvlTreeModel::updateComponent ComponentInfo  info  )  [inline, private]
 

Add a component to its container if it is not already there

Parameters:
info The component to add to the container


Member Data Documentation

AdministratorClient alma::acs::gui::loglevel::tree::LogLvlTreeModel::admin = null [private]
 

DefaultMutableTreeNode alma::acs::gui::loglevel::tree::LogLvlTreeModel::clientsNode = new NoLeafNode("Clients") [private]
 

DefaultMutableTreeNode alma::acs::gui::loglevel::tree::LogLvlTreeModel::componentsNode = new NoLeafNode("Components") [private]
 

DefaultMutableTreeNode alma::acs::gui::loglevel::tree::LogLvlTreeModel::containersNode = new NoLeafNode("Containers") [private]
 

Logger alma::acs::gui::loglevel::tree::LogLvlTreeModel::log = null [private]
 

DefaultMutableTreeNode alma::acs::gui::loglevel::tree::LogLvlTreeModel::managerNode = null [private]
 

ORB alma::acs::gui::loglevel::tree::LogLvlTreeModel::orb = null [private]
 


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