|
Keel 2.1RC2 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.excalibur.instrument.client.InstrumentManagerTreeModel
| Field Summary | |
private InstrumentManagerConnection |
m_connection |
private java.util.HashMap |
m_elementMap |
private InstrumentManagerClient |
m_lastClientThe last InstrumentManagerClient referenced. |
private int |
m_lastClientStateVersionThe state version of the last client. |
private javax.swing.tree.DefaultMutableTreeNode[] |
m_leasedSampleArray |
private java.util.HashMap |
m_leasedSampleMap |
private javax.swing.event.TreeModelListener[] |
m_listenerArray |
private java.util.ArrayList |
m_listeners |
private javax.swing.tree.DefaultMutableTreeNode |
m_root |
| Fields inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
|
| Constructor Summary | |
(package private) |
InstrumentManagerTreeModel(InstrumentManagerConnection connection) |
| Method Summary | |
void |
addTreeModelListener(javax.swing.event.TreeModelListener listener)Adds a listener for the TreeModelEvent posted after the tree changes. |
void |
closed(InstrumentManagerConnection connection)Called when the connection is closed. |
void |
deleted(InstrumentManagerConnection connection)Called when the connection is deleted. |
private void |
fireTreeNodesChanged(javax.swing.event.TreeModelEvent event) |
private void |
fireTreeNodesInserted(javax.swing.event.TreeModelEvent event) |
private void |
fireTreeNodesRemoved(javax.swing.event.TreeModelEvent event) |
private void |
fireTreeStructureChanged(javax.swing.event.TreeModelEvent event) |
java.lang.Object |
getChild(java.lang.Object parent, int index)Returns the child of parent at index index in the parent's child array. |
int |
getChildCount(java.lang.Object parent)Returns the number of children of parent. |
int |
getIndexOfChild(java.lang.Object parent, java.lang.Object child)Returns the index of child in parent. |
javax.swing.tree.DefaultMutableTreeNode |
getInstrumentableTreeNode(java.lang.String name)Returns a TreeNode for an Instrumentable given its name. |
javax.swing.tree.DefaultMutableTreeNode |
getInstrumentSampleTreeNode(java.lang.String name)Returns a TreeNode for an InstrumentSample given its name. |
javax.swing.tree.DefaultMutableTreeNode |
getInstrumentTreeNode(java.lang.String name)Returns a TreeNode for an Instrument given its name. |
private javax.swing.tree.DefaultMutableTreeNode[] |
getLeasedSampleArray()Returns an optimized array of TreeNodes representing the leased instrument samples in this tree model. |
private javax.swing.event.TreeModelListener[] |
getListeners()Returns an optimized array of the registered TreeModelListeners. |
java.lang.Object |
getRoot()Returns the root of the tree. |
boolean |
isLeaf(java.lang.Object node)Returns true if node is a leaf. |
void |
opened(InstrumentManagerConnection connection)Called when the connection is opened. |
(package private) void |
purgeExpiredSamples()Remove any instrument samples whose current leases have expired. |
(package private) void |
refreshModel()Refreshes the entire Tree Model with the latest information from the server. |
void |
removeTreeModelListener(javax.swing.event.TreeModelListener listener)Removes a listener previously added with addTreeModelListener(). |
(package private) void |
renewAllSampleLeases()Once a minute, all of the leased samples should be updated. |
(package private) void |
updateInstrument(InstrumentDescriptor instrumentDescriptor) |
(package private) void |
updateInstrument(InstrumentDescriptor instrumentDescriptor, javax.swing.tree.DefaultMutableTreeNode instrumentTreeNode, int oldStateVersion) |
private void |
updateInstrumentable(InstrumentableDescriptor instrumentableDescriptor, javax.swing.tree.DefaultMutableTreeNode instrumentableTreeNode, int oldStateVersion) |
private void |
updateInstrumentModelClient(InstrumentManagerClient client, javax.swing.tree.DefaultMutableTreeNode rootTreeNode, int oldStateVersion)Called to update the local view of the InstrumentManagerClient in the TreeeModel. |
(package private) void |
updateInstrumentSample(InstrumentSampleDescriptor sampleDescriptor) |
(package private) void |
updateInstrumentSample(InstrumentSampleDescriptor sampleDescriptor, javax.swing.tree.DefaultMutableTreeNode sampleTreeNode) |
void |
valueForPathChanged(javax.swing.tree.TreePath path, java.lang.Object newValue)Messaged when the user has altered the value for the item identified by path to newValue. |
| Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private final InstrumentManagerConnection m_connection
private InstrumentManagerClient m_lastClient
private int m_lastClientStateVersion
private javax.swing.tree.DefaultMutableTreeNode m_root
private java.util.ArrayList m_listeners
private javax.swing.event.TreeModelListener[] m_listenerArray
private java.util.HashMap m_elementMap
private java.util.HashMap m_leasedSampleMap
private javax.swing.tree.DefaultMutableTreeNode[] m_leasedSampleArray
| Constructor Detail |
InstrumentManagerTreeModel(InstrumentManagerConnection connection)
| Method Detail |
public void opened(InstrumentManagerConnection connection)
opened in interface InstrumentManagerConnectionListenerconnection - Connection which was opened.public void closed(InstrumentManagerConnection connection)
closed in interface InstrumentManagerConnectionListenerconnection - Connection which was closed.public void deleted(InstrumentManagerConnection connection)
deleted in interface InstrumentManagerConnectionListenerconnection - Connection which was deleted.public java.lang.Object getRoot()
getRoot in interface javax.swing.tree.TreeModel
public java.lang.Object getChild(java.lang.Object parent,
int index)
getChild in interface javax.swing.tree.TreeModelparent - a node in the tree, obtained from this data sourcepublic int getChildCount(java.lang.Object parent)
getChildCount in interface javax.swing.tree.TreeModelparent - a node in the tree, obtained from this data sourcepublic boolean isLeaf(java.lang.Object node)
isLeaf in interface javax.swing.tree.TreeModelnode - a node in the tree, obtained from this data source
public void valueForPathChanged(javax.swing.tree.TreePath path,
java.lang.Object newValue)
valueForPathChanged in interface javax.swing.tree.TreeModelpath - path to the node that the user has altered.newValue - the new value from the TreeCellEditor.
public int getIndexOfChild(java.lang.Object parent,
java.lang.Object child)
getIndexOfChild in interface javax.swing.tree.TreeModelpublic void addTreeModelListener(javax.swing.event.TreeModelListener listener)
addTreeModelListener in interface javax.swing.tree.TreeModellistener - the listener to addpublic void removeTreeModelListener(javax.swing.event.TreeModelListener listener)
removeTreeModelListener in interface javax.swing.tree.TreeModellistener - the listener to removeprivate javax.swing.event.TreeModelListener[] getListeners()
private void fireTreeNodesChanged(javax.swing.event.TreeModelEvent event)
private void fireTreeNodesInserted(javax.swing.event.TreeModelEvent event)
private void fireTreeNodesRemoved(javax.swing.event.TreeModelEvent event)
private void fireTreeStructureChanged(javax.swing.event.TreeModelEvent event)
public javax.swing.tree.DefaultMutableTreeNode getInstrumentableTreeNode(java.lang.String name)
name - Name of the Instrumentable.public javax.swing.tree.DefaultMutableTreeNode getInstrumentTreeNode(java.lang.String name)
name - Name of the Instrument.public javax.swing.tree.DefaultMutableTreeNode getInstrumentSampleTreeNode(java.lang.String name)
name - Name of the InstrumentSample.private javax.swing.tree.DefaultMutableTreeNode[] getLeasedSampleArray()
void renewAllSampleLeases()
void purgeExpiredSamples()
void refreshModel()
private void updateInstrumentModelClient(InstrumentManagerClient client,
javax.swing.tree.DefaultMutableTreeNode rootTreeNode,
int oldStateVersion)
client - The InstrumentModelClient to use for the update.oldStateVersion - The state version at the time of the last update.
private void updateInstrumentable(InstrumentableDescriptor instrumentableDescriptor,
javax.swing.tree.DefaultMutableTreeNode instrumentableTreeNode,
int oldStateVersion)
instrumentableDescriptor - The descriptor of the Instrumentable to update.instrumentableTreeNode - The tree node of the Instrumentable to update.oldStateVersion - The state version at the time of the last update.void updateInstrument(InstrumentDescriptor instrumentDescriptor)
instrumentDescriptor - The descriptor of the Instrument to update.
void updateInstrument(InstrumentDescriptor instrumentDescriptor,
javax.swing.tree.DefaultMutableTreeNode instrumentTreeNode,
int oldStateVersion)
instrumentDescriptor - The descriptor of the Instrument to update.instrumentTreeNode - The tree node of the Instrument to update.void updateInstrumentSample(InstrumentSampleDescriptor sampleDescriptor)
sampleDescriptor - The descriptor of the Instrument Sample to update.
void updateInstrumentSample(InstrumentSampleDescriptor sampleDescriptor,
javax.swing.tree.DefaultMutableTreeNode sampleTreeNode)
sampleDescriptor - The descriptor of the Instrument Sample to update.sampleTreeNode - The tree node of the Instrument Sample to update.
|
Keel 2.1RC2 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||