gishur.graph.gui
Class DisplayNode
java.lang.Object
|
+--gishur.gui2.DrawAtom
|
+--gishur.gui2.DrawObject
|
+--gishur.gui2.DisplayObject
|
+--gishur.gui2.DisplayInteractiveObject
|
+--gishur.graph.gui.DisplayGraphElement
|
+--gishur.graph.gui.DisplayNode
- public class DisplayNode
- extends DisplayGraphElement
DisplayObject
representing a Node
. The appearance of a DisplayNode
is highly configurable by the use of Painter
-objects, e.g. a
RoundNodePainter
. Besides, each to each node an info box can be assigned, whose
properties can be set with prefix info
. The Painters
are not stored locally, they are stored in the properties, which allows to draw large sets
of nodes with almost no overhead. To use Painters
defined higher
in the hierarchy, one has to remove the automatically created entry at this
object's properties.
Property prefix Summary |
Used Prefix |
Meaning |
node |
Prefix for all properties used at this
class. |
info |
Prefix for all properties of the info box for this node. |
Key |
Value Type |
Default value |
Meaning |
style |
Style |
None |
The NodeStyle defining the shape and look of this
node. |
info.style |
InfoStyle |
None |
The InfoStyle defining the appearance of
the infobox of this node. |
Created Painters |
Painting order |
Name |
Type |
Tasks |
1 |
node |
Painter |
Recalculates and draws the node. |
2 |
info |
InfoPainter |
Recalculates and draws the info box. |
- Version:
- 1.0
- Author:
- Thomas Wolf
Methods inherited from class gishur.gui2.DisplayInteractiveObject |
activate, activate, active, checkActiveElement, deactivate, elementTransform, refreshPropertyStatus, select, selected, setActiveElement, setSupportActivation, setSupportElementTransform, setSupportSelection, supportActivation, supportElementTransform, supportSelection, unselect |
Methods inherited from class gishur.gui2.DrawObject |
addDrawDependency, addPainter, blockRepaint, checkState, checkStateCleared, child, clear, clearCache, clearState, dirty, disableEvents, draw, draw, enableEvents, findPainter, firstPainter, fullscreen, hide, hide, insert, levelMask, levelUsed, locate, makeDirty, makeDirty, next, nextPainter, prepeareRenderContext, prev, processEvent, propertyReader, recalculate, remove, removeDrawDependency, repaint, screenTransformation, setFullscreen, setPaintBeforeMembers, setScreenTransformation, setState, show, show, state, state, unblockRepaint, unblockRepaint, visible |
Methods inherited from class gishur.gui2.DrawAtom |
addProperties, collectHits, displayManager, drawComponent, getBounds, getLocalProperty, getProperty, getProperty, getRequiredProperty, processMessage, properties, removeProperty, sendEvent, sendMessage, setBounds, setPropertiesTo, setProperty, setProperty, setProperty, setProperty, toString, toString, toTreeString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
source
public java.lang.Object source()
- Returns the source object of
this
DisplayInteractiveObject
This method must be overwritten properly. The default implementation returns
null
.
- Overrides:
source
in class DisplayInteractiveObject
- Returns:
- source object.
ensureRecalculate
protected void ensureRecalculate(RenderContext context)
- This method could be used, to ensure recalculation of the
DrawObject
. This may be useful, if another DrawObject
needs the representation of this
DrawObject
in order to be calculated correctly. To enable access to this
method from outside overwrite the method (by calling this implementation)
to put it to the same package.
- Overrides:
ensureRecalculate
in class DrawObject
- Parameters:
context
- must be a valid RenderContext
recalculate
protected void recalculate(RenderContext context,
PropertyStatusReader properties)
- Forces the
DrawAtom
to recalculate its representation.
This method will only be called, if it became dirty via a call
to the DrawObject.makeDirty(boolean)
method or something has happened, that
causes all DrawAtoms
to recalculate their
representation.
This method should only be called by the render system.
- Overrides:
recalculate
in class DrawObject
- Parameters:
context
- the RenderContext
to useproperties
- the PropertyStatusReader
to use for
reading properties
createElementTransform
protected ElementTransform createElementTransform()
- Creates a new element transformation object. This method will be called
by
DisplayInteractiveObject.elementTransform()
and should be overwritten by subclasses
in order to support element transformation objects correctly.
- Overrides:
createElementTransform
in class DisplayInteractiveObject
- Returns:
- new element transformation object for
this
DisplayObject.