com.sas.dataselectors.filters
Class AbstractFilterLogicBaseNode

com.sas.dataselectors.filters.AbstractFilterLogicBaseNode
All Implemented Interfaces:
FilterLogicBaseNodeInterface, java.io.Serializable, java.lang.Cloneable, javax.swing.tree.MutableTreeNode, javax.swing.tree.TreeNode
Direct Known Subclasses:
DefaultFilterLogicAndNode, DefaultFilterLogicNotNode, DefaultFilterLogicOrNode, DefaultFilterLogicTestNode, FilterReferenceNode, LogicalConditionNode, NotNode

public abstract class AbstractFilterLogicBaseNode
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  java.lang.String description
           
protected  java.lang.String label
           
protected  com.sas.beans.PropertyChangeSupport propertyChangeSupport
           
 
Constructor Summary
AbstractFilterLogicBaseNode()
           
AbstractFilterLogicBaseNode(FilterLogicBaseNodeInterface other)
           
AbstractFilterLogicBaseNode(java.lang.Object userObject)
           
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Add a PropertyChangeListener to the adapter.
 java.lang.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(com.sas.beans.PropertyChangeEvent evt)
          Send a PropertyChangeEvent to any listeners added to the adapter.
protected  void firePropertyChange(java.lang.String propName, java.lang.Object oldValue, java.lang.Object newValue)
          Send a PropertyChangeEvent to any listeners added to the adapter.
 FilterLogicBaseNodeInterface getChildLogicNodeAt(int childIndex)
          Returns the child node at a specific index
 java.lang.String getFilterDescription()
          Returns the description for this node
 java.lang.String getFilterLabel()
          get the label for this logical node
 int getIndex(javax.swing.tree.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(java.beans.PropertyChangeListener listener)
          Remove a PropertyChangeListener from the adapter.
 void setFilterDescription(java.lang.String string)
          Sets the description for this node.
 void setFilterLabel(java.lang.String string)
          Sets the label for this node.
 void setUserObject(java.lang.Object userObject)
           
 
Methods inherited from interface com.sas.dataselectors.filters.FilterLogicBaseNodeInterface
getUserObject
 

Field Detail

label

protected java.lang.String label

description

protected java.lang.String description

propertyChangeSupport

protected com.sas.beans.PropertyChangeSupport propertyChangeSupport
Constructor Detail

AbstractFilterLogicBaseNode

public AbstractFilterLogicBaseNode()

AbstractFilterLogicBaseNode

public AbstractFilterLogicBaseNode(java.lang.Object userObject)
Parameters:
userObject -

AbstractFilterLogicBaseNode

public AbstractFilterLogicBaseNode(FilterLogicBaseNodeInterface other)
Method Detail

clone

public java.lang.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 javax.swing.tree.DefaultMutableTreeNode
Returns:
a new node as a copy of this one

getFilterLabel

public java.lang.String getFilterLabel()
Description copied from interface: FilterLogicBaseNodeInterface
get the label for this logical node

Specified by:
getFilterLabel in interface FilterLogicBaseNodeInterface

getFilterDescription

public java.lang.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
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
Returns:
FilterLogicBaseNodeInterface

getParentLogicNode

public FilterLogicBaseNodeInterface getParentLogicNode()
Description copied from interface: FilterLogicBaseNodeInterface
Returns the parent node

Specified by:
getParentLogicNode in interface 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(java.lang.String string)
Sets the description for this node.

Parameters:
string - the new description

setFilterLabel

public void setFilterLabel(java.lang.String string)
Sets the label for this node.

Parameters:
string - the new label

setUserObject

public void setUserObject(java.lang.Object userObject)
Specified by:
setUserObject in interface javax.swing.tree.MutableTreeNode
Overrides:
setUserObject in class javax.swing.tree.DefaultMutableTreeNode

getIndex

public int getIndex(javax.swing.tree.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 javax.swing.tree.TreeNode
Overrides:
getIndex in class javax.swing.tree.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:
java.lang.IllegalArgumentException - if aChild is null

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add a PropertyChangeListener to the adapter.

Parameters:
listener - the PropertyChangeListener to be notified when a PropertyChangeEvent occurs

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove a PropertyChangeListener from the adapter.

Parameters:
listener - the PropertyChangeListener to stop being notified when a PropertyChangeEvent occurs

firePropertyChange

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


firePropertyChange

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




Copyright © 2009 SAS Institute Inc. All Rights Reserved.