CESE 1.4.7

com.simulogic.cese.properties
Class ExportTreeModel

java.lang.Object
  extended by javax.swing.tree.DefaultTreeModel
      extended by com.simulogic.cese.properties.ExportTreeModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.tree.TreeModel

public class ExportTreeModel
extends javax.swing.tree.DefaultTreeModel

Model for the export tree

See Also:
Serialized Form

Field Summary
static int SORT_DEF
          No sort
static int SORT_NAME
          Sort by name
static int SORT_TYPE
          Sort by type
 
Fields inherited from class javax.swing.tree.DefaultTreeModel
asksAllowsChildren, listenerList, root
 
Constructor Summary
ExportTreeModel()
          Default constructor
 
Method Summary
 void filterTree()
          Filters the tree to display only properties with specific attributes.
 java.lang.Object getChild(java.lang.Object parent, int index)
          Returns child for the object
 int getChildCount(java.lang.Object parent)
          Returns childs count
 int getIndexOfChild(java.lang.Object parent, java.lang.Object child)
          Returns index of child
 boolean isLeaf(java.lang.Object node)
          Checks if node is a leaf
 void setModelInfo(ModelInfo info)
          Set the tree model to represent the properties of the model
 void sortTree(int sort)
          Sorts the tree according to the sort type.
 
Methods inherited from class javax.swing.tree.DefaultTreeModel
addTreeModelListener, asksAllowsChildren, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getListeners, getPathToRoot, getPathToRoot, getRoot, getTreeModelListeners, insertNodeInto, nodeChanged, nodesChanged, nodeStructureChanged, nodesWereInserted, nodesWereRemoved, reload, reload, removeNodeFromParent, removeTreeModelListener, setAsksAllowsChildren, setRoot, valueForPathChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SORT_DEF

public static final int SORT_DEF
No sort

See Also:
Constant Field Values

SORT_NAME

public static final int SORT_NAME
Sort by name

See Also:
Constant Field Values

SORT_TYPE

public static final int SORT_TYPE
Sort by type

See Also:
Constant Field Values
Constructor Detail

ExportTreeModel

public ExportTreeModel()
Default constructor

Method Detail

setModelInfo

public void setModelInfo(ModelInfo info)
Set the tree model to represent the properties of the model

Parameters:
info - model info

isLeaf

public boolean isLeaf(java.lang.Object node)
Checks if node is a leaf

Specified by:
isLeaf in interface javax.swing.tree.TreeModel
Overrides:
isLeaf in class javax.swing.tree.DefaultTreeModel
Parameters:
node - node to check
Returns:
true if node is a leaf

getChild

public java.lang.Object getChild(java.lang.Object parent,
                                 int index)
Returns child for the object

Specified by:
getChild in interface javax.swing.tree.TreeModel
Overrides:
getChild in class javax.swing.tree.DefaultTreeModel
Parameters:
parent - parent object
index - index in parent branch
Returns:
child

getChildCount

public int getChildCount(java.lang.Object parent)
Returns childs count

Specified by:
getChildCount in interface javax.swing.tree.TreeModel
Overrides:
getChildCount in class javax.swing.tree.DefaultTreeModel
Parameters:
parent - parent object
Returns:
child count

getIndexOfChild

public int getIndexOfChild(java.lang.Object parent,
                           java.lang.Object child)
Returns index of child

Specified by:
getIndexOfChild in interface javax.swing.tree.TreeModel
Overrides:
getIndexOfChild in class javax.swing.tree.DefaultTreeModel
Parameters:
parent - parent object
child - child object
Returns:
child index

sortTree

public void sortTree(int sort)
Sorts the tree according to the sort type.

Parameters:
sort - sort type

filterTree

public void filterTree()
Filters the tree to display only properties with specific attributes.


CESE 1.4.7

Copyright (c) 1999 - 2007 Cell Electrophysiology Simulation Environment (CESE). All rights reserved.