|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectCH.ifa.draw.standard.AbstractFigure
org.openbp.cockpit.modeler.figures.generic.BasicFigure
org.openbp.cockpit.modeler.figures.generic.XTextFigure
org.openbp.cockpit.modeler.figures.process.TextElementFigure
public class TextElementFigure
The text element figure represents a simple text rectangle. The size of the figure is computed automatically based on the text and font settings.
| Field Summary | |
|---|---|
static java.lang.String |
REGION_COLOR
Region id for color region |
| Fields inherited from class org.openbp.cockpit.modeler.figures.generic.XTextFigure |
|---|
displayBoxCache, HANDLE_DISTANCE, originX, originY |
| Fields inherited from class org.openbp.cockpit.modeler.figures.generic.BasicFigure |
|---|
DECO_FILLCOLOR, DECO_OVERLAY |
| 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 | |
|---|---|
TextElementFigure()
Constructor. |
|
| Method Summary | |
|---|---|
void |
connect(TextElement textElement,
ProcessDrawing drawing)
Connects the figure to a process object. |
void |
decodeGeometry()
Decodes the enclosed geometry information of the asssociated process element. |
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 information of this object into the associated process element. |
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.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. |
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. |
java.util.List |
getImportersAt(java.awt.Point p)
Returns all importers which will be accepted at the given point by this client. |
VisualElement |
getParentElement()
Gets parent element of this element, if any. |
CH.ifa.draw.framework.Figure |
getPresentationFigure()
Gets the presentation figure of this element. |
ProcessObject |
getProcessElement()
Returns the contained process element. |
ProcessObject |
getReferredProcessElement()
Returns the process element this figure refers to. |
java.util.List |
getSubClients()
Returns subordinate clients of this client. |
TextElement |
getTextElement()
Gets the text element. |
boolean |
handleEvent(VisualElementEvent event)
Handler method that is called for handling events. |
java.util.Vector |
handles()
We display a single font size handle in the top left corner only. |
boolean |
importData(java.lang.Object regionId,
java.awt.datatransfer.Transferable data,
java.awt.Point p)
Imports the given transferable into the given region. |
boolean |
isVisible()
Gets the flag if the element is currently visible. |
void |
release()
|
CH.ifa.draw.framework.Figure |
selectionOnDelete()
No object should be selected on deletion. |
void |
setDrawing(ProcessDrawing drawing)
Sets the drawing the element is a part of. |
void |
setVisible(boolean visible)
Sets the flag if the element is currently visible. |
java.lang.String |
toString()
Returns a string representation of this object. |
void |
updateFigure()
Synchronizes this figure with its provider, i\.e\. the object that is represented by the figure. |
void |
updatePresentationFigure()
Updates (reinitializes) the presentation figure. |
| Methods inherited from class org.openbp.cockpit.modeler.figures.generic.XTextFigure |
|---|
basicDisplayBox, basicMoveBy, createGeometry, displayBox, drawFigure, getAlignment, getFont, getFontSize, getText, invalidate, isAutoSize, parseGeometry, parseParameter, setAlignment, setAutoSize, setFont, setFontSize, setText |
| Methods inherited from class org.openbp.cockpit.modeler.figures.generic.BasicFigure |
|---|
clone, decorateValue, draw, getDecorationOwner, getDefaultFillColor, getFillColor, getParent, setFillColor, setParent |
| Methods inherited from class CH.ifa.draw.standard.AbstractFigure |
|---|
addFigureChangeListener, addToContainer, canConnect, center, changed, connectedTextLocator, connectionInsets, connectorAt, connectorVisibility, containsPoint, decompose, displayBox, displayBox, figures, findFigureInside, getAttribute, getZValue, includes, isEmpty, listener, moveBy, read, removeFigureChangeListener, removeFromContainer, setAttribute, setZValue, size, willChange, write |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, 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, displayBox, draw, 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 |
| Field Detail |
|---|
public static final java.lang.String REGION_COLOR
| Constructor Detail |
|---|
public TextElementFigure()
| Method Detail |
|---|
public void connect(TextElement textElement,
ProcessDrawing drawing)
textElement - Text elementdrawing - Process drawing that owns the figurepublic TextElement getTextElement()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.util.Vector handles()
handles in interface CH.ifa.draw.framework.Figurehandles in class XTextFigurepublic void release()
release in interface CH.ifa.draw.framework.Figurerelease in class CH.ifa.draw.standard.AbstractFigurepublic void decodeGeometry()
public void encodeGeometry()
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()
selectionOnDelete in interface ProcessElementContainerpublic void setDrawing(ProcessDrawing drawing)
VisualElement
setDrawing in interface VisualElementpublic ProcessDrawing getDrawing()
VisualElement
getDrawing 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 void updateFigure()
UpdatableFigure
updateFigure in interface UpdatableFigure
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 | |||||||||