org.openbp.cockpit.modeler.figures.generic
Class MoveableTitleFigure

java.lang.Object
  extended by CH.ifa.draw.standard.AbstractFigure
      extended by CH.ifa.draw.figures.AttributeFigure
          extended by CH.ifa.draw.figures.TextFigure
              extended by org.openbp.cockpit.modeler.figures.generic.MoveableTitleFigure
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, TitleFigure, UpdatableFigure

public class MoveableTitleFigure
extends CH.ifa.draw.figures.TextFigure
implements TitleFigure

Moveable text figure that is connected to a given display object (the client) and displays either the name or the display text of the object. The figure extends the default JHotDraw text figure, thus supporting figure movement and resizing.

Author:
Stephan Moritz
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface CH.ifa.draw.framework.Figure
POPUP_MENU
 
Constructor Summary
MoveableTitleFigure()
          Constructor.
MoveableTitleFigure(DisplayObject client)
          Constructor.
 
Method Summary
 DisplayObject getClient()
          Gets the the display object we are connected with.
 java.lang.String getTitleFormat()
          Gets the title format.
 boolean isVerboseDisplay()
          Gets the flag if the display text or the object name should be displayed if there is no display name of the client object.
 void setClient(DisplayObject client)
          Sets the the display object we are connected with.
 void setTitleFormat(java.lang.String titleFormat)
          Sets the title format.
 void setVerboseDisplay(boolean verboseDisplay)
          Sets the flag if the display text or the object name should be displayed if there is no display name of the client object.
 void updateFigure()
          Synchronizes this figure with its provider, i\.e\. the object that is represented by the figure.
 
Methods inherited from class CH.ifa.draw.figures.TextFigure
acceptsTyping, basicDisplayBox, basicMoveBy, changed, connect, createCurrentFont, disconnect, displayBox, drawBackground, drawFrame, figureChanged, figureInvalidated, figureRemoved, figureRequestRemove, figureRequestUpdate, getAttribute, getFont, getText, handles, moveBy, overlayColumns, read, readOnly, release, setAttribute, setCurrentFontName, setCurrentFontSize, setCurrentFontStyle, setFont, setReadOnly, setText, textDisplayBox, updateLocation, write
 
Methods inherited from class CH.ifa.draw.figures.AttributeFigure
draw, getDefaultAttribute, getFillColor, getFrameColor
 
Methods inherited from class CH.ifa.draw.standard.AbstractFigure
addFigureChangeListener, addToContainer, canConnect, center, clone, connectedTextLocator, connectionInsets, connectorAt, connectorVisibility, containsPoint, decompose, displayBox, displayBox, figures, findFigureInside, getZValue, includes, invalidate, isEmpty, listener, removeFigureChangeListener, removeFromContainer, setZValue, size, willChange
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openbp.cockpit.modeler.figures.generic.TitleFigure
getText, setText
 
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
 

Constructor Detail

MoveableTitleFigure

public MoveableTitleFigure()
Constructor.


MoveableTitleFigure

public MoveableTitleFigure(DisplayObject client)
Constructor.

Parameters:
client - The display object we are connected with
Method Detail

updateFigure

public void updateFigure()
Description copied from interface: UpdatableFigure
Synchronizes this figure with its provider, i\.e\. the object that is represented by the figure. Updates the figure according to the current properties of the provider.

Specified by:
updateFigure in interface UpdatableFigure

getClient

public DisplayObject getClient()
Description copied from interface: TitleFigure
Gets the the display object we are connected with.

Specified by:
getClient in interface TitleFigure

setClient

public void setClient(DisplayObject client)
Description copied from interface: TitleFigure
Sets the the display object we are connected with.

Specified by:
setClient in interface TitleFigure

getTitleFormat

public java.lang.String getTitleFormat()
Description copied from interface: TitleFigure
Gets the title format. The title format determines how the title is to be formatted. The following placehodlers apply:
$name - Name of the underlying DisplayObject
$text - Display text (i. e. display name or name) of the underlying DisplayObject

Specified by:
getTitleFormat in interface TitleFigure

setTitleFormat

public void setTitleFormat(java.lang.String titleFormat)
Description copied from interface: TitleFigure
Sets the title format. The title format determines how the title is to be formatted. The following placehodlers apply:
$name - Name of the underlying DisplayObject
$text - Display text (i. e. display name or name) of the underlying DisplayObject

Specified by:
setTitleFormat in interface TitleFigure

isVerboseDisplay

public boolean isVerboseDisplay()
Description copied from interface: TitleFigure
Gets the flag if the display text or the object name should be displayed if there is no display name of the client object.

Specified by:
isVerboseDisplay in interface TitleFigure

setVerboseDisplay

public void setVerboseDisplay(boolean verboseDisplay)
Description copied from interface: TitleFigure
Sets the flag if the display text or the object name should be displayed if there is no display name of the client object.

Specified by:
setVerboseDisplay in interface TitleFigure


Copyright © 2011. All Rights Reserved.