|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.stanford.hci.dtools.statechart.model.ModelElement
edu.stanford.hci.dtools.statechart.model.ConnectionModel
public abstract class ConnectionModel
A connection between two distinct shapes.
This software is distributed under the BSD License.
This code is partially based on code that is copyright (c) 2004 Elias Volanakis. See License.txt
| Field Summary | |
|---|---|
static java.lang.Integer |
DASHED_CONNECTION
Used for indicating that a ConnectionModel with dashed line style should be created. |
static java.lang.String |
INPUT_PROP
|
static java.lang.String |
LINESTYLE_PROP
Property ID to use when the line style of this connection is modified. |
static java.lang.Integer |
SOLID_CONNECTION
Used for indicating that a ConnectionModel with solid line style should be created. |
| Constructor Summary | |
|---|---|
ConnectionModel()
|
|
ConnectionModel(ShapeModel source,
ShapeModel target)
|
|
| Method Summary | |
|---|---|
void |
disconnect()
Disconnect this connection from the shapes it is attached to. |
int |
getLineStyle()
Returns the line drawing style of this connection. |
org.eclipse.ui.views.properties.IPropertyDescriptor[] |
getPropertyDescriptors()
Returns the descriptor for the lineStyle property |
ShapeModel |
getSource()
Returns the source endpoint of this connection. |
ShapeModel |
getTarget()
Returns the target endpoint of this connection. |
void |
reconnect()
Reconnect this connection. |
void |
reconnect(ShapeModel newSource,
ShapeModel newTarget)
Reconnect to a different source and/or target shape. |
void |
setLineStyle(int lineStyle)
Set the line drawing style of this connection. |
void |
setSource(ShapeModel newSource)
|
void |
setTarget(ShapeModel newTarget)
|
| Methods inherited from class edu.stanford.hci.dtools.statechart.model.ModelElement |
|---|
addPropertyChangeListener, getEditableValue, getPropertyValue, isPropertySet, removePropertyChangeListener, resetPropertyValue, setPropertyValue |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.Integer SOLID_CONNECTION
ShapeEditPart.createEditPolicies()public static final java.lang.Integer DASHED_CONNECTION
ShapeEditPart.createEditPolicies()public static final java.lang.String LINESTYLE_PROP
public static final java.lang.String INPUT_PROP
| Constructor Detail |
|---|
public ConnectionModel(ShapeModel source,
ShapeModel target)
public ConnectionModel()
| Method Detail |
|---|
public void disconnect()
public int getLineStyle()
public org.eclipse.ui.views.properties.IPropertyDescriptor[] getPropertyDescriptors()
getPropertyDescriptors in interface org.eclipse.ui.views.properties.IPropertySourcegetPropertyDescriptors in class ModelElementIPropertySource.getPropertyDescriptors()public ShapeModel getSource()
public void setSource(ShapeModel newSource)
public ShapeModel getTarget()
public void setTarget(ShapeModel newTarget)
public void reconnect()
public void reconnect(ShapeModel newSource,
ShapeModel newTarget)
newSource - a new source endpoint for this connection (non null)newTarget - a new target endpoint for this connection (non null)
java.lang.IllegalArgumentException - if any of the paramers are null or newSource == newTargetpublic void setLineStyle(int lineStyle)
lineStyle - one of following values: Graphics.LINE_DASH or Graphics.LINE_SOLID
java.lang.IllegalArgumentException - if lineStyle does not have one of the above valuesGraphics.LINE_DASH,
Graphics.LINE_SOLID
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||