org.openbp.cockpit.modeler.figures
Interface VisualElement

All Superinterfaces:
java.lang.Cloneable, CH.ifa.draw.framework.Figure, InteractionClient, java.io.Serializable, CH.ifa.draw.util.Storable
All Known Subinterfaces:
ProcessElementContainer
All Known Implementing Classes:
AbstractTagFigure, DecisionNodeFigure, FinalNodeFigure, FlowConnection, ForkNodeFigure, HLineFigure, HorizontalRotatingTagFigure, InitialNodeFigure, JoinNodeFigure, LineFigure, MergeNodeFigure, MultiSocketNodeFigure, NodeFigure, ParamConnection, ParamFigure, PlaceholderNodeFigure, PolySplineConnection, PrimitiveNodeFigure, ProcessDrawing, ProcessVariableConnection, ProcessVariableFigure, SimpleTextTagFigure, SocketFigure, StraightTagFigure, TextElementFigure, VLineFigure, WaitStateNodeFigure, WorkflowEndNodeFigure, WorkflowNodeFigure

public interface VisualElement
extends CH.ifa.draw.framework.Figure, InteractionClient

A visual element represents a figure of a process drawing. It supports visual status changes, element hierarchies, drag and drop and custom cursors/tools.

Author:
Heiko Erhardt

Field Summary
static int VISUAL_DISPLAY_ALL
          Display the entire content of the visual element
static int VISUAL_DND_PARTICIPANT
          Visual element is currently a drop target
static int VISUAL_VISIBLE
          Visual element is currently visible
 
Fields inherited from interface CH.ifa.draw.framework.Figure
POPUP_MENU
 
Method Summary
 VisualElement findVisualElement(int x, int y)
          Gets the visual element that is a child of this element and matches the given coordinates.
 VisualElement findVisualElementInside(int x, int y)
          Gets the visual element that is a child of this element and matches the given coordinates (recursively).
 ProcessDrawing getDrawing()
          Gets the drawing the element is a part of.
 VisualElement getParentElement()
          Gets parent element of this element, if any.
 CH.ifa.draw.framework.Figure getPresentationFigure()
          Gets the presentation figure of this element.
 boolean handleEvent(VisualElementEvent event)
          Handler method that is called for handling events.
 boolean isVisible()
          Gets the flag if the element is currently visible.
 void setDrawing(ProcessDrawing processDrawing)
          Sets the drawing the element is a part of.
 void setVisible(boolean visible)
          Sets the flag if the element is currently visible.
 void updatePresentationFigure()
          Updates (reinitializes) the presentation figure.
 
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, 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 org.openbp.jaspira.gui.interaction.InteractionClient
dragActionTriggered, dragEnded, dragStarted, getAllDropRegions, getAllImportersAt, getDropRegions, getImportersAt, getSubClients, importData
 

Field Detail

VISUAL_VISIBLE

static final int VISUAL_VISIBLE
Visual element is currently visible

See Also:
Constant Field Values

VISUAL_DND_PARTICIPANT

static final int VISUAL_DND_PARTICIPANT
Visual element is currently a drop target

See Also:
Constant Field Values

VISUAL_DISPLAY_ALL

static final int VISUAL_DISPLAY_ALL
Display the entire content of the visual element

See Also:
Constant Field Values
Method Detail

setDrawing

void setDrawing(ProcessDrawing processDrawing)
Sets the drawing the element is a part of.


getDrawing

ProcessDrawing getDrawing()
Gets the drawing the element is a part of.


getParentElement

VisualElement getParentElement()
Gets parent element of this element, if any.


getPresentationFigure

CH.ifa.draw.framework.Figure getPresentationFigure()
Gets the presentation figure of this element.

Returns:
The presentation figure
Note that this can be the visual element itself if it does not have a separate presentation figure

updatePresentationFigure

void updatePresentationFigure()
Updates (reinitializes) the presentation figure.


isVisible

boolean isVisible()
Gets the flag if the element is currently visible.


setVisible

void setVisible(boolean visible)
Sets the flag if the element is currently visible.


handleEvent

boolean handleEvent(VisualElementEvent event)
Handler method that is called for handling events. Events can be cursor events, selection events etc.

Parameters:
event - Event that desribes the event
Returns:
true: The event was handled by the element.
false: No special handling, perform the default handling.

findVisualElement

VisualElement findVisualElement(int x,
                                int y)
Gets the visual element that is a child of this element and matches the given coordinates.

Parameters:
x - World coordinates of the point to search
y - World coordinates of the point to search
Returns:
The element or null if no child element is located at the given position

findVisualElementInside

VisualElement findVisualElementInside(int x,
                                      int y)
Gets the visual element that is a child of this element and matches the given coordinates (recursively).

Parameters:
x - World coordinates of the point to search
y - World coordinates of the point to search
Returns:
The element or null if no child element is located at the given position


Copyright © 2011. All Rights Reserved.