Inheritance diagram for Connection:
Collaboration diagram for Connection:The (GEF-) model base class of an undefined connection. It is rendered as a org.eclipse.draw2d.PolylineConnection. TODO this class needs a listener for the "real" model to react on changes and vice versa.
Public Methods | |
| Connection (ChainGraphVertex source, ChainGraphVertex target, boolean solid) | |
| void | disconnect () |
| int | getLineStyle () |
| Object | getPropertyValue (Object id) |
| ChainGraphVertex | getSource () |
| ChainGraphVertex | getTarget () |
| void | reconnect () |
| void | reconnect (ChainGraphVertex newSource, ChainGraphVertex newTarget) |
| void | setLineStyle (int lineStyle) |
| void | setPropertyValue (Object id, Object value) |
| Color | getColor () |
| void | connectInModel () |
| void | setFigure (DefaultConnectionFigure connection) |
| DefaultConnectionFigure | getFigure () |
| Object | getAdapter (Class adapterClass) |
| synchronized void | addPropertyChangeListener (PropertyChangeListener l) |
| Object | getEditableValue () |
| IPropertyDescriptor[] | getPropertyDescriptors () |
| boolean | isPropertySet (Object id) |
| synchronized void | removePropertyChangeListener (PropertyChangeListener l) |
| void | resetPropertyValue (Object id) |
Public Static Fields | |
| static final Integer | SOLID_CONNECTION = Graphics.LINE_SOLID |
| static final Integer | DASHED_CONNECTION = Graphics.LINE_DASH |
| static final String | LINESTYLE_PROP = "LineStyle" |
Protected Methods | |
| void | firePropertyChange (String property, Object oldValue, Object newValue) |
| Connection | ( | ChainGraphVertex | source, |
| ChainGraphVertex | target, | ||
| boolean | solid | ||
| ) |
Create a solid or dashed connection between two distinct shapes.
| source | a source endpoint for this connection (non null) |
| target | a target endpoint for this connection (non null) |
| solid | if true, the connection is painted solid, otherwise it is painted dashed |
| IllegalArgumentException | if any of the parameters are null or source == target |
| synchronized void addPropertyChangeListener | ( | PropertyChangeListener | l | ) | [inherited] |
Attach a non-null PropertyChangeListener to this object.
| l | a non-null PropertyChangeListener instance |
| IllegalArgumentException | if the parameter is null |
| void connectInModel | ( | ) |
Cause the connection to be present in the actual model.
| void disconnect | ( | ) |
Disconnect this connection from the shapes it is attached to.
| void firePropertyChange | ( | String | property, |
| Object | oldValue, | ||
| Object | newValue | ||
| ) | [protected, inherited] |
Report a property change to registered listeners (for example edit parts).
| property | the programmatic name of the property that changed |
| oldValue | the old value of this property |
| newValue | the new value of this property |
| Object getAdapter | ( | Class | adapterClass | ) | [inherited] |
Reimplemented in ChainGraphDiagram, ChainGraphVertex, and ComponentVertex.
| Color getColor | ( | ) |
| 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:
Override only if necessary.
| DefaultConnectionFigure getFigure | ( | ) |
| int getLineStyle | ( | ) |
Returns the line drawing style of this connection.
| IPropertyDescriptor [] getPropertyDescriptors | ( | ) | [inherited] |
Children should override this. The default implementation returns an empty array.
Reimplemented in ChainGraphVertex.
| Object getPropertyValue | ( | Object | id | ) |
Returns the lineStyle as String for the Property Sheet
Reimplemented from ChainGraphItem.
| ChainGraphVertex getSource | ( | ) |
Returns the source endpoint of this connection.
| ChainGraphVertex getTarget | ( | ) |
Returns the target endpoint of this connection.
| boolean isPropertySet | ( | Object | id | ) | [inherited] |
Children should override this. The default implementation returns false.
| void reconnect | ( | ) |
Reconnect this connection. The connection will reconnect with the ChainGraphVertex it was previously attached to.
| void reconnect | ( | ChainGraphVertex | newSource, |
| ChainGraphVertex | newTarget | ||
| ) |
Reconnect to a different source and/or target ChainGraphVertex. The connection will disconnect from its current attachments and reconnect to the new source and target.
| newSource | a new source endpoint for this connection (non null) |
| newTarget | a new target endpoint for this connection (non null) |
| IllegalArgumentException | if any of the paramers are null or newSource == newTarget |
| synchronized void removePropertyChangeListener | ( | PropertyChangeListener | l | ) | [inherited] |
Remove a PropertyChangeListener from this component.
| l | a PropertyChangeListener instance |
| void resetPropertyValue | ( | Object | id | ) | [inherited] |
Children should override this. The default implementation does nothing.
| void setFigure | ( | DefaultConnectionFigure | connection | ) |
| void setLineStyle | ( | int | lineStyle | ) |
Set the line drawing style of this connection.
| lineStyle | one of following values: Graphics.LINE_DASH or Graphics.LINE_SOLID |
| IllegalArgumentException | if lineStyle does not have one of the above values |
| void setPropertyValue | ( | Object | id, |
| Object | value | ||
| ) |
Sets the lineStyle based on the String provided by the PropertySheet
Reimplemented from ChainGraphItem.
final Integer DASHED_CONNECTION = Graphics.LINE_DASH [static] |
Used for indicating that a Connection with dashed line style should be created.
final String LINESTYLE_PROP = "LineStyle" [static] |
Property ID to use when the line style of this connection is modified.
final Integer SOLID_CONNECTION = Graphics.LINE_SOLID [static] |
Used for indicating that a Connection with solid line style should be created.