JIDE 3.5.15

com.jidesoft.grid
Class AbstractNode

java.lang.Object
  extended by com.jidesoft.grid.AbstractNode
All Implemented Interfaces:
Node
Direct Known Subclasses:
AbstractExpandable, AbstractRow

public abstract class AbstractNode
extends Object
implements Node

An abstract implementation of Node.


Field Summary
protected  Expandable _parent
          Parent of this expandable.
static String PROPERTY_PARENT
           
 
Fields inherited from interface com.jidesoft.grid.Node
PROPERTY_ADJUSTING
 
Constructor Summary
AbstractNode()
          Constructs an AbstractExpandable.
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
          Adds a PropertyChangeListener to the listener list.
 void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
          Adds a PropertyChangeListener to the listener list for a specific property.
protected  void firePropertyChange(String propertyName, boolean oldValue, boolean newValue)
          Support for reporting bound property changes for boolean properties.
protected  void firePropertyChange(String propertyName, int oldValue, int newValue)
          Support for reporting bound property changes for integer properties.
protected  void firePropertyChange(String propertyName, Object oldValue, Object newValue)
          Support for reporting bound property changes for Object properties.
 int getLevel()
          Gets the level of the expandable.
 Node getNextSibling()
          Gets the next sibling if any.
 Expandable getParent()
          Gets the parent of this expandable.
 Node getPreviousSibling()
          Gets previous sibling of current node.
 PropertyChangeListener[] getPropertyChangeListeners()
          Returns an array of all the property change listeners registered on this component.
 PropertyChangeListener[] getPropertyChangeListeners(String propertyName)
          Returns an array of all the listeners which have been associated with the named property.
 void removePropertyChangeListener(PropertyChangeListener listener)
          Removes a PropertyChangeListener from the listener list.
 void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
          Removes a PropertyChangeListener from the listener list for a specific property.
 void setParent(Expandable parent)
          Sets the parent of this expandable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_parent

protected Expandable _parent
Parent of this expandable.


PROPERTY_PARENT

public static final String PROPERTY_PARENT
See Also:
Constant Field Values
Constructor Detail

AbstractNode

public AbstractNode()
Constructs an AbstractExpandable.

Method Detail

getLevel

public int getLevel()
Gets the level of the expandable.

Specified by:
getLevel in interface Node
Returns:
the level of the expandable

getParent

public Expandable getParent()
Gets the parent of this expandable.

Specified by:
getParent in interface Node
Returns:
the parent of this expandable

setParent

public void setParent(Expandable parent)
Sets the parent of this expandable.

Specified by:
setParent in interface Node
Parameters:
parent - new parent of this expandable

getNextSibling

public Node getNextSibling()
Gets the next sibling if any.

Specified by:
getNextSibling in interface Node
Returns:
the next sibling.

getPreviousSibling

public Node getPreviousSibling()
Description copied from interface: Node
Gets previous sibling of current node.

Specified by:
getPreviousSibling in interface Node
Returns:
the previous sibling.

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list.

Parameters:
listener - the PropertyChangeListener to be added
See Also:
removePropertyChangeListener(java.beans.PropertyChangeListener), getPropertyChangeListeners(), addPropertyChangeListener(String,java.beans.PropertyChangeListener)

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list. This method should be used to remove PropertyChangeListeners that were registered for all bound properties of this class.

If listener is null, no exception is thrown and no action is performed.

Parameters:
listener - the PropertyChangeListener to be removed
See Also:
addPropertyChangeListener(java.beans.PropertyChangeListener), getPropertyChangeListeners(), removePropertyChangeListener(String,java.beans.PropertyChangeListener)

getPropertyChangeListeners

public PropertyChangeListener[] getPropertyChangeListeners()
Returns an array of all the property change listeners registered on this component.

Returns:
all of this component's PropertyChangeListeners or an empty array if no property change listeners are currently registered
Since:
1.4
See Also:
addPropertyChangeListener(java.beans.PropertyChangeListener), removePropertyChangeListener(java.beans.PropertyChangeListener), getPropertyChangeListeners(String), PropertyChangeSupport.getPropertyChangeListeners()

addPropertyChangeListener

public void addPropertyChangeListener(String propertyName,
                                      PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list for a specific property.

Parameters:
propertyName - one of the property names listed above
listener - the PropertyChangeListener to be added
See Also:
removePropertyChangeListener(String,java.beans.PropertyChangeListener), getPropertyChangeListeners(String), addPropertyChangeListener(String,java.beans.PropertyChangeListener)

removePropertyChangeListener

public void removePropertyChangeListener(String propertyName,
                                         PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list for a specific property. This method should be used to remove PropertyChangeListeners that were registered for a specific bound property.

If listener is null, no exception is thrown and no action is performed.

Parameters:
propertyName - a valid property name
listener - the PropertyChangeListener to be removed
See Also:
addPropertyChangeListener(String,java.beans.PropertyChangeListener), getPropertyChangeListeners(String), removePropertyChangeListener(java.beans.PropertyChangeListener)

getPropertyChangeListeners

public PropertyChangeListener[] getPropertyChangeListeners(String propertyName)
Returns an array of all the listeners which have been associated with the named property.

Parameters:
propertyName - the property name.
Returns:
all of the PropertyChangeListeners associated with the named property or an empty array if no listeners have been added
See Also:
addPropertyChangeListener(String,java.beans.PropertyChangeListener), removePropertyChangeListener(String,java.beans.PropertyChangeListener), getPropertyChangeListeners()

firePropertyChange

protected void firePropertyChange(String propertyName,
                                  Object oldValue,
                                  Object newValue)
Support for reporting bound property changes for Object properties. This method can be called when a bound property has changed and it will send the appropriate PropertyChangeEvent to any registered PropertyChangeListeners.

Parameters:
propertyName - the property whose value has changed
oldValue - the property's previous value
newValue - the property's new value

firePropertyChange

protected void firePropertyChange(String propertyName,
                                  boolean oldValue,
                                  boolean newValue)
Support for reporting bound property changes for boolean properties. This method can be called when a bound property has changed and it will send the appropriate PropertyChangeEvent to any registered PropertyChangeListeners.

Parameters:
propertyName - the property whose value has changed
oldValue - the property's previous value
newValue - the property's new value

firePropertyChange

protected void firePropertyChange(String propertyName,
                                  int oldValue,
                                  int newValue)
Support for reporting bound property changes for integer properties. This method can be called when a bound property has changed and it will send the appropriate PropertyChangeEvent to any registered PropertyChangeListeners.

Parameters:
propertyName - the property whose value has changed
oldValue - the property's previous value
newValue - the property's new value

JIDE 3.5.15