org.openbp.cockpit.modeler.figures.process
Class PlaceholderNodeFigure

java.lang.Object
  extended by CH.ifa.draw.standard.AbstractFigure
      extended by CH.ifa.draw.standard.CompositeFigure
          extended by org.openbp.cockpit.modeler.figures.process.NodeFigure
              extended by org.openbp.cockpit.modeler.figures.process.MultiSocketNodeFigure
                  extended by org.openbp.cockpit.modeler.figures.process.PlaceholderNodeFigure
All Implemented Interfaces:
CH.ifa.draw.framework.Figure, CH.ifa.draw.framework.FigureChangeListener, CH.ifa.draw.standard.TextHolder, CH.ifa.draw.util.Storable, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, Colorizable, Expandable, ShadowDropper, UpdatableFigure, ProcessElementContainer, VisualElement, InteractionClient

public class PlaceholderNodeFigure
extends MultiSocketNodeFigure

Placeholder figure.

Author:
Heiko Erhardt
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.openbp.cockpit.modeler.figures.process.NodeFigure
displayBox, iconFigure, iconOverlayFigure, node, presentationFigure, REGION_TYPE, ROTATE_CCW, ROTATE_CW, shadowFigure
 
Fields inherited from class CH.ifa.draw.standard.CompositeFigure
_nHighestZ, _nLowestZ, fFigures
 
Fields inherited from interface CH.ifa.draw.framework.Figure
POPUP_MENU
 
Fields inherited from interface org.openbp.cockpit.modeler.figures.VisualElement
VISUAL_DISPLAY_ALL, VISUAL_DND_PARTICIPANT, VISUAL_VISIBLE
 
Constructor Summary
PlaceholderNodeFigure()
          Constructor.
 
Method Summary
protected  void assignPlaceholderReference(ModelObject mo)
          Assigns a reference to the given model object to this placeholder node figure.
 void assignPlaceholderReference(java.lang.String referencePath)
          Assigns a reference to the given model object to this placeholder node figure.
protected  java.lang.String getDropRegionIdForFlavor(java.util.List flavors, java.awt.datatransfer.Transferable data, java.awt.event.MouseEvent mouseEvent)
          Determines if none of the flavors in the list is accepted by DnD actions.
 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.
protected  void substitutePlaceholderNode(Node newNode, boolean newNodeFlag)
           
 void updateFigure()
          In addition to synchronization all children, synchronizes the presentation figure if applicable.
 
Methods inherited from class org.openbp.cockpit.modeler.figures.process.MultiSocketNodeFigure
determineCenterIcon, getDefaultFillColor, getDropRegions, getImportersAt, initIcon, initOverlayIcon, initTextFigure, removeSocket
 
Methods inherited from class org.openbp.cockpit.modeler.figures.process.NodeFigure
acceptsTyping, addSocket, basicDisplayBox, basicMoveBy, center, changed, changeOrientation, clone, compactDisplayBox, connect, connect, connectorAt, containsPoint, createNodeDropRegion, decodeGeometry, decodeParameter, determineCustomIcon, determineCustomIconPath, disconnect, displayBox, dragActionTriggered, dragEnded, dragStarted, draw, drawSelectionMarker, encodeGeometry, findFigure, findFigureInside, findProcessElementContainer, findProcessElementContainerInside, findVisualElement, findVisualElementInside, flipOrientation, getAllDropRegions, getAllImportersAt, getConnectableSocket, getDrawing, getFillColor, getFont, getNode, getParentElement, getPresentationFigure, getProcessElement, getReferredProcessElement, getShadow, getSocket, getSubClients, getText, handles, initialize, initPresentationFigure, initShadow, initSockets, isCreatedFromScratch, isPresentationFigureVisible, isVerticallyOriented, isVisible, layoutSockets, layoutUnarrangedSockets, overlayColumns, placeAdjacent, positionOverlayFigure, release, removeConnections, selectionOnDelete, setCreatedFromScratch, setDrawing, setFillColor, setIconFigure, setIconOverlayFigure, setSize, setText, setVisible, textDisplayBox, toString, translateChildren, updatePresentationFigure
 
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, read, remove, removeAll, removeAll, removeAll, replace, sendToBack, sendToLayer, write
 
Methods inherited from class CH.ifa.draw.standard.AbstractFigure
addFigureChangeListener, addToContainer, canConnect, connectedTextLocator, connectionInsets, connectorVisibility, 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, wait, wait, wait
 
Methods inherited from interface org.openbp.cockpit.modeler.figures.generic.Colorizable
getFillColor, setFillColor
 
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 CH.ifa.draw.framework.FigureChangeListener
figureChanged, figureInvalidated, figureRemoved, figureRequestRemove, figureRequestUpdate
 

Constructor Detail

PlaceholderNodeFigure

public PlaceholderNodeFigure()
Constructor.

Method Detail

handleEvent

public boolean handleEvent(VisualElementEvent event)
Description copied from interface: VisualElement
Handler method that is called for handling events. Events can be cursor events, selection events etc.

Specified by:
handleEvent in interface VisualElement
Overrides:
handleEvent in class NodeFigure
Parameters:
event - Event that desribes the event
Returns:
true: The event was handled by the element.
false: No special handling, perform the default handling.
See Also:
VisualElement.handleEvent(VisualElementEvent event)

updateFigure

public void updateFigure()
Description copied from class: NodeFigure
In addition to synchronization all children, synchronizes the presentation figure if applicable.

Specified by:
updateFigure in interface UpdatableFigure
Overrides:
updateFigure in class NodeFigure
See Also:
NodeFigure.updateFigure()

getDropRegionIdForFlavor

protected java.lang.String getDropRegionIdForFlavor(java.util.List flavors,
                                                    java.awt.datatransfer.Transferable data,
                                                    java.awt.event.MouseEvent mouseEvent)
Determines if none of the flavors in the list is accepted by DnD actions.

Overrides:
getDropRegionIdForFlavor in class MultiSocketNodeFigure
Parameters:
flavors - Flavors to check
data - Transferred object
mouseEvent - Mouse event of the DnD drop action
Returns:
The region id that should be used for the accepted flavor or null if the flavor is not accepted

importData

public boolean importData(java.lang.Object regionId,
                          java.awt.datatransfer.Transferable data,
                          java.awt.Point p)
Description copied from interface: InteractionClient
Imports the given transferable into the given region.

Specified by:
importData in interface InteractionClient
Overrides:
importData in class MultiSocketNodeFigure
Parameters:
regionId - Id of the region to import into (see BasicDropRegion.getId)
data - Transferable to import
p - Drop point in glass coordinates
Returns:
true The data was successfully imported.
false An error occured while importing the data.
See Also:
InteractionClient.importData(Object, Transferable, Point)

assignPlaceholderReference

protected void assignPlaceholderReference(ModelObject mo)
Assigns a reference to the given model object to this placeholder node figure.

Parameters:
mo - Model object to reference

assignPlaceholderReference

public void assignPlaceholderReference(java.lang.String referencePath)
Assigns a reference to the given model object to this placeholder node figure.

Parameters:
referencePath - Reference path to assign

substitutePlaceholderNode

protected void substitutePlaceholderNode(Node newNode,
                                         boolean newNodeFlag)


Copyright © 2011. All Rights Reserved.