dk.opi.io
Interface IOItemBrowseTreeNode

All Known Implementing Classes:
DefaultIOItemBrowseTreeNode

public interface IOItemBrowseTreeNode

This interface must be implemented by object hierarchies representing browse information about items (leafs) and groups (branches) on an communication server. This is the case for ie. OPC server, being capable of presenting available items in a tree-like format.

Please refer to OpcClientApi.getServerItemsInfo() for more detailed information on how to obtain instances of this class

Please refer to JTreeIOTreeNode, for an example on how to directly visualise the content of this class in a javax.swing.JTree

Since:
JOPCClient v1.200

Method Summary
 Enumeration children()
          Returns the children of the reciever as an Enumeration
 boolean getAllowsChildren()
          Returns true if the receiver allows children.
 IOItemBrowseTreeNode getChildAt(int childIndex)
          Returns the child IOItemBrowseTreeNode at index childIndex.
 int getChildCount()
          Returns the number of children IOItemBrowseTreeNodes the receiver contains
 int getIndex(IOItemBrowseTreeNode node)
          Returns the index of node in the receivers children.
 String getLongName()
          Returns the long representation of this item
 IOItemBrowseTreeNode getParent()
          Returns the parent IOItemBrowseTreeNode of the receiver
 String getShortName()
          Returns the short representation of this item
 boolean isLeaf()
          Returns true if the receiver is a leaf
 

Method Detail

getShortName

public String getShortName()
Returns the short representation of this item


getLongName

public String getLongName()
Returns the long representation of this item


getChildAt

public IOItemBrowseTreeNode getChildAt(int childIndex)
Returns the child IOItemBrowseTreeNode at index childIndex.

Parameters:
childIndex - the index of the node, 0..n
Returns:
the node representing the requested node

getChildCount

public int getChildCount()
Returns the number of children IOItemBrowseTreeNodes the receiver contains

Returns:
the number of children

getParent

public IOItemBrowseTreeNode getParent()
Returns the parent IOItemBrowseTreeNode of the receiver

Returns:
the parent node

getIndex

public int getIndex(IOItemBrowseTreeNode node)
Returns the index of node in the receivers children. If the receiver does not contain node, -1 will be returned.

Parameters:
node - an IOItemBrowseTreeNode value
Returns:
the index or -1 if the node was not found

getAllowsChildren

public boolean getAllowsChildren()
Returns true if the receiver allows children.

Returns:
a boolean value

isLeaf

public boolean isLeaf()
Returns true if the receiver is a leaf

Returns:
a boolean value

children

public Enumeration children()
Returns the children of the reciever as an Enumeration

Returns:
an Enumeration value