|
||||||||||
| 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.AbstractPattern
public abstract class AbstractPattern
The Class AbstractPattern.
| Field Summary | |
|---|---|
private IPatternConfiguration |
patternConfiguration
|
| Fields inherited from interface org.eclipse.graphiti.func.ICreate |
|---|
EMPTY |
| Constructor Summary | |
|---|---|
AbstractPattern(IPatternConfiguration patternConfiguration)
Creates a new AbstractPattern. |
|
| Method Summary | |
|---|---|
protected void |
addGraphicalRepresentation(IAreaContext context,
java.lang.Object newObject)
Adds the graphical representation. |
protected boolean |
avoidNegativeCoordinates()
|
boolean |
canCreate(ICreateContext context)
Checks if business object can be created for the given context. |
boolean |
canLayout(ILayoutContext context)
Checks whether the current pictogram element of the given context can be layouted. |
boolean |
canMoveShape(IMoveShapeContext context)
Can move shape. |
boolean |
canResizeShape(IResizeShapeContext context)
Can resize shape. |
boolean |
canUpdate(IUpdateContext context)
Checks whether the values of the current pictogram element of the given context can be updated. |
void |
completeInfo(IDirectEditingInfo info,
java.lang.Object bo)
Complete the directEditing info. |
void |
completeInfo(IDirectEditingInfo info,
java.lang.Object bo,
java.lang.String keyProperty)
Complete the directEditing info. |
java.lang.Object[] |
create(ICreateContext context)
Creates the business object for the given context. |
private java.util.List<Anchor> |
getAnchors(ContainerShape containerShape)
|
java.lang.String |
getCreateDescription()
Gets the create description. |
java.lang.String |
getCreateImageId()
Gets the create image id. |
java.lang.String |
getCreateLargeImageId()
Gets the create large image id. |
java.lang.String |
getCreateName()
Gets the create name. |
protected java.lang.String |
getImage(IStructureMapping structureMapping,
PictogramLink link)
Gets the image. |
protected IPatternConfiguration |
getPatternConfiguration()
Gets the pattern configuration. |
IResizeConfiguration |
getResizeConfiguration(IResizeShapeContext context)
Provides configuration object, which describes the resize behavior. |
protected java.lang.String |
getText(IStructureMapping structureMapping,
PictogramLink link)
Gets the text. |
protected void |
internalMove(IMoveShapeContext context)
Internal move. |
abstract boolean |
isMainBusinessObjectApplicable(java.lang.Object mainBusinessObject)
This method must be implemented by the pattern user. |
protected abstract boolean |
isPatternControlled(PictogramElement pictogramElement)
This method must be implemented by the pattern developer / provider. |
protected abstract boolean |
isPatternRoot(PictogramElement pictogramElement)
This method must be implemented by the pattern developer / provider. |
boolean |
layout(ILayoutContext context)
Layoutes the pictogram element. |
protected void |
layoutPictogramElement(PictogramElement pe)
Layout pictogram element. |
protected void |
moveAllBendpoints(IMoveShapeContext context)
Move all bendpoints within a container shape. |
void |
moveShape(IMoveShapeContext context)
Move shape. |
protected void |
postMoveShape(IMoveShapeContext context)
Post move shape. |
protected void |
preMoveShape(IMoveShapeContext context)
Pre move shape. |
void |
resizeShape(IResizeShapeContext context)
Resize shape. |
protected void |
setPatternConfiguration(IPatternConfiguration patternConfiguration)
Sets the pattern configuration. |
boolean |
update(IUpdateContext context)
Updates the pictogram element. |
IReason |
updateNeeded(IUpdateContext context)
Check whether the values in the pictogram element are up to date, that means whether the graphics algorithm of this pictogram element contain the latest values from the business objects. |
protected void |
updatePictogramElement(PictogramElement pe)
Update pictogram element. |
| Methods inherited from class org.eclipse.graphiti.pattern.AbstractBasePattern |
|---|
add, canAdd, getBusinessObjectForPictogramElement, getDiagram, getDiagramEditor, getFeatureProvider, getMappingProvider, link, link, manageColor, manageColor, 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.IPattern |
|---|
add, canAdd, setFeatureProvider |
| Field Detail |
|---|
private IPatternConfiguration patternConfiguration
| Constructor Detail |
|---|
public AbstractPattern(IPatternConfiguration patternConfiguration)
AbstractPattern.
patternConfiguration - the pattern configuration| Method Detail |
|---|
public boolean canCreate(ICreateContext context)
ICreate
canCreate in interface ICreatecontext - the context
public boolean canLayout(ILayoutContext context)
ILayout
canLayout in interface ILayoutcontext - the context
public boolean canMoveShape(IMoveShapeContext context)
IMoveShape
canMoveShape in interface IMoveShapecontext - the context
public boolean canResizeShape(IResizeShapeContext context)
IResizeShape
canResizeShape in interface IResizeShapecontext - the context
public boolean canUpdate(IUpdateContext context)
IUpdate
canUpdate in interface IUpdatecontext - the context
public java.lang.Object[] create(ICreateContext context)
ICreate
create in interface ICreatecontext - the context
public java.lang.String getCreateDescription()
IPattern
getCreateDescription in interface ICreateInfogetCreateDescription in interface IPatternpublic java.lang.String getCreateImageId()
ICreateInfo
getCreateImageId in interface ICreateInfopublic java.lang.String getCreateLargeImageId()
ICreateInfo
getCreateLargeImageId in interface ICreateInfopublic java.lang.String getCreateName()
IPattern
getCreateName in interface ICreateInfogetCreateName in interface IPatternpublic abstract boolean isMainBusinessObjectApplicable(java.lang.Object mainBusinessObject)
IPattern
isMainBusinessObjectApplicable in interface IPatternmainBusinessObject - the main business object
public boolean layout(ILayoutContext context)
ILayout
layout in interface ILayoutcontext - the context
public final void moveShape(IMoveShapeContext context)
IMoveShape
moveShape in interface IMoveShapecontext - the contextprotected void postMoveShape(IMoveShapeContext context)
context - the move shape contextprotected void preMoveShape(IMoveShapeContext context)
context - the move shape contextprotected void internalMove(IMoveShapeContext context)
context - the move shape contextprotected void moveAllBendpoints(IMoveShapeContext context)
context - the move shape contextprivate java.util.List<Anchor> getAnchors(ContainerShape containerShape)
public void resizeShape(IResizeShapeContext context)
IResizeShape
resizeShape in interface IResizeShapecontext - the contextpublic boolean update(IUpdateContext context)
IUpdate
update in interface IUpdatecontext - the context
public IReason updateNeeded(IUpdateContext context)
IUpdate
updateNeeded in interface IUpdatecontext - the context
protected void addGraphicalRepresentation(IAreaContext context,
java.lang.Object newObject)
context - the area contextnewObject - the new objectprotected boolean avoidNegativeCoordinates()
protected java.lang.String getImage(IStructureMapping structureMapping,
PictogramLink link)
structureMapping - the structure mappinglink - the pictogram link
protected java.lang.String getText(IStructureMapping structureMapping,
PictogramLink link)
structureMapping - the structure mappinglink - the pictogram link
protected abstract boolean isPatternControlled(PictogramElement pictogramElement)
pictogramElement - the pictogram element
protected abstract boolean isPatternRoot(PictogramElement pictogramElement)
pictogramElement - the pictogram element
protected void layoutPictogramElement(PictogramElement pe)
pe - the pictogram elementprotected void updatePictogramElement(PictogramElement pe)
pe - the pictogram elementprotected void setPatternConfiguration(IPatternConfiguration patternConfiguration)
patternConfiguration - the new patternConfigurationprotected IPatternConfiguration getPatternConfiguration()
public void completeInfo(IDirectEditingInfo info,
java.lang.Object bo)
IPattern
completeInfo in interface IPatterninfo - the directEditing infobo - the business object
public void completeInfo(IDirectEditingInfo info,
java.lang.Object bo,
java.lang.String keyProperty)
IPattern
completeInfo in interface IPatterninfo - the directEditing infobo - the business objectkeyProperty - the key propertypublic IResizeConfiguration getResizeConfiguration(IResizeShapeContext context)
IPattern
getResizeConfiguration in interface IPatterncontext - the resizing context
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||