public abstract class AbstractConnectionPattern extends AbstractBasePattern implements IConnectionPattern
Constructor and Description |
---|
AbstractConnectionPattern()
Creates a new
AbstractConnectionPattern . |
Modifier and Type | Method and Description |
---|---|
void |
attachedToSource(ICreateConnectionContext context)
Hook that is called by the Graphiti framework as soon as a new connection
is attached to its source anchor.
|
void |
canceledAttaching(ICreateConnectionContext context)
Hook that is called by the Graphiti framework as soon as a connection
creation is cancelled.
|
boolean |
canCreate(ICreateConnectionContext context)
Clients must override this method to indicate that the pattern can be
used to create domain objects as defined in the given
ICreateConnectionContext . |
boolean |
canStartConnection(ICreateConnectionContext context)
Clients must override this method to indicate that the pattern can be
used to create domain objects starting from what is defined in the
given
ICreateConnectionContext . |
Connection |
create(ICreateConnectionContext context)
Clients must override this method to implement the functionality to
create a new connection domain object as defined in the given
ICreateConnectionContext . |
void |
endConnecting()
Hook that is called by the Graphiti framework as soon as a new connection
is ended.
|
java.lang.String |
getCreateDescription()
Client should override to return a string description of the type of
domain object that is created with this pattern.
|
java.lang.String |
getCreateImageId()
Client should override to return a string id of the the image icon for
the domain object that is created with this pattern.
|
java.lang.String |
getCreateLargeImageId()
Client should override to return a string id of the the large image icon
for the domain object that is created with this pattern.
|
java.lang.String |
getCreateName()
Client should override to return the name of the domain object that is
created with this pattern.
|
void |
startConnecting()
Hook that is called by the Graphiti framework as soon as a new connection
is started.
|
add, canAdd, getFeatureProvider, setFeatureProvider
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setFeatureProvider
public AbstractConnectionPattern()
AbstractConnectionPattern
.public boolean canCreate(ICreateConnectionContext context)
ICreateConnectionContext
. Corresponds to the method
ICreateConnection.canCreate(ICreateConnectionContext)
. The default implementation simply returns false
.canCreate
in interface ICreateConnection
context
- The context holding information on the connection domain
object to be created.true
in case this pattern can create such a
connection domain object, false
otherwise.public boolean canStartConnection(ICreateConnectionContext context)
ICreateConnectionContext
. Corresponds to the method
ICreateConnection.canStartConnection(ICreateConnectionContext)
. The default implementation simply returns false
.canStartConnection
in interface ICreateConnection
context
- The context holding information on the connection domain
object to be created.true
in case this pattern can create such a
connection domain object, false
otherwise.public Connection create(ICreateConnectionContext context)
ICreateConnectionContext
. Corresponds to the method
ICreateConnection.create(ICreateConnectionContext)
.
The default implementation simply does nothing and returns
null
.create
in interface ICreateConnection
context
- The context holding information on the connection domain
object to be created.Connection
pictogram element.public java.lang.String getCreateDescription()
null
which indicates that no tooltip shall be displayed.getCreateDescription
in interface ICreateInfo
String
holding the tooltippublic java.lang.String getCreateImageId()
null
which indicates that no icon shall be displayed.getCreateImageId
in interface ICreateInfo
String
holding the id of the icon as defined in the
AbstractImageProvider.public java.lang.String getCreateLargeImageId()
null
which indicates that no icon shall be displayed.getCreateLargeImageId
in interface ICreateInfo
String
holding the id of the large icon as defined in
the AbstractImageProvider.public java.lang.String getCreateName()
null
which results in an empty
entry in the palette.getCreateName
in interface ICreateInfo
String
holding the name of the domain object.public void startConnecting()
AbstractCreateConnectionFeature.startConnecting()
. The default
implementation simply does nothing.startConnecting
in interface ICreateConnection
public void endConnecting()
AbstractCreateConnectionFeature.endConnecting()
. The default
implementation simply does nothing.endConnecting
in interface ICreateConnection
public void attachedToSource(ICreateConnectionContext context)
AbstractCreateConnectionFeature.attachedToSource(ICreateConnectionContext)
. The default implementation simply does nothing.attachedToSource
in interface ICreateConnection
context
- the contextpublic void canceledAttaching(ICreateConnectionContext context)
AbstractCreateConnectionFeature.canceledAttaching(ICreateConnectionContext)
. The default implementation simply does nothing.canceledAttaching
in interface ICreateConnection
context
- the context