ChainGraphDiagram Class Reference

Inheritance diagram for ChainGraphDiagram:
Collaboration diagram for ChainGraphDiagram:

List of all members.


Detailed Description

This is the "root" of the model data structure.

Author:
Elias Volanakis (original), sschwieb, fsteeg

Public Methods

 ChainGraphDiagram (ChainItemFactory factory)
boolean addChild (ChainGraphVertex vertex)
List< ChainGraphVertexgetChildren ()
Object getAdapter (Class adapter)
boolean removeChild (ChainGraphVertex vertex)
synchronized void addPropertyChangeListener (PropertyChangeListener l)
Object getEditableValue ()
IPropertyDescriptor[] getPropertyDescriptors ()
Object getPropertyValue (Object id)
boolean isPropertySet (Object id)
synchronized void removePropertyChangeListener (PropertyChangeListener l)
void resetPropertyValue (Object id)
void setPropertyValue (Object id, Object value)

Public Static Fields

static final String CHILD_ADDED_PROP = "ChainGraphDiagram.ChildAdded"
static final String CHILD_REMOVED_PROP = "ChainGraphDiagram.ChildRemoved"

Protected Methods

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

Constructors

Parameters:
factoryThe ChainItemFactory

Method Details

boolean addChild ( ChainGraphVertex  vertex)

Add a ChainGraphVertex to this diagram.

Parameters:
vertexa non-null ChainGraphVertex instance
Returns:
true, if the ChainGraphVertex was added, false otherwise
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  adapter)
List<ChainGraphVertex> getChildren ( )

Return a List of ChainGraphVertex in this diagram. The returned List should not be modified.

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
IPropertyDescriptor [] getPropertyDescriptors ( ) [inherited]

Children should override this. The default implementation returns an empty array.

Reimplemented in ChainGraphVertex.

Object getPropertyValue ( Object  id) [inherited]

Children should override this. The default implementation returns null.

Reimplemented in ChainGraphVertex, and Connection.

boolean isPropertySet ( Object  id) [inherited]

Children should override this. The default implementation returns false.

boolean removeChild ( ChainGraphVertex  vertex)

Remove a ChainGraphVertex from this diagram.

Parameters:
vertexa non-null ChainGraphVertex instance;
Returns:
true, if the ChainGraphVertex was removed, false otherwise
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  id,
Object  value 
) [inherited]

Children should override this. The default implementation does nothing.

Reimplemented in ChainGraphVertex, and Connection.


Field Details

final String CHILD_ADDED_PROP = "ChainGraphDiagram.ChildAdded" [static]

Property ID to use when a child is added to this diagram.

final String CHILD_REMOVED_PROP = "ChainGraphDiagram.ChildRemoved" [static]

Property ID to use when a child is removed from this diagram.