fipaos.platform.dfgui.swing
Class DFGUIFrame.DFGUIModel


class DFGUIFrame.DFGUIModel
implements TreeModel

The Tree model used with the DF GUI, which is used to show the real tree structure in the GUI.


Method Summary
 voidaddTreeModelListener(TreeModelListener listener)
          Add a listener to this model
 ObjectgetChild(Object p1, int p2)
          Returns the child (index given) of the given object.
 intgetChildCount(Object p1)
          How many children given object has.
 intgetIndexOfChild(Object p1, Object p2)
          Gives the index of the given child.
 java.lang.ObjectgetRoot()
          Returns the root node
 booleanisLeaf(java.lang.Object p1)
          Checks if the p1 is a leaf node.
 voidnotifyChanges()
          Notify all listeners of the changes.
 voidremoveTreeModelListener(TreeModelListener listener)
          Remove a listener.
 voidvalueForPathChanged(javax.swing.tree.TreePath p1, java.lang.Object p2)
          Value for the changed path (not implemented).

Method Detail

addTreeModelListener

public void addTreeModelListener(TreeModelListener listener)
Add a listener to this model
Parameters:
listener - the listener to be added

getChild

public Object getChild(Object p1, int p2)
Returns the child (index given) of the given object.
Parameters:
p1 - parent for the object
p2 - index of the child
Returns: child

getChildCount

public int getChildCount(Object p1)
How many children given object has.
Parameters:
p1 - parent
Returns: child count

getIndexOfChild

public int getIndexOfChild(Object p1, Object p2)
Gives the index of the given child.
Parameters:
p1 - parent
p2 - child
Returns: the index

getRoot

public java.lang.Object getRoot()
Returns the root node
Returns: the root node

isLeaf

public boolean isLeaf(java.lang.Object p1)
Checks if the p1 is a leaf node.
Parameters:
p1 - the node object
Returns: boolean, the result of the check

notifyChanges

public void notifyChanges()
Notify all listeners of the changes.

removeTreeModelListener

public void removeTreeModelListener(TreeModelListener listener)
Remove a listener.
Parameters:
listener - listener to be removed

valueForPathChanged

public void valueForPathChanged(javax.swing.tree.TreePath p1, java.lang.Object p2)
Value for the changed path (not implemented).
Parameters:
p1 - tree changed
p2 - changed object

Association Links

to Class java.util.List