|
||||||||||
| 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
org.openbp.cockpit.modeler.figures.tag.AbstractTagFigure
org.openbp.cockpit.modeler.figures.tag.StraightTagFigure
org.openbp.cockpit.modeler.figures.process.ParamFigure
public class ParamFigure
Figure that is used to represent node params of a socket. Is also capable of displaying a connection to a process variable.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.openbp.cockpit.modeler.figures.tag.AbstractTagFigure |
|---|
AbstractTagFigure.TagContent |
| Field Summary | |
|---|---|
static java.lang.String |
PARAM_TYPE_NAME
Name of a data type name parameter that accepts a dropped data type item |
| Fields inherited from class org.openbp.cockpit.modeler.figures.tag.StraightTagFigure |
|---|
tagOrientation |
| Fields inherited from class org.openbp.cockpit.modeler.figures.tag.AbstractTagFigure |
|---|
angle, content, CONTENT_DATA, CONTENT_FLOW, CONTENT_ICON, CONTENT_INTERACTION, CONTENT_STATIC, CONTENT_TEXT, CONTENT_USER1, CONTENT_USER2, contentState, currentContentState, DECO_TAGCONTENTTYPE, layouter, origin, parent, presentationFigure, shadowFigure, visualStatus |
| 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 | |
|---|---|
ParamFigure(AbstractTagFigure parent,
NodeParam nodeParam,
java.awt.Point origin)
|
|
| Method Summary | |
|---|---|
boolean |
acceptsTyping()
|
void |
addParamConnection(ParamConnection connection)
Adds a parameter connection. |
void |
basicSetAngle(double angle)
Sets the angle to the given one. |
boolean |
canConnect()
|
java.awt.Rectangle |
compactDisplayBox()
Returns the display box of the param icon. |
void |
connect(CH.ifa.draw.framework.Figure connectedFigure)
|
CH.ifa.draw.framework.Locator |
connectedTextLocator(CH.ifa.draw.framework.Figure text)
|
CH.ifa.draw.framework.Connector |
connectorAt(int x,
int y)
|
boolean |
containsPoint(int x,
int y)
|
protected XFigure |
createPresentationFigure()
Creates the presentation figure of this node. |
void |
decodeGeometry()
Decodes geometric information of the param. |
protected void |
decodeParameter(java.lang.String parameter)
Decodes a single parameter. |
protected int |
determineStandardTitleDistance()
Computes the standard title distance based on the text size. |
void |
disconnect(CH.ifa.draw.framework.Figure disconnectFigure)
|
java.awt.Rectangle |
displayBox()
|
void |
draw(java.awt.Graphics g)
Saves the transformation, draws the tag and restores the transformation. |
void |
encodeGeometry()
Stores geometric information in the paramobject. |
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. |
java.awt.Font |
getFont()
|
NodeParam |
getNodeParam()
Gets the the node param represented by this figure. |
ProcessObject |
getProcessElement()
Returns the contained process element. |
ProcessObject |
getReferredProcessElement()
Returns the process element this figure refers to. |
java.lang.String |
getText()
|
boolean |
handleEvent(VisualElementEvent event)
Handler method that is called for handling events. |
java.util.Vector |
handles()
We do not want any handles, so we return an empty vector. |
boolean |
importData(java.lang.Object regionId,
java.awt.datatransfer.Transferable data,
java.awt.Point p)
Imports the given transferable into the given region. |
protected void |
initContent(java.lang.Object modelObject)
Creates the content of this tag. |
protected void |
initShadow()
Creates the shadow figure of the tag's presentation figure. |
protected void |
initTagLayouter()
Creates the layouter for this tag. |
boolean |
isVerticalOrientation()
Gets the vertical orientation. |
int |
overlayColumns()
|
void |
release()
|
void |
removeConnections()
Removes all connections from/to this figure. |
void |
removeParamConnection(ParamConnection connection)
Removes a parameter connection. |
void |
removeProcessVariableConnection()
Removes an existing process variable connection to this param (i\.e\. a datalink between this param and a process variable). |
CH.ifa.draw.framework.Figure |
selectionOnDelete()
Select socket on deletion. |
ProcessVariableConnection |
setProcessVariableConnection(ProcessVariable param,
DataLink data)
Creates a new process variable connection figure and a new process variable figure and adds them. |
void |
setText(java.lang.String newText)
|
java.awt.Rectangle |
textDisplayBox()
|
java.lang.String |
toString()
Returns a string representation of this object. |
void |
updateFigure()
Causes all UpdatableFigure children to updateFigure. |
| Methods inherited from class org.openbp.cockpit.modeler.figures.tag.StraightTagFigure |
|---|
getTagOrientation, positionDisplayBox |
| Methods inherited from class CH.ifa.draw.standard.CompositeFigure |
|---|
add, addAll, addAll, bringToFront, draw, figureAt, figureChanged, figureCount, figureInvalidated, figureRemoved, figureRequestRemove, figureRequestUpdate, figures, figures, figuresReverse, findFigure, findFigure, findFigureInsideWithout, findFigureWithout, getFigureFromLayer, getLayer, includes, init, orphan, orphanAll, orphanAll, remove, removeAll, removeAll, removeAll, replace, sendToBack, sendToLayer |
| Methods inherited from class CH.ifa.draw.standard.AbstractFigure |
|---|
addFigureChangeListener, addToContainer, center, clone, connectionInsets, connectorVisibility, decompose, displayBox, displayBox, getAttribute, getZValue, isEmpty, listener, moveBy, removeFigureChangeListener, removeFromContainer, setAttribute, setZValue, size, willChange |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.openbp.cockpit.modeler.figures.VisualElement |
|---|
getDrawing, getParentElement, getPresentationFigure, isVisible, setDrawing, setVisible, updatePresentationFigure |
| Methods inherited from interface CH.ifa.draw.framework.Figure |
|---|
addFigureChangeListener, addToContainer, basicDisplayBox, center, changed, clone, connectionInsets, connectorVisibility, decompose, displayBox, displayBox, figures, findFigureInside, getAttribute, getZValue, includes, invalidate, isEmpty, listener, moveBy, removeFigureChangeListener, removeFromContainer, setAttribute, setZValue, size, willChange |
| Methods inherited from interface CH.ifa.draw.util.Storable |
|---|
read, write |
| Methods inherited from interface org.openbp.jaspira.gui.interaction.InteractionClient |
|---|
dragActionTriggered, dragEnded, dragStarted, getAllDropRegions, getAllImportersAt, getImportersAt, getSubClients |
| Methods inherited from interface CH.ifa.draw.framework.FigureChangeListener |
|---|
figureChanged, figureInvalidated, figureRemoved, figureRequestRemove, figureRequestUpdate |
| Field Detail |
|---|
public static final java.lang.String PARAM_TYPE_NAME
| Constructor Detail |
|---|
public ParamFigure(AbstractTagFigure parent,
NodeParam nodeParam,
java.awt.Point origin)
| Method Detail |
|---|
protected XFigure createPresentationFigure()
XRoundRectangleFigure
createPresentationFigure in class AbstractTagFigureprotected void initTagLayouter()
StraightTagFigureHorizontalLayouter
initTagLayouter in class StraightTagFigureprotected void initContent(java.lang.Object modelObject)
initContent in class AbstractTagFiguremodelObject - Model object this tag represents or nullprotected void initShadow()
AbstractTagFigure
initShadow in class AbstractTagFigurepublic NodeParam getNodeParam()
public java.lang.String toString()
toString in class java.lang.Objectpublic void addParamConnection(ParamConnection connection)
connection - Connection to addpublic void removeParamConnection(ParamConnection connection)
connection - Connection to removepublic void removeConnections()
public ProcessVariableConnection setProcessVariableConnection(ProcessVariable param,
DataLink data)
param - The process variable thst we want to conenct todata - the datalink representing the connection
public void removeProcessVariableConnection()
protected int determineStandardTitleDistance()
public boolean isVerticalOrientation()
isVerticalOrientation in class AbstractTagFigurepublic java.util.Vector handles()
AbstractTagFigure
handles in interface CH.ifa.draw.framework.Figurehandles in class AbstractTagFigure
public CH.ifa.draw.framework.Connector connectorAt(int x,
int y)
connectorAt in interface CH.ifa.draw.framework.FigureconnectorAt in class AbstractTagFigurepublic boolean canConnect()
canConnect in interface CH.ifa.draw.framework.FigurecanConnect in class AbstractTagFigure
public boolean containsPoint(int x,
int y)
containsPoint in interface CH.ifa.draw.framework.FigurecontainsPoint in class AbstractTagFigurepublic java.awt.Rectangle displayBox()
displayBox in interface CH.ifa.draw.framework.FiguredisplayBox in class AbstractTagFigurepublic void basicSetAngle(double angle)
AbstractTagFigure
basicSetAngle in class StraightTagFigurepublic void draw(java.awt.Graphics g)
AbstractTagFigure
draw in interface CH.ifa.draw.framework.Figuredraw in class AbstractTagFigurepublic void release()
release in interface CH.ifa.draw.framework.Figurerelease in class CH.ifa.draw.standard.CompositeFigurepublic CH.ifa.draw.framework.Locator connectedTextLocator(CH.ifa.draw.framework.Figure text)
connectedTextLocator in interface CH.ifa.draw.framework.FigureconnectedTextLocator in class CH.ifa.draw.standard.AbstractFigurepublic 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()
selectionOnDelete in interface ProcessElementContainerpublic java.awt.Rectangle textDisplayBox()
textDisplayBox in interface CH.ifa.draw.standard.TextHolderpublic java.lang.String getText()
getText in interface CH.ifa.draw.standard.TextHolderpublic void setText(java.lang.String newText)
setText in interface CH.ifa.draw.standard.TextHolderpublic boolean acceptsTyping()
acceptsTyping in interface CH.ifa.draw.standard.TextHolderpublic int overlayColumns()
overlayColumns in interface CH.ifa.draw.standard.TextHolderpublic void connect(CH.ifa.draw.framework.Figure connectedFigure)
connect in interface CH.ifa.draw.standard.TextHolderpublic void disconnect(CH.ifa.draw.framework.Figure disconnectFigure)
disconnect in interface CH.ifa.draw.standard.TextHolderpublic java.awt.Font getFont()
getFont in interface CH.ifa.draw.standard.TextHolderpublic boolean handleEvent(VisualElementEvent event)
VisualElement
handleEvent in interface VisualElementhandleEvent in class AbstractTagFigureevent - Event that desribes the event
public void updateFigure()
AbstractTagFigure
updateFigure in interface UpdatableFigureupdateFigure in class AbstractTagFigurepublic java.awt.Rectangle compactDisplayBox()
compactDisplayBox in interface ExpandablecompactDisplayBox in class AbstractTagFigurepublic void decodeGeometry()
protected void decodeParameter(java.lang.String parameter)
parameter - Parameter to decodepublic void encodeGeometry()
public java.util.List getDropRegions(java.util.List flavors,
java.awt.datatransfer.Transferable data,
java.awt.event.MouseEvent mouseEvent)
InteractionClient
getDropRegions in interface InteractionClientgetDropRegions in class AbstractTagFigureflavors - 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 boolean importData(java.lang.Object regionId,
java.awt.datatransfer.Transferable data,
java.awt.Point p)
InteractionClient
importData in interface InteractionClientimportData in class AbstractTagFigureregionId - 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 | |||||||||