ChainGraphVertex Class Reference

Inheritance diagram for ChainGraphVertex:
Collaboration diagram for ChainGraphVertex:

List of all members.


Detailed Description

Abstract prototype of a vertex. Has a size (width and height), a location (x and y position) and a list of incoming and outgoing connections. Use subclasses to instantiate a specific vertex (we currently have one only).

See also:
de.uni_koeln.spinfo.tesla.client.ui.editors.gef.graphicalChainEditor.model.AnnotationVertex
de.uni_koeln.spinfo.tesla.client.ui.editors.gef.graphicalChainEditor.model.ComponentVertex
Author:
Elias Volanakis (original), sschwieb, fsteeg

Public Methods

 ChainGraphVertex ()
Object getAdapter (Class adapterClass)
void addConnection (Connection conn)
IPropertyDescriptor[] getPropertyDescriptors ()
Object getPropertyValue (Object propertyId)
Dimension getSize ()
List< ConnectiongetOutgoingConnections ()
List< ConnectiongetIncomingConnections ()
void removeConnection (Connection conn)
void setPropertyValue (Object propertyId, Object value)
void setSize (Dimension newSize)
synchronized void addPropertyChangeListener (PropertyChangeListener l)
Object getEditableValue ()
boolean isPropertySet (Object id)
synchronized void removePropertyChangeListener (PropertyChangeListener l)
void resetPropertyValue (Object id)

Public Static Fields

static final String LOCATION_PROP = "ChainGraphVertex.Location"
static final String SIZE_PROP = "ChainGraphVertex.Size"
static final String SOURCE_CONNECTIONS_PROP = "ChainGraphVertex.SourceConn"
static final String TARGET_CONNECTIONS_PROP = "ChainGraphVertex.TargetConn"

Protected Methods

void firePropertyChange (String property, Object oldValue, Object newValue)

Static Package Functions

 [static initializer]

Constructors

Creates a new vertex with a dimension as sepcified in LayoutSettings


Method Details

[static initializer] ( ) [static, package]

Initializes the property descriptors array.

See also:
getPropertyDescriptors()
getPropertyValue(Object)
setPropertyValue(Object, Object)
void addConnection ( Connection  conn)

Add an incoming or outgoing connection to this shape.

Parameters:
conna non-null connection instance
Exceptions:
IllegalArgumentExceptionif the connection is null or has not distinct endpoints
synchronized void addPropertyChangeListener ( PropertyChangeListener  l) [inherited]

Attach a non-null PropertyChangeListener to this object.

Parameters:
la non-null PropertyChangeListener instance
Exceptions:
IllegalArgumentExceptionif the parameter is null
void firePropertyChange ( String  property,
Object  oldValue,
Object  newValue 
) [protected, inherited]

Report a property change to registered listeners (for example edit parts).

Parameters:
propertythe programmatic name of the property that changed
oldValuethe old value of this property
newValuethe new value of this property
Object getAdapter ( Class  adapterClass)
Object getEditableValue ( ) [inherited]

Returns a value for this property source that can be edited in a property sheet.

My (Elias Volanakis (original)) personal rule of thumb:

  • model elements should return themselves and
  • custom IPropertySource implementations (like DimensionPropertySource in the GEF-logic example) should return an editable value.

Override only if necessary.

Returns:
this instance
List<Connection> getIncomingConnections ( )

Return a List of incoming Connections.

List<Connection> getOutgoingConnections ( )

Return a List of outgoing Connections.

IPropertyDescriptor [] getPropertyDescriptors ( )

Return the Location of this shape.

Returns:
a non-null location instance Returns an array of IPropertyDescriptors for this shape.

The returned array is used to fill the property view, when the edit-part corresponding to this model element is selected.

See also:
#descriptors
getPropertyValue(Object)
setPropertyValue(Object, Object)

Reimplemented from ChainGraphItem.

Object getPropertyValue ( Object  propertyId)

Return the property value for the given propertyId, or null.

The property view uses the IDs from the IPropertyDescriptors array to obtain the value of the corresponding properties.

See also:
#descriptors
getPropertyDescriptors()

Reimplemented from ChainGraphItem.

Dimension getSize ( )

Return the Size of this ChainGraphVertex.

Returns:
a non-null Dimension instance

Reimplemented in ComponentVertex, and DocumentCollectionVertex.

boolean isPropertySet ( Object  id) [inherited]

Children should override this. The default implementation returns false.

void removeConnection ( Connection  conn)

Remove an incoming or outgoing connection from this ChainGraphVertex.

Parameters:
conna non-null connection instance
Exceptions:
IllegalArgumentExceptionif the parameter is null
synchronized void removePropertyChangeListener ( PropertyChangeListener  l) [inherited]

Remove a PropertyChangeListener from this component.

Parameters:
la PropertyChangeListener instance
void resetPropertyValue ( Object  id) [inherited]

Children should override this. The default implementation does nothing.

void setPropertyValue ( Object  propertyId,
Object  value 
)

Set the Location of this ChainGraphVertex.

Parameters:
newLocationa non-null Point instance
Exceptions:
IllegalArgumentExceptionif the parameter is null Set the property value for the given property id. If no matching id is found, the call is forwarded to the superclass.

The property view uses the IDs from the IPropertyDescriptors array to set the values of the corresponding properties.

See also:
#descriptors
getPropertyDescriptors()

Reimplemented from ChainGraphItem.

void setSize ( Dimension  newSize)

Set the Size of this shape. Will not modify the size if newSize is null.

Parameters:
newSizea non-null Dimension instance or null

Reimplemented in ComponentVertex, and DocumentCollectionVertex.


Field Details

final String LOCATION_PROP = "ChainGraphVertex.Location" [static]

Property ID to use when the location of this shape is modified.

final String SIZE_PROP = "ChainGraphVertex.Size" [static]

Property ID to use then the size of this shape is modified.

final String SOURCE_CONNECTIONS_PROP = "ChainGraphVertex.SourceConn" [static]

Property ID to use when the list of outgoing connections is modified.

final String TARGET_CONNECTIONS_PROP = "ChainGraphVertex.TargetConn" [static]

Property ID to use when the list of incoming connections is modified.