|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.graphiti.pattern.AbstractBasePattern
org.eclipse.graphiti.pattern.AbstractConnectionPattern
public abstract class AbstractConnectionPattern
This is the base class AbstractConnectionPattern that clients writing a pattern for a connection domain object should subclass.
Constructor Summary | |
---|---|
AbstractConnectionPattern()
Creates a new AbstractConnectionPattern . |
Method Summary | |
---|---|
protected Connection |
addGraphicalRepresentation(IConnectionContext context,
Object newObject)
Adds the graphical representation of the given new Object with
the information in the given IConnectionContext . |
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. |
protected static AddConnectionContext |
getAddConnectionContext(ICreateConnectionContext context)
Creates a new AddConnectionContext suitable for adding a
connection for this pattern. |
String |
getCreateDescription()
Client should override to return a string description of the type of domain object that is created with this pattern. |
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. |
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. |
String |
getCreateName()
Client should override to return the name of the domain object that is created with this pattern. |
protected void |
layoutPictogramElement(PictogramElement pe)
Helper method that triggers a layout of the given PictogramElement . |
void |
startConnecting()
Hook that is called by the Graphiti framework as soon as a new connection is started. |
protected void |
updatePictogramElement(PictogramElement pe)
Helper method that triggers an update of the given PictogramElement . |
Methods inherited from class org.eclipse.graphiti.pattern.AbstractBasePattern |
---|
add, canAdd, getBusinessObjectForPictogramElement, getDiagram, getDiagramBehavior, getDiagramEditor, getFeatureProvider, getMappingProvider, link, link, manageColor, manageColor, manageFont, manageFont, setFeatureProvider |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.graphiti.pattern.IConnectionPattern |
---|
setFeatureProvider |
Methods inherited from interface org.eclipse.graphiti.func.IAdd |
---|
add, canAdd |
Constructor Detail |
---|
public AbstractConnectionPattern()
AbstractConnectionPattern
.
Method Detail |
---|
protected static AddConnectionContext getAddConnectionContext(ICreateConnectionContext context)
AddConnectionContext
suitable for adding a
connection for this pattern. The default implementation simply takes the
source and target anchors of the provided
ICreateConnectionContext
and adds them to a newly created
AddConnectionContext
object.
context
- The create connection context to be used as a basis for adding
a connection.
AddConnectionContext
.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.protected Connection addGraphicalRepresentation(IConnectionContext context, Object newObject)
Object
with
the information in the given IConnectionContext
.
context
- The connection context for the new objectnewObject
- The new object instance itself
Connection
prictogram element instance created for
the connection domain object.protected void layoutPictogramElement(PictogramElement pe)
PictogramElement
. The default implementation queries the feature
provider and tries to find a functionality either in the pattern of an
additional AbstractLayoutFeature
that can handle the request and
triggers the operation.
pe
- The pictogram element to layoutprotected void updatePictogramElement(PictogramElement pe)
PictogramElement
. The default implementation queries the feature
provider and tries to find a functionality either in the pattern of an
additional AbstractUpdateFeature
that can handle the request and
triggers the operation.
pe
- The pictogram element to updatepublic String getCreateDescription()
null
which indicates that no tooltip shall be displayed.
getCreateDescription
in interface ICreateInfo
String
holding the tooltippublic 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 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 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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |