|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gishur.gui2.DrawAtom | +--gishur.gui2.DrawObject | +--gishur.gui2.DisplayObject
The basis class for all higher-level drawable objects. DisplayObject
s
can be inserted into Layer
s and DisplayGroup
s.
DisplayObject
extends DrawObject
by the support of
Painters
for flexible and easy drawing, a
PropertyStatusReader
that can be used to read properties easily and
EventListeners
to process internal DrawEvents
outside of the DisplayObject
.
Layer
,
DisplayGroup
Fields inherited from class gishur.gui2.DrawAtom |
BLOCK_REPAINT, MARK_RECALC, MARK_REPAINT, MARK_SIZE, REPAINT, UNBLOCK_REPAINT, USER_STATES_FIRST, USER_STATES_MASK |
Constructor Summary | |
protected |
DisplayObject(java.lang.String property_prefix)
Constructs a new DisplayObject which uses the given
prefix for all properties. |
Method Summary | |
void |
addEventListener(java.util.EventListener listener)
Adds the given EventListener to this
DisplayObject.
|
java.awt.Point |
calculateDockingPoint(int x,
int y)
Calculates a docking point, that means a point on the outline of the DisplayObject , that lies nearest to the given point.
|
java.awt.Point |
calculateDockingPoint(java.awt.Point p)
Calculates a docking point, that means a point on the outline of the DisplayObject , that lies nearest to the given point.
|
DrawObject |
next()
Returns the next DrawObject in the group or null
if it is the last group element. |
DrawObject |
parent()
Returns the parent group of this DrawObject . |
DrawObject |
prev()
Returns the previous DrawObject in the group or null
if it is the first group element. |
protected void |
processDrawEvent(DrawEvent e)
Processes DrawEvent s occuring on this
DisplayObject. |
void |
removeEventListener(java.util.EventListener listener)
Removes the specified EventListener from this
DisplayObject. |
Methods inherited from class gishur.gui2.DrawObject |
addDrawDependency, addPainter, blockRepaint, checkState, checkStateCleared, child, clear, clearCache, clearState, dependency, dirty, disableEvents, draw, draw, enableEvents, ensureRecalculate, findPainter, firstPainter, fullscreen, hide, hide, insert, levelMask, levelUsed, locate, makeDirty, makeDirty, next, nextPainter, prepeareRenderContext, prev, processEvent, propertyReader, recalculate, 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, dispatchEvent, displayManager, drawComponent, getBounds, getLocalProperty, getProperty, getProperty, getRequiredProperty, preprocessEvent, processMessage, properties, removeProperty, sendEvent, sendMessage, setBounds, setPropertiesTo, setProperty, setProperty, setProperty, setProperty, toString, toString, toStringDetail, toTreeString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
protected DisplayObject(java.lang.String property_prefix)
DisplayObject
which uses the given
prefix for all properties.property_prefix
- the prefix string used for all read
propertiesMethod Detail |
public java.awt.Point calculateDockingPoint(int x, int y)
DisplayObject
, that lies nearest to the given point.
The implementation of this method calls Painter.calculateDockingPoint(int, int)
of the first Painter
of this DisplayObject
.
Overwrite this method in order to return correct docking points.x,y
- point, where to come from for docking.public final java.awt.Point calculateDockingPoint(java.awt.Point p)
DisplayObject
, that lies nearest to the given point.
The implementation of this method calls Painter.calculateDockingPoint(int, int)
of the first Painter
of this DisplayObject
.
Overwrite this method in order to return correct docking points.x,y
- point, where to come from for docking.public void addEventListener(java.util.EventListener listener)
EventListener
to this
DisplayObject.
Known listeners will cause this method to enable the appropriate event
types to be delivered to DrawObject.processEvent(java.awt.AWTEvent)
. Event processing
to the registered listeners works only with known event listeners.
The supported listeners are:
GeneralAWTEventListener
ConnectionListener
RecalcListener
DirtyListener
VisibilityListener
ActivationListener
SelectionListener
EnableListener
listener
- new EventListenerpublic void removeEventListener(java.util.EventListener listener)
EventListener
from this
DisplayObject.listener
- the EventListener to removeprotected void processDrawEvent(DrawEvent e)
DrawEvent
s occuring on this
DisplayObject. This methods delivers the events to all registered
EventListeners.
The supported listeners are:
GeneralAWTEventListener
ConnectionListener
RecalcListener
DirtyListener
VisibilityListener
ActivationListener
SelectionListener
EnableListener
processDrawEvent
in class DrawObject
e
- DrawEvent
to processpublic DrawObject next()
DrawObject
in the group or null
if it is the last group element.next
in class DrawObject
DrawObject
public DrawObject prev()
DrawObject
in the group or null
if it is the first group element.prev
in class DrawObject
public DrawObject parent()
this
DrawObject
.parent
in class DrawObject
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |