wt.clients.beans.graph
Class DefaultGraphNode

java.lang.Object
  extended bywt.clients.beans.graph.DefaultGraphNode
All Implemented Interfaces:
Externalizable, GraphNode, Serializable
Direct Known Subclasses:
DefinerGraphNode, ExportGraphNode

public class DefaultGraphNode
extends Object
implements GraphNode, Externalizable

The position if the node should be displayed. If no position has been defined then the position is set to (0,0).

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
private  String description
           
static String DESCRIPTION
          Label for the attribute.
private  String icon
           
static String ICON
          Label for the attribute.
private  String key
           
static String KEY
          Label for the attribute.
static String LISTENER_LIST
          Label for the attribute.
private  EventListenerList listenerList
           
private  Point position
           
static String POSITION
          Label for the attribute.
private static String RESOURCE
           
static String SELECTED_ICON
          Label for the attribute.
private  String selectedIcon
           
(package private) static long serialVersionUID
           
private static String versionID
           
 
Constructor Summary
DefaultGraphNode()
           
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
           
private  void descriptionValidate(String a_Description)
           
private  void fireGraphNodeChanged(String propertyName, Object oldValue, Object newValue)
           
 String getDescription()
          Gets the value of the attribute: DESCRIPTION.
 String getIcon()
          Gets the value of the attribute: ICON.
 String getKey()
          Gets the value of the attribute: KEY.
 Point getPosition()
          Gets the value of the attribute: POSITION.
 String getSelectedIcon()
          Gets the value of the attribute: SELECTED_ICON.
private  void iconValidate(String a_Icon)
           
private  void keyValidate(String a_Key)
           
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
private  void readOldVersion(ObjectInput input, long readSerialVersionUID)
          Reads the non-transient fields of this class from an external source, which is not the current version.
 void removePropertyChangeListener(PropertyChangeListener listener)
           
private  void selectedIconValidate(String a_SelectedIcon)
           
 void setDescription(String a_Description)
          Sets the value of the attribute: DESCRIPTION.
 void setIcon(String a_Icon)
          Sets the value of the attribute: ICON.
 void setKey(String a_Key)
          Sets the value of the attribute: KEY.
 void setPosition(int x, int y)
           
 void setPosition(Point a_Position)
          Sets the value of the attribute: POSITION.
 void setSelectedIcon(String a_SelectedIcon)
          Sets the value of the attribute: SELECTED_ICON.
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASSNAME

private static final String CLASSNAME

versionID

private static final String versionID
See Also:
Constant Field Values

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

ICON

public static final String ICON
Label for the attribute.

See Also:
Constant Field Values

icon

private String icon

SELECTED_ICON

public static final String SELECTED_ICON
Label for the attribute.

See Also:
Constant Field Values

selectedIcon

private String selectedIcon

POSITION

public static final String POSITION
Label for the attribute.

See Also:
Constant Field Values

position

private Point position

DESCRIPTION

public static final String DESCRIPTION
Label for the attribute.

See Also:
Constant Field Values

description

private String description

KEY

public static final String KEY
Label for the attribute.

See Also:
Constant Field Values

key

private String key

LISTENER_LIST

public static final String LISTENER_LIST
Label for the attribute.

See Also:
Constant Field Values

listenerList

private EventListenerList listenerList

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values
Constructor Detail

DefaultGraphNode

public DefaultGraphNode()
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Specified by:
writeExternal in interface Externalizable
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Specified by:
readExternal in interface Externalizable
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readOldVersion

private void readOldVersion(ObjectInput input,
                            long readSerialVersionUID)
                     throws IOException,
                            ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
Throws:
IOException
ClassNotFoundException

getIcon

public String getIcon()
Gets the value of the attribute: ICON.

Specified by:
getIcon in interface GraphNode
Returns:
String

setIcon

public void setIcon(String a_Icon)
             throws WTPropertyVetoException
Sets the value of the attribute: ICON.

Parameters:
a_Icon -
Throws:
WTPropertyVetoException

iconValidate

private void iconValidate(String a_Icon)
                   throws WTPropertyVetoException
Parameters:
a_Icon -
Throws:
WTPropertyVetoException

getSelectedIcon

public String getSelectedIcon()
Gets the value of the attribute: SELECTED_ICON.

Specified by:
getSelectedIcon in interface GraphNode
Returns:
String

setSelectedIcon

public void setSelectedIcon(String a_SelectedIcon)
                     throws WTPropertyVetoException
Sets the value of the attribute: SELECTED_ICON.

Parameters:
a_SelectedIcon -
Throws:
WTPropertyVetoException

selectedIconValidate

private void selectedIconValidate(String a_SelectedIcon)
                           throws WTPropertyVetoException
Parameters:
a_SelectedIcon -
Throws:
WTPropertyVetoException

getPosition

public Point getPosition()
Gets the value of the attribute: POSITION.

Specified by:
getPosition in interface GraphNode
Returns:
Point

setPosition

public void setPosition(Point a_Position)
Sets the value of the attribute: POSITION.

Parameters:
a_Position -

getDescription

public String getDescription()
Gets the value of the attribute: DESCRIPTION.

Specified by:
getDescription in interface GraphNode
Returns:
String

setDescription

public void setDescription(String a_Description)
                    throws WTPropertyVetoException
Sets the value of the attribute: DESCRIPTION.

Parameters:
a_Description -
Throws:
WTPropertyVetoException

descriptionValidate

private void descriptionValidate(String a_Description)
                          throws WTPropertyVetoException
Parameters:
a_Description -
Throws:
WTPropertyVetoException

getKey

public String getKey()
Gets the value of the attribute: KEY.

Specified by:
getKey in interface GraphNode
Returns:
String

setKey

public void setKey(String a_Key)
            throws WTPropertyVetoException
Sets the value of the attribute: KEY.

Parameters:
a_Key -
Throws:
WTPropertyVetoException

keyValidate

private void keyValidate(String a_Key)
                  throws WTPropertyVetoException
Parameters:
a_Key -
Throws:
WTPropertyVetoException

fireGraphNodeChanged

private void fireGraphNodeChanged(String propertyName,
                                  Object oldValue,
                                  Object newValue)
Parameters:
propertyName -
oldValue -
newValue -

setPosition

public void setPosition(int x,
                        int y)
Specified by:
setPosition in interface GraphNode
Parameters:
x -
y -

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Specified by:
addPropertyChangeListener in interface GraphNode
Parameters:
listener -

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Specified by:
removePropertyChangeListener in interface GraphNode
Parameters:
listener -