org.openbp.cockpit.modeler.figures.tag
Class StraightTagFigure

java.lang.Object
  extended by CH.ifa.draw.standard.AbstractFigure
      extended by CH.ifa.draw.standard.CompositeFigure
          extended by org.openbp.cockpit.modeler.figures.tag.AbstractTagFigure
              extended by org.openbp.cockpit.modeler.figures.tag.StraightTagFigure
All Implemented Interfaces:
CH.ifa.draw.framework.Figure, CH.ifa.draw.framework.FigureChangeListener, CH.ifa.draw.util.Storable, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, ChildFigure, Expandable, ShadowDropper, UpdatableFigure, LayoutableTag, VisualElement, InteractionClient
Direct Known Subclasses:
ParamFigure

public class StraightTagFigure
extends AbstractTagFigure

Non-rotating tag figure that contains simple content that does not change its order when the tag is moved.

Author:
Stephan Moritz
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.openbp.cockpit.modeler.figures.tag.AbstractTagFigure
AbstractTagFigure.TagContent
 
Field Summary
protected  Orientation tagOrientation
          Direction the tag is facing
 
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
StraightTagFigure(VisualElement parent, java.lang.Object modelObject, java.awt.Point origin)
          Constructor.
 
Method Summary
 void basicSetAngle(double angle)
          Sets the angle to the given one.
 Orientation getTagOrientation()
          Gets the direction the tag is facing.
protected  void initTagLayouter()
          Creates the layouter for this tag.
protected  java.awt.Rectangle positionDisplayBox(java.awt.Rectangle rect)
          Positions the display box of the tag relative to its parent figure.
 
Methods inherited from class org.openbp.cockpit.modeler.figures.tag.AbstractTagFigure
addContent, addContentAt, applyContentState, basicDisplayBox, basicMoveBy, canConnect, changed, checkDecoratedContentState, compactDisplayBox, connectorAt, containsPoint, createPresentationFigure, determine2WayOrientation, determineDecoratedContentState, displayBox, dragActionTriggered, dragEnded, dragStarted, draw, findFigure, findFigureInside, findVisualElement, findVisualElementInside, getAllDropRegions, getAllImportersAt, getAngle, getCenterFigure, getCenterFigureBox, getContent, getContentFigureAt, getContentState, getDrawing, getDropRegions, getFillColor, getImportersAt, getLayouter, getNumberOfContents, getOrigin, getParent, getParentElement, getPresentationFigure, getShadow, getSubClients, getVisualStatus, handleEvent, handles, importData, initContent, initPresentationFigure, initShadow, invalidate, isVerticalOrientation, isVisible, layoutTag, moveContent, read, setAngle, setContentState, setDrawing, setFillColor, setLayouter, setOrigin, setParent, setVisible, setVisualStatus, updateFigure, updatePresentationFigure, write
 
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, release, remove, removeAll, removeAll, removeAll, replace, sendToBack, sendToLayer
 
Methods inherited from class CH.ifa.draw.standard.AbstractFigure
addFigureChangeListener, addToContainer, center, clone, connectedTextLocator, 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, toString, wait, wait, wait
 
Methods inherited from interface CH.ifa.draw.framework.FigureChangeListener
figureChanged, figureInvalidated, figureRemoved, figureRequestRemove, figureRequestUpdate
 
Methods inherited from interface CH.ifa.draw.framework.Figure
addFigureChangeListener, addToContainer, center, clone, connectedTextLocator, connectionInsets, connectorVisibility, decompose, displayBox, displayBox, figures, getAttribute, getZValue, includes, isEmpty, listener, moveBy, release, removeFigureChangeListener, removeFromContainer, setAttribute, setZValue, size, willChange
 

Field Detail

tagOrientation

protected Orientation tagOrientation
Direction the tag is facing

Constructor Detail

StraightTagFigure

public StraightTagFigure(VisualElement parent,
                         java.lang.Object modelObject,
                         java.awt.Point origin)
Constructor.

Parameters:
parent - Parent figure
origin - Origin of the tag
modelObject - Model object this tag represents or null
Method Detail

initTagLayouter

protected void initTagLayouter()
Creates the layouter for this tag. By default, this is a HorizontalLayouter

Overrides:
initTagLayouter in class AbstractTagFigure

positionDisplayBox

protected java.awt.Rectangle positionDisplayBox(java.awt.Rectangle rect)
Positions the display box of the tag relative to its parent figure. The method will place the display box adjacent to the parent at the given orientation.

Overrides:
positionDisplayBox in class AbstractTagFigure
Parameters:
rect - Rectangle object that contains the size of the figure
Returns:
The new display box rectangle of the presentation figure
See Also:
AbstractTagFigure.positionDisplayBox(Rectangle rect)

getTagOrientation

public Orientation getTagOrientation()
Gets the direction the tag is facing.


basicSetAngle

public void basicSetAngle(double angle)
Description copied from class: AbstractTagFigure
Sets the angle to the given one.

Overrides:
basicSetAngle in class AbstractTagFigure


Copyright © 2011. All Rights Reserved.