gishur.graph.gui
Class DisplayEdge
java.lang.Object
|
+--gishur.gui2.DrawAtom
|
+--gishur.gui2.DrawObject
|
+--gishur.gui2.DisplayObject
|
+--gishur.gui2.DisplayInteractiveObject
|
+--gishur.graph.gui.DisplayGraphElement
|
+--gishur.graph.gui.DisplayEdge
- All Implemented Interfaces:
- ConnectionListener, java.util.EventListener
- public class DisplayEdge
- extends DisplayGraphElement
- implements ConnectionListener
DisplayObject
for Representation of an Edge
.
The recalculation parses also a data-array to the Painter
.
Data Array Entries |
Index |
Type |
Meaning |
0 |
gishur.graph.core.Edge |
The source Edge object (for reading properties via adapters) |
1 |
java.lang.Boolean |
If true , edges should be shown directed. |
2 |
java.lang.Integer |
The order number of the edge. |
3 |
gishur.graph.gui.DisplayNode |
The source DisplayNode (for getting docking
Points). |
4 |
gishur.graph.gui.DisplayNode |
The target DisplayNode (for getting docking
Points). |
Property prefix Summary |
Used Prefix |
Meaning |
edge |
Prefix for all properties used at this
class. |
info |
Prefix for all properties of the info box for this edge. |
Key |
Value Type |
Default value |
Meaning |
style |
Style |
None |
The EdgeStyle defining the shape and look of this
edge. |
info.style |
InfoStyle |
None |
The InfoStyle defining the appearance of
the infobox of this edge. |
Created Painters |
Painting order |
Name |
Type |
Tasks |
1 |
edge |
Painter |
Recalculates and draws the edge line. |
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, ensureRecalculate, 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.
showDirected
protected boolean showDirected()
- Returns
true
if the graph shows directed edges.
- Returns:
true
if the graph shows directed edges.
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
onInsert
public void onInsert(DrawEvent e)
- Invoked when a
DisplayObject
was inserted in the drawing hierachy.
- Specified by:
onInsert
in interface ConnectionListener
- Parameters:
e
- the DrawEvent
onRemove
public void onRemove(DrawEvent e)
- Invoked before a
DisplayObject
will be removed from the drawing hierachy.
- Specified by:
onRemove
in interface ConnectionListener
- Parameters:
e
- the DrawEvent
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.