org.apache.excalibur.instrument.client
Class InstrumentSampleNodeData

java.lang.Object
  extended by org.apache.excalibur.instrument.client.NodeData
      extended by org.apache.excalibur.instrument.client.InstrumentSampleNodeData

 class InstrumentSampleNodeData
extends NodeData

Author:
Avalon Development Team

Field Summary
private static int ICON_SUBTYPE_CONF
           
private static int ICON_SUBTYPE_LEASE
           
private static int ICON_SUBTYPE_MAINTAINED_LEASE
           
private static int ICON_SUBTYPE_OLD
           
private static int ICON_TYPE_CNT
           
private static int ICON_TYPE_MAX
           
private static int ICON_TYPE_MEAN
           
private static int ICON_TYPE_MIN
           
private  boolean m_configured
           
private  InstrumentManagerConnection m_connection
           
private  InstrumentSampleData m_data
           
private static javax.swing.ImageIcon[][] m_icons
           
private  java.lang.String m_instrumentName
           
private  long m_interval
          Time interval of the sample points.
private  long m_leaseDuration
          The length of the maintained lease.
private  long m_leaseExpireTime
           
private  int m_size
          Number of points in the sample.
private  int m_type
          Type of the sample.
 
Fields inherited from class org.apache.excalibur.instrument.client.NodeData
EMPTY_MENU_ITEM_ARRAY, MEDIA_PATH
 
Constructor Summary
InstrumentSampleNodeData(java.lang.String instrumentName, InstrumentSampleData data, InstrumentManagerConnection connection)
           
 
Method Summary
 javax.swing.JMenuItem[] getCommonMenuItems()
          Returns an array of any menu items which will be displayed both in a popup menu and in the menus.
(package private)  InstrumentSampleData getData()
           
(package private)  javax.swing.ImageIcon getIcon()
          Get the icon to display for the node.
(package private)  long getInterval()
           
(package private)  long getLeaseDuration()
          Returns the length of the maintained lease.
(package private)  long getRemainingLeaseTime()
           
(package private)  int getSize()
           
(package private)  java.lang.String getToolTipText()
          Return the text to use for a tool tip on this node.
(package private)  int getType()
           
(package private)  boolean isConfigured()
           
(package private)  boolean isLeased()
           
(package private)  boolean isLeaseMaintained()
           
private static void loadTypeIcons(java.lang.ClassLoader cl, int type, java.lang.String prefix)
           
(package private)  void select()
          Called when the node is selected.
(package private)  void setLeaseDuration(long leaseDuration)
          Sets the maintained lease time.
(package private)  void setLeaseExpireTime(long leaseExpireTime)
           
(package private)  boolean update()
           
 
Methods inherited from class org.apache.excalibur.instrument.client.NodeData
getDescription, getName, getPopupMenu, getStateVersion, setDescription, toString, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ICON_TYPE_CNT

private static final int ICON_TYPE_CNT
See Also:
Constant Field Values

ICON_TYPE_MAX

private static final int ICON_TYPE_MAX
See Also:
Constant Field Values

ICON_TYPE_MEAN

private static final int ICON_TYPE_MEAN
See Also:
Constant Field Values

ICON_TYPE_MIN

private static final int ICON_TYPE_MIN
See Also:
Constant Field Values

ICON_SUBTYPE_CONF

private static final int ICON_SUBTYPE_CONF
See Also:
Constant Field Values

ICON_SUBTYPE_LEASE

private static final int ICON_SUBTYPE_LEASE
See Also:
Constant Field Values

ICON_SUBTYPE_MAINTAINED_LEASE

private static final int ICON_SUBTYPE_MAINTAINED_LEASE
See Also:
Constant Field Values

ICON_SUBTYPE_OLD

private static final int ICON_SUBTYPE_OLD
See Also:
Constant Field Values

m_icons

private static final javax.swing.ImageIcon[][] m_icons

m_instrumentName

private java.lang.String m_instrumentName

m_data

private InstrumentSampleData m_data

m_connection

private InstrumentManagerConnection m_connection

m_configured

private boolean m_configured

m_leaseExpireTime

private long m_leaseExpireTime

m_leaseDuration

private long m_leaseDuration
The length of the maintained lease.


m_type

private int m_type
Type of the sample.


m_size

private int m_size
Number of points in the sample.


m_interval

private long m_interval
Time interval of the sample points.

Constructor Detail

InstrumentSampleNodeData

InstrumentSampleNodeData(java.lang.String instrumentName,
                         InstrumentSampleData data,
                         InstrumentManagerConnection connection)
Method Detail

loadTypeIcons

private static void loadTypeIcons(java.lang.ClassLoader cl,
                                  int type,
                                  java.lang.String prefix)

getIcon

javax.swing.ImageIcon getIcon()
Get the icon to display for the node.

Specified by:
getIcon in class NodeData
Returns:
the icon to display for the node.

getToolTipText

java.lang.String getToolTipText()
Return the text to use for a tool tip on this node.

Specified by:
getToolTipText in class NodeData
Returns:
Tool Tip text. May be null, for no tool tip.

getCommonMenuItems

public javax.swing.JMenuItem[] getCommonMenuItems()
Returns an array of any menu items which will be displayed both in a popup menu and in the menus.

Overrides:
getCommonMenuItems in class NodeData
Returns:
An array of the common menu items.

select

void select()
Called when the node is selected.

Overrides:
select in class NodeData

getData

InstrumentSampleData getData()

isConfigured

boolean isConfigured()

isLeased

boolean isLeased()

isLeaseMaintained

boolean isLeaseMaintained()

getType

int getType()

getSize

int getSize()

getInterval

long getInterval()

update

boolean update()

getRemainingLeaseTime

long getRemainingLeaseTime()

setLeaseExpireTime

void setLeaseExpireTime(long leaseExpireTime)

setLeaseDuration

void setLeaseDuration(long leaseDuration)
Sets the maintained lease time. If 0 or less means that the the lease is not maintained.

Parameters:
leaseDuration - The maintained lease time.

getLeaseDuration

long getLeaseDuration()
Returns the length of the maintained lease.

Returns:
The length of the maintained lease.