|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectCH.ifa.draw.standard.AbstractFigure
CH.ifa.draw.standard.CompositeFigure
CH.ifa.draw.standard.StandardDrawing
org.openbp.cockpit.modeler.drawing.ProcessDrawing
public class ProcessDrawing
A ProcessDrawing is the graphical representation of a OpenBP process. (i.e. a JHotDraw StandardDrawing with Process related elements).
| Field Summary |
|---|
| Fields inherited from class CH.ifa.draw.standard.CompositeFigure |
|---|
_nHighestZ, _nLowestZ, fFigures |
| Fields inherited from interface org.openbp.cockpit.modeler.figures.VisualElement |
|---|
VISUAL_DISPLAY_ALL, VISUAL_DND_PARTICIPANT, VISUAL_VISIBLE |
| Fields inherited from interface CH.ifa.draw.framework.Figure |
|---|
POPUP_MENU |
| Constructor Summary | |
|---|---|
ProcessDrawing(ProcessItem process,
DrawingEditorPlugin editor)
Constructor. |
|
| Method Summary | |
|---|---|
CH.ifa.draw.framework.Figure |
add(CH.ifa.draw.framework.Figure figure)
|
void |
bringToFront(CH.ifa.draw.framework.Figure f)
Brings the given figure to front. |
void |
clearModified()
Clears the modified flag of the process and updates the save button accordingly. |
FlowConnection |
createFlowConnection(ControlLink link)
Creates a new flow connection based on the given control link. |
NodeFigure |
createNodeFigure(Node node)
Creates a new node figure based on the given node. |
ParamConnection |
createParamConnection(DataLink link)
Creates a new parameter connection based on the given data link. |
TextElementFigure |
createTextElementFigure(TextElement textElement)
Creates a text element figure based on the given text element. |
void |
decodeGeometry()
Encodes the geometry of this process. |
protected void |
decodeProcessGeometry(java.lang.String geometry)
Decodes the swim lane geometry of the process. |
java.awt.Rectangle |
displayBox()
|
void |
dragActionTriggered(java.lang.Object regionId,
java.awt.Point p)
Called to signal additional actions, such as hovering for a certain time over the region. |
void |
dragEnded(java.awt.datatransfer.Transferable transferable)
called when a dragging has ended. |
void |
dragStarted(java.awt.datatransfer.Transferable transferable)
Called when a dragging has been started. |
void |
encodeGeometry()
Encodes the geometry of this process, i\.e\. causes all figures to encode their geometry. |
protected java.lang.String |
encodeProcessGeometry()
Encodes the swim lane geometry of the process. |
CH.ifa.draw.framework.Figure |
findFigure(int x,
int y)
If the user clicks a flow access (e\.g\. to create a new flow connection), it often happens that he selects an already existing link to the flow access point. |
java.awt.Point |
getActualOrigin()
Returns the upper left corner of the used part of the drawing. |
java.util.List |
getAllDropRegions(java.util.List flavors,
java.awt.datatransfer.Transferable data,
java.awt.event.MouseEvent mouseEvent)
Returns a list of all regions of this client AND possible sub clients. |
java.util.Iterator |
getAllFigures()
Gets all top level figures of this drawing. |
java.util.List |
getAllImportersAt(java.awt.Point p)
Returns all importers which will be accepted at the given point by this client or one of its sub clients. |
java.lang.String |
getDescription()
|
java.lang.String |
getDescriptionText()
|
java.lang.String |
getDisplayName()
|
java.lang.String |
getDisplayText()
|
ProcessDrawing |
getDrawing()
Gets the drawing the element is a part of. |
java.util.List |
getDropRegions(java.util.List flavors,
java.awt.datatransfer.Transferable data,
java.awt.event.MouseEvent mouseEvent)
Returns a list of drop regions of this client that are compatible with the provided data flavors. |
DrawingEditorPlugin |
getEditor()
Gets the editor that edits this drawing. |
ProcessElementContainer |
getFigureByQualifier(ModelQualifier qualifier)
Gets a process element container by the model qualifier of the corrresponding process element. |
protected java.util.List |
getFigureList()
Gets all top level figures of this drawing. |
protected java.util.List |
getFlowConnectionList()
Gets the flow connections of this drawing. |
java.util.Iterator |
getFlowConnections()
Gets the flow connections of this drawing. |
java.util.List |
getImportersAt(java.awt.Point p)
Returns all importers which will be accepted at the given point by this client. |
java.lang.String |
getName()
|
protected java.util.List |
getNodeFigureList()
Gets the node figures of this drawing. |
java.util.Iterator |
getNodeFigures()
Gets the node figures of this drawing. |
protected java.util.List |
getParamConnectionList()
Gets the parameter connections of this drawing. |
java.util.Iterator |
getParamConnections()
Gets the parameter connections of this drawing. |
VisualElement |
getParentElement()
Gets parent element of this element, if any. |
CH.ifa.draw.framework.Figure |
getPresentationFigure()
Gets the presentation figure of this element. |
ProcessItem |
getProcess()
Gets the process represented by this drawing. |
ProcessObject |
getProcessElement()
Returns the contained process element. |
Skin |
getProcessSkin()
Gets the process skin. |
ProcessObject |
getReferredProcessElement()
Returns the process element this figure refers to. |
java.util.List |
getSubClients()
Returns subordinate clients of this client. |
WorkspaceDrawingView |
getView()
Gets the (only) drawing view of this editor. |
boolean |
handleEvent(VisualElementEvent event)
Handler method that is called for handling events. |
boolean |
importData(java.lang.Object regionId,
java.awt.datatransfer.Transferable data,
java.awt.Point p)
Imports the given transferable into the given region. |
boolean |
isDisplayAll()
|
boolean |
isModified()
Gets the modified flag for usage by editors. |
boolean |
isReadOnly()
Gets the status variable: The process is readonly. |
boolean |
isVisible()
Gets the flag if the element is currently visible. |
void |
layoutAllConnections()
Recalculate the layout of all connections. |
void |
normalize()
Normalizes the drawing, i\.e\. moves it so that its top left corner lies at 50,50. |
protected void |
recalculateZOrders()
Reorders the figures of the drawing according to their preferred z-order. |
CH.ifa.draw.framework.Figure |
remove(CH.ifa.draw.framework.Figure figure)
|
void |
removeAndUpdate(CH.ifa.draw.framework.Figure figure)
Removes a figure from the drawing. |
CH.ifa.draw.framework.Figure |
selectionOnDelete()
Returns the figure that should be selected after this figure has been deleted. |
void |
setDescription(java.lang.String string)
|
void |
setDisplayAll(boolean visible)
|
void |
setDisplayName(java.lang.String string)
|
void |
setDrawing(ProcessDrawing processDrawing)
Sets the drawing the element is a part of. |
void |
setEditor(DrawingEditorPlugin editor)
Sets the editor of this drawing. |
void |
setModified()
Sets the modified flag of the process and updates the save button accordingly. |
void |
setName(java.lang.String string)
|
void |
setProcess(ProcessItem process)
Sets the process represented by this drawing. |
void |
setProcessSkin(Skin processSkin)
Sets the process skin. |
void |
setReadOnly(boolean readOnly)
Sets the status variable: The process is readonly. |
void |
setTagState(int stateUpdate)
Sets the tag state of all tags of the nodes of this drawing. |
void |
setVisible(boolean visible)
Sets the flag if the element is currently visible. |
void |
updateFigure()
Synchronizes this figure with its provider, i\.e\. the object that is represented by the figure. |
void |
updateModificationState()
Updates the status of the save button according to the modification state of the process. |
void |
updatePresentationFigure()
Updates (reinitializes) the presentation figure. |
| Methods inherited from class CH.ifa.draw.standard.StandardDrawing |
|---|
addDrawingChangeListener, basicDisplayBox, drawingChangeListeners, figureInvalidated, figureRequestRemove, figureRequestUpdate, getTitle, handles, lock, removeDrawingChangeListener, setTitle, unlock |
| Methods inherited from class CH.ifa.draw.standard.CompositeFigure |
|---|
addAll, addAll, basicMoveBy, draw, draw, figureAt, figureChanged, figureCount, figureRemoved, figures, figures, figuresReverse, findFigure, findFigure, findFigureInside, findFigureInsideWithout, findFigureWithout, getFigureFromLayer, getLayer, includes, init, orphan, orphanAll, orphanAll, read, release, removeAll, removeAll, removeAll, replace, sendToBack, sendToLayer, write |
| Methods inherited from class CH.ifa.draw.standard.AbstractFigure |
|---|
addFigureChangeListener, addToContainer, canConnect, center, changed, clone, connectedTextLocator, connectionInsets, connectorAt, connectorVisibility, containsPoint, decompose, displayBox, displayBox, getAttribute, getZValue, invalidate, isEmpty, listener, moveBy, removeFigureChangeListener, removeFromContainer, setAttribute, setZValue, size, willChange |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface CH.ifa.draw.framework.Figure |
|---|
addFigureChangeListener, addToContainer, basicDisplayBox, canConnect, center, changed, clone, connectedTextLocator, connectionInsets, connectorAt, connectorVisibility, containsPoint, decompose, displayBox, displayBox, draw, figures, findFigureInside, getAttribute, getZValue, handles, includes, invalidate, isEmpty, listener, moveBy, release, removeFigureChangeListener, removeFromContainer, setAttribute, setZValue, size, willChange |
| Methods inherited from interface CH.ifa.draw.util.Storable |
|---|
read, write |
| Methods inherited from interface CH.ifa.draw.framework.Drawing |
|---|
addAll, addAll, draw, draw, figures, figures, figuresReverse, findFigure, findFigure, findFigureInside, findFigureInsideWithout, findFigureWithout, getFigureFromLayer, getLayer, includes, init, orphan, orphanAll, orphanAll, release, removeAll, removeAll, replace, sendToBack, sendToLayer |
| Methods inherited from interface CH.ifa.draw.framework.FigureChangeListener |
|---|
figureChanged, figureRemoved |
| Constructor Detail |
|---|
public ProcessDrawing(ProcessItem process,
DrawingEditorPlugin editor)
process - The process this drawing representseditor - Editor that edits this drawing| Method Detail |
|---|
public ProcessItem getProcess()
public void setProcess(ProcessItem process)
process - Process to represent or null to clear.
In the latter case, the method will remove all references of the
current process to drawing objects (figures) from the current process, if any.public Skin getProcessSkin()
public void setProcessSkin(Skin processSkin)
public DrawingEditorPlugin getEditor()
public void setEditor(DrawingEditorPlugin editor)
public WorkspaceDrawingView getView()
public boolean isReadOnly()
public void setReadOnly(boolean readOnly)
public java.util.Iterator getAllFigures()
Figure objectsprotected java.util.List getFigureList()
Figure objectspublic java.util.Iterator getNodeFigures()
NodeFigure objectsprotected java.util.List getNodeFigureList()
NodeFigure objectspublic java.util.Iterator getParamConnections()
ParamConnection objectsprotected java.util.List getParamConnectionList()
ParamConnection objectspublic java.util.Iterator getFlowConnections()
FlowConnection objectsprotected java.util.List getFlowConnectionList()
FlowConnection objectspublic CH.ifa.draw.framework.Figure add(CH.ifa.draw.framework.Figure figure)
add in interface CH.ifa.draw.framework.Drawingadd in class CH.ifa.draw.standard.CompositeFigurepublic void setTagState(int stateUpdate)
stateUpdate - State to add to the current statepublic void layoutAllConnections()
public CH.ifa.draw.framework.Figure remove(CH.ifa.draw.framework.Figure figure)
remove in interface CH.ifa.draw.framework.Drawingremove in class CH.ifa.draw.standard.StandardDrawingpublic void removeAndUpdate(CH.ifa.draw.framework.Figure figure)
figure - Figure to be removed
public CH.ifa.draw.framework.Figure findFigure(int x,
int y)
findFigure in interface CH.ifa.draw.framework.DrawingfindFigure in class CH.ifa.draw.standard.CompositeFigureCompositeFigure.findFigure(int, int)public ProcessElementContainer getFigureByQualifier(ModelQualifier qualifier)
qualifier - Model qualifier of the element
public void bringToFront(CH.ifa.draw.framework.Figure f)
recalculateZOrders()).
bringToFront in interface CH.ifa.draw.framework.DrawingbringToFront in class CH.ifa.draw.standard.CompositeFigureprotected void recalculateZOrders()
public java.awt.Rectangle displayBox()
displayBox in interface CH.ifa.draw.framework.FiguredisplayBox in class CH.ifa.draw.standard.StandardDrawingpublic java.awt.Point getActualOrigin()
public void normalize()
public void encodeGeometry()
public void decodeGeometry()
protected java.lang.String encodeProcessGeometry()
protected void decodeProcessGeometry(java.lang.String geometry)
geometry - Geometry string to decode or nullpublic NodeFigure createNodeFigure(Node node)
node - The node
public TextElementFigure createTextElementFigure(TextElement textElement)
textElement - The text element
public FlowConnection createFlowConnection(ControlLink link)
link - The control link
public ParamConnection createParamConnection(DataLink link)
link - The data link
public ProcessObject getProcessElement()
ProcessElementContainer
getProcessElement in interface ProcessElementContainerpublic ProcessObject getReferredProcessElement()
ProcessElementContainerProcessElementContainer.getProcessElement(), however this
might be different also for example for sockets of initial/final nodes sockets, which will return
their parent node.
getReferredProcessElement in interface ProcessElementContainerpublic CH.ifa.draw.framework.Figure selectionOnDelete()
ProcessElementContainer
selectionOnDelete in interface ProcessElementContainerpublic ProcessDrawing getDrawing()
VisualElement
getDrawing in interface VisualElementpublic void setDrawing(ProcessDrawing processDrawing)
VisualElement
setDrawing in interface VisualElementpublic VisualElement getParentElement()
VisualElement
getParentElement in interface VisualElementpublic CH.ifa.draw.framework.Figure getPresentationFigure()
VisualElement
getPresentationFigure in interface VisualElementpublic void updatePresentationFigure()
VisualElement
updatePresentationFigure in interface VisualElementpublic boolean isVisible()
VisualElement
isVisible in interface VisualElementpublic void setVisible(boolean visible)
VisualElement
setVisible in interface VisualElementpublic boolean handleEvent(VisualElementEvent event)
VisualElement
handleEvent in interface VisualElementevent - Event that desribes the event
public boolean isDisplayAll()
public void setDisplayAll(boolean visible)
public void updateFigure()
UpdatableFigure
updateFigure in interface UpdatableFigurepublic java.lang.String getName()
public void setName(java.lang.String string)
public java.lang.String getDescription()
public void setDescription(java.lang.String string)
public java.lang.String getDisplayName()
public void setDisplayName(java.lang.String string)
public java.lang.String getDisplayText()
public java.lang.String getDescriptionText()
public boolean isModified()
isModified in interface Modifiablepublic void setModified()
setModified in interface Modifiablepublic void clearModified()
clearModified in interface Modifiablepublic void updateModificationState()
public void dragActionTriggered(java.lang.Object regionId,
java.awt.Point p)
InteractionClient
dragActionTriggered in interface InteractionClientregionId - Id of the region to import into (see BasicDropRegion.getId)p - Current mouse position in screen coordinatespublic void dragEnded(java.awt.datatransfer.Transferable transferable)
InteractionClient
dragEnded in interface InteractionClienttransferable - Transferable that has been draggedpublic void dragStarted(java.awt.datatransfer.Transferable transferable)
InteractionClient
dragStarted in interface InteractionClienttransferable - Transferable to be dragged
public java.util.List getAllDropRegions(java.util.List flavors,
java.awt.datatransfer.Transferable data,
java.awt.event.MouseEvent mouseEvent)
InteractionClient
getAllDropRegions in interface InteractionClientflavors - List of data flavors to checkdata - Transferable to importmouseEvent - Mouse event that initiated the drag action
DragAwareRegion object or null if the drop client
or one of its sub clients cannot satisfy at least one of the supplied data flavors
public java.util.List getDropRegions(java.util.List flavors,
java.awt.datatransfer.Transferable data,
java.awt.event.MouseEvent mouseEvent)
InteractionClient
getDropRegions in interface InteractionClientflavors - List of data flavors to checkdata - Transferable to be importedmouseEvent - Mouse event that initiated the drag action
DragAwareRegion object or null if the drop client
cannot satisfy at least one of the supplied data flavors.public java.util.List getImportersAt(java.awt.Point p)
InteractionClient
getImportersAt in interface InteractionClientp - Current mouse position in screen coordinates
Importer objects or nullpublic java.util.List getAllImportersAt(java.awt.Point p)
InteractionClient
getAllImportersAt in interface InteractionClientp - Current mouse position in screen coordinates
Importer objects or nullpublic java.util.List getSubClients()
InteractionClient
getSubClients in interface InteractionClientInteractionClient objects or null if this drop client doesn't have sub drop clients
public boolean importData(java.lang.Object regionId,
java.awt.datatransfer.Transferable data,
java.awt.Point p)
InteractionClient
importData in interface InteractionClientregionId - Id of the region to import into (see BasicDropRegion.getId)data - Transferable to importp - Drop point in glass coordinates
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||