|
|||||||||
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 | +--gishur.gui2.DisplayInteractiveObject
DisplayInteractiveObjects
extend
DisplayObjects
by some methods for interaction.
They support selection and activation.
Properties Summary | |||
Key | Value Type | Default value | Meaning |
active_element | java.util.Hashtable | - | All actual active elements and their active levels. |
element_transform | gishur.gui2.ElementTransform | - | The element transformation object for this DisplayObject. |
Layer
,
DisplayGroup
Field Summary | |
static byte |
ACTIVE
Layout state constant: object is activated |
static byte |
ACTIVE1
Layout state constant: Painter active level 1. |
static byte |
ACTIVE2
Layout state constant: Painter active level 2. |
static byte |
ACTIVE3
Layout state constant: Painter active level 3. |
static byte |
ACTIVE4
Layout state constant: Painter active level 4. |
static byte |
NORMAL
Layout state constant: normal state |
static byte |
SELECTED
Layout state constant: object is selected |
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 |
DisplayInteractiveObject(java.lang.String propertyprefix)
Constructs a new DisplayInteractiveObject which uses
the specified property prefix for all properties it needs.
|
Method Summary | |
void |
activate()
Activates this DisplayInteractiveObject if it
supports activation.
|
void |
activate(java.lang.String active_element)
Activates this DisplayInteractiveObject if it
supports activation.
|
boolean |
active()
Returns true , if this
DisplayInteractiveObject is active. |
protected void |
checkActiveElement(java.lang.String element)
This method is called by activate() . |
protected ElementTransform |
createElementTransform()
Creates a new element transformation object. |
void |
deactivate()
Deactivates this DisplayObject. |
ElementTransform |
elementTransform()
Returns the element transformation object for this object.
|
protected void |
refreshPropertyStatus(PropertyStatusReader prop,
java.lang.String element_name)
Refreshes the state of the given PropertyStatusReader
according to the state of this DisplayInteractiveObject
and to the given element. |
void |
select()
Selects this DisplayInteractiveObject if it supports
selection.
|
boolean |
selected()
Returns true , if this DisplayObject is selected. |
protected void |
setActiveElement(java.lang.String element_name,
byte active_level)
Sets the activated elements and their active levels. |
protected boolean |
setSupportActivation(boolean activation)
Permits or denies the DisplayInteractiveObject to support
activation. |
boolean |
setSupportElementTransform(boolean element_transform)
Permits or denies the DisplayObject to support element transformation. |
protected boolean |
setSupportSelection(boolean selection)
Permits or denies the DisplayObject to support selection. |
java.lang.Object |
source()
Returns the source object of this DisplayInteractiveObject
This method must be overwritten properly. |
boolean |
supportActivation()
Returns true , if the DisplayInteractiveObject
supports activation. |
boolean |
supportElementTransform()
Returns true , if this object supports
element transformations. |
boolean |
supportSelection()
Returns true , if the DisplayInteractiveObject
supports selection. |
void |
unselect()
Unselects this DisplayInteractiveObject .
|
Methods inherited from class gishur.gui2.DisplayObject |
addEventListener, calculateDockingPoint, calculateDockingPoint, next, parent, prev, processDrawEvent, removeEventListener |
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 |
Field Detail |
public static final byte NORMAL
public static final byte SELECTED
public static final byte ACTIVE
public static final byte ACTIVE1
Painter
active level 1.public static final byte ACTIVE2
Painter
active level 2.public static final byte ACTIVE3
Painter
active level 3.public static final byte ACTIVE4
Painter
active level 4.Constructor Detail |
protected DisplayInteractiveObject(java.lang.String propertyprefix)
DisplayInteractiveObject
which uses
the specified property prefix for all properties it needs.
Selection support, activation support and element transformation
support will be enabled by default.propertyprefix
- the prefix string for all properties usedMethod Detail |
public java.lang.Object source()
this
DisplayInteractiveObject
This method must be overwritten properly. The default implementation returns
null
.public boolean supportSelection()
true
, if the DisplayInteractiveObject
supports selection.true
, if the DisplayInteractiveObject
supports selection.protected boolean setSupportSelection(boolean selection)
selection
- if true
selection will be supportedpublic final boolean selected()
true
, if this
DisplayObject is selected.public final void select()
this
DisplayInteractiveObject
if it supports
selection.
This will generate a DrawEvent
(if the event mask for selection
is enabled) and cause this
DisplayInteractiveObject
to repaint itself via a call to DrawObject.makeDirty(boolean)
.supportSelection()
,
selected()
,
unselect()
public final void unselect()
this
DisplayInteractiveObject
.
This will generate a DrawEvent
(if the event mask for selection
is enabled) and cause this
DisplayInteractiveObject
to repaint itself via a call to DrawObject.makeDirty(boolean)
.selected()
,
select()
public boolean supportActivation()
true
, if the DisplayInteractiveObject
supports activation.true
, if the DisplayInteractiveObject
supports activation.protected boolean setSupportActivation(boolean activation)
DisplayInteractiveObject
to support
activation.activation
- if true
activation will be supportedpublic final boolean active()
true
, if this
DisplayInteractiveObject
is active.public final void activate()
this
DisplayInteractiveObject
if it
supports activation.
This will generate a DrawEvent
(if the event mask for activation
is enabled) and cause this
DisplayInteractiveObject
to repaint itself via a call to DrawObject.makeDirty(boolean)
.supportActivation()
,
active()
,
deactivate()
public final void activate(java.lang.String active_element)
this
DisplayInteractiveObject
if it
supports activation.
This will generate a DrawEvent
(if the event mask for activation
is enabled) and cause this
DisplayInteractiveObject
to repaint itself via a call to DrawObject.makeDirty(boolean)
. In addition
to activate()
this method allows to specify an active element
name (that could be a shape name. The checkActiveElement(java.lang.String)
method
will be called in order to verify the element name and to set elements
to various active levels vi the setActiveElement(java.lang.String, byte)
method.active_element
- the active elementactivate()
,
active()
,
deactivate()
protected final void setActiveElement(java.lang.String element_name, byte active_level)
checkActiveElement(java.lang.String)
method.element_name
- the name of the activated elementactive_level
- the active level of the element
(one of {ACTIVE1
,ACTIVE2
,ACTIVE3
,
ACTIVE3
}
)protected void checkActiveElement(java.lang.String element)
activate()
. It should check, which elements
should be set to which activation level if one does activate the element
with the given name. To specify the activated elements and their activation
levels, call setActiveElement(java.lang.String, byte)
for each element. Overwrite this
method in order to implement element activation correctly.element
- the element namepublic final void deactivate()
this
DisplayObject. This will generate a
DrawEvent
(if the event mask for activation is enabled)
and cause this
DisplayObject to repaint itself via a
call to DrawObject.makeDirty(boolean)
.active()
,
activate()
protected void refreshPropertyStatus(PropertyStatusReader prop, java.lang.String element_name)
PropertyStatusReader
according to the state of this
DisplayInteractiveObject
and to the given element. This method will be called by
PropertyStatusReader#refreshStatus
prop
- the PropertyStatusReader
to synchronizeelement_name
- the element name to synchronizepublic boolean supportElementTransform()
true
, if this
object supports
element transformations. In this case the method createElementTransform()
should be overwritten and return a value not null
. One
can get the element transformation object via elementTransform()
.true
, if this object supports element transformationssetSupportElementTransform(boolean)
public boolean setSupportElementTransform(boolean element_transform)
oldtrans
- if true
element transformation will be supportedpublic ElementTransform elementTransform()
this
object.
Only one single object instance will be created for each DisplayObject.
The created instance will be stored in the local properties under the
key "element_transform"
.this
object.protected ElementTransform createElementTransform()
elementTransform()
and should be overwritten by subclasses
in order to support element transformation objects correctly.this
DisplayInteractiveObjec
t.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |