***  This class is subject to change   ***

com.sas.dataselectors.filters
Class AbstractFilterLogicBaseNode

java.lang.Object
  |
  +--javax.swing.tree.DefaultMutableTreeNode
        |
        +--com.sas.dataselectors.filters.AbstractFilterLogicBaseNode
All Implemented Interfaces:
FilterLogicBaseNodeInterface,
Direct Known Subclasses:
DefaultFilterLogicAndNode, DefaultFilterLogicNotNode, DefaultFilterLogicOrNode, DefaultFilterLogicTestNode, FilterReferenceNode, LogicalConditionNode, NotNode

public abstract class AbstractFilterLogicBaseNode
extends javax.swing.tree.DefaultMutableTreeNode
implements FilterLogicBaseNodeInterface

This thin wrapper for a Vector supplies the basic functionality of a filter logic node. Additional node features will be supplied by sub-classes.

See Also:
Serialized Form

Field Summary
protected  String description
           
protected  String label
           
protected  PropertyChangeSupport propertyChangeSupport
           
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
AbstractFilterLogicBaseNode()
           
AbstractFilterLogicBaseNode(FilterLogicBaseNodeInterface other)
           
AbstractFilterLogicBaseNode(Object userObject)
           
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
          Add a PropertyChangeListener to the adapter.
 Object clone()
          Creates a new node with the same user object, label, and description.
 void dispose()
          Clean up and free any resources help by this node.
protected  void firePropertyChange(PropertyChangeEvent evt)
          Send a PropertyChangeEvent to any listeners added to the adapter.
protected  void firePropertyChange(String propName, Object oldValue, Object newValue)
          Send a PropertyChangeEvent to any listeners added to the adapter.
 FilterLogicBaseNodeInterface getChildLogicNodeAt(int childIndex)
          Returns the child node at a specific index
 String getFilterDescription()
          Returns the description for this node
 String getFilterLabel()
          get the label for this logical node
 int getIndex(TreeNode aChild)
          Returns the index of the specified child in this node's child array.
 int getMaxChildren()
          Return the maximum number of child nodes allowed -1 = unlimited 0 = none
 FilterLogicBaseNodeInterface getParentLogicNode()
          Returns the parent node
 void removePropertyChangeListener(PropertyChangeListener listener)
          Remove a PropertyChangeListener from the adapter.
 void setFilterDescription(String string)
          Sets the description for this node.
 void setFilterLabel(String string)
          Sets the label for this node.
 void setUserObject(Object userObject)
           
 
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.sas.dataselectors.filters.FilterLogicBaseNodeInterface
getUserObject
 
Methods inherited from interface javax.swing.tree.TreeNode
children, getAllowsChildren, getChildAt, getChildCount, getParent, isLeaf
 

Field Detail

label

protected String label

description

protected String description

propertyChangeSupport

protected PropertyChangeSupport propertyChangeSupport
Constructor Detail

AbstractFilterLogicBaseNode

public AbstractFilterLogicBaseNode()

AbstractFilterLogicBaseNode

public AbstractFilterLogicBaseNode(Object userObject)
Parameters:
userObject -  

AbstractFilterLogicBaseNode

public AbstractFilterLogicBaseNode(FilterLogicBaseNodeInterface other)
Method Detail

clone

public Object clone()
Creates a new node with the same user object, label, and description. The children and parent nodes are not included in the new node.
Overrides:
clone in class DefaultMutableTreeNode
Returns:
a new node as a copy of this one

getFilterLabel

public String getFilterLabel()
Description copied from interface: FilterLogicBaseNodeInterface
get the label for this logical node
Specified by:
getFilterLabel in interface FilterLogicBaseNodeInterface

getFilterDescription

public String getFilterDescription()
Description copied from interface: FilterLogicBaseNodeInterface
Returns the description for this node
Specified by:
getFilterDescription in interface FilterLogicBaseNodeInterface

getMaxChildren

public int getMaxChildren()
Description copied from interface: FilterLogicBaseNodeInterface
Return the maximum number of child nodes allowed -1 = unlimited 0 = none
Specified by:
getMaxChildren in interface FilterLogicBaseNodeInterface
Following copied from interface: com.sas.dataselectors.filters.FilterLogicBaseNodeInterface
Returns:
int (number allowed)

getChildLogicNodeAt

public FilterLogicBaseNodeInterface getChildLogicNodeAt(int childIndex)
Description copied from interface: FilterLogicBaseNodeInterface
Returns the child node at a specific index
Specified by:
getChildLogicNodeAt in interface FilterLogicBaseNodeInterface
Following copied from interface: com.sas.dataselectors.filters.FilterLogicBaseNodeInterface
Returns:
FilterLogicBaseNodeInterface

getParentLogicNode

public FilterLogicBaseNodeInterface getParentLogicNode()
Description copied from interface: FilterLogicBaseNodeInterface
Returns the parent node
Specified by:
getParentLogicNode in interface FilterLogicBaseNodeInterface
Following copied from interface: com.sas.dataselectors.filters.FilterLogicBaseNodeInterface
Returns:
FilterLogicBaseNodeInterface

dispose

public void dispose()
Description copied from interface: FilterLogicBaseNodeInterface
Clean up and free any resources help by this node.
Specified by:
dispose in interface FilterLogicBaseNodeInterface

setFilterDescription

public void setFilterDescription(String string)
Sets the description for this node.
Parameters:
string - the new description

setFilterLabel

public void setFilterLabel(String string)
Sets the label for this node.
Parameters:
string - the new label

setUserObject

public void setUserObject(Object userObject)
Overrides:
setUserObject in class DefaultMutableTreeNode

getIndex

public int getIndex(TreeNode aChild)
Returns the index of the specified child in this node's child array. If the specified node is not a child of this node, returns -1. This method performs a linear search and is O(n) where n is the number of children.
Specified by:
getIndex in interface TreeNode
Overrides:
getIndex in class DefaultMutableTreeNode
Parameters:
aChild - the TreeNode to search for among this node's children
Returns:
an int giving the index of the node in this node's child array, or -1 if the specified node is a not a child of this node
Throws:
IllegalArgumentException - if aChild is null

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Add a PropertyChangeListener to the adapter.
Parameters:
listener - the PropertyChangeListener to be notified when a PropertyChangeEvent occurs

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Remove a PropertyChangeListener from the adapter.
Parameters:
listener - the PropertyChangeListener to stop being notified when a PropertyChangeEvent occurs

firePropertyChange

protected void firePropertyChange(PropertyChangeEvent evt)
Send a PropertyChangeEvent to any listeners added to the adapter.

firePropertyChange

protected void firePropertyChange(String propName,
                                  Object oldValue,
                                  Object newValue)
Send a PropertyChangeEvent to any listeners added to the adapter.

***  This class is subject to change   ***




Copyright © 2005 SAS Institute Inc. All Rights Reserved.
javadoc generated Thu, 16 Feb 2006 01:55:42