|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gishur.gui2.DrawAtom | +--gishur.gui2.Layer
Layers
are the top-level groups for
DisplayObjects
.
LayerManager
,
DisplayObject
,
DisplayGroup
,
DrawObject
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 | |
Layer()
Default Layer Constructor. |
Method Summary | |
void |
add(DrawObject drw)
Adds the DrawObject drw at the end of the layer.
|
void |
add(DrawObject drw,
boolean visible)
Adds the DrawObject drw at the end of the layer. |
void |
add(DrawShadow drw)
Adds the DrawShadow drw at the end of the layer. |
void |
clear()
Removes all member DrawObject s from this layer. |
protected void |
draw(java.awt.Graphics g,
RenderContext context)
Draws this DrawAtom to the given
Graphics g .
|
DrawObject |
first()
Returns the first element of the layer. |
RectangleShape |
getVisibleObjectArea(RectangleShape rect)
Calculates the area of all visible non-fullscreen DrawAtoms . |
void |
hide()
Hides the Layer ( ). |
void |
insert(DrawAtom p,
DrawObject drw)
Inserts the DrawObject drw in the layer
before p .
|
void |
insert(DrawAtom p,
DrawObject drw,
boolean visible)
Inserts the DrawObject drw in the layer
before p . |
void |
insert(DrawAtom p,
DrawShadow drw)
Inserts the DrawShadow drw in the layer
before p . |
DrawObject |
last()
Returns the last element of the layer. |
protected void |
recalculate(RenderContext context)
Forces the DrawAtom to recalculate its representation.
|
void |
remove(DrawObject drw)
Removes the given DrawObject from this layer. |
void |
remove(DrawShadow drw)
Removes the given DrawShadow from this layer. |
ScreenTransformation |
screenTransformation()
Returns the screen transformation for this Layer. |
void |
setScreenTransformation(ScreenTransformation transform)
Sets the screen transformation for this Layer. |
void |
show()
Shows the Layer ( ). |
boolean |
visible()
Returns true, if the Layer is visible. |
Methods inherited from class gishur.gui2.DrawAtom |
addProperties, collectHits, dispatchEvent, displayManager, drawComponent, getBounds, getLocalProperty, getProperty, getProperty, getRequiredProperty, locate, prepeareRenderContext, 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 |
public Layer()
Layer
Constructor.Method Detail |
public final void setScreenTransformation(ScreenTransformation transform)
ScreenTransformation
correctly, use this method instead of DrawAtom.setProperty(java.lang.String, java.lang.Object)
.transform
- the new ScreenTransformation
public final ScreenTransformation screenTransformation()
public DrawObject first()
public DrawObject last()
public void add(DrawObject drw)
DrawObject
drw
at the end of the layer.
The inserted element will be made visible via DrawObject.show(boolean)
.drw
- DrawObject to addpublic void insert(DrawAtom p, DrawObject drw)
DrawObject
drw
in the layer
before p
.
The inserted element will be made visible via DrawObject.show(boolean)
.p
- group member to insert before or null
to add
at the end of the layerdrw
- DrawObject to insertpublic void add(DrawObject drw, boolean visible)
DrawObject
drw
at the end of the layer.drw
- DrawObject to addvisible
- if true
, the element will be made visible
via DrawObject.show(boolean)
else it will be hiddenpublic void insert(DrawAtom p, DrawObject drw, boolean visible)
DrawObject
drw
in the layer
before p
.p
- layer member to insert before or null
to add
at the end of the layerdrw
- DrawObject to insertvisible
- if true
, the element will be made visible
via DrawObject.show(boolean)
else it will be hiddenpublic void remove(DrawObject drw)
DrawObject
from this layer. If the specified
DrawObject
has members, all members were removed first. Insertion
of the DrawObject
inserts only the DrawObject
-
without its members.drw
- DrawObject
to removepublic void clear()
DrawObject
s from this
layer.public void add(DrawShadow drw)
DrawShadow
drw
at the end of the layer.drw
- DrawShadow to addpublic void insert(DrawAtom p, DrawShadow drw)
DrawShadow
drw
in the layer
before p
.p
- group member to insert before or null
to add
at the end of the layerdrw
- DrawObject to insertpublic void remove(DrawShadow drw)
DrawShadow
from this layer.drw
- DrawShadow
to removepublic boolean visible()
Layer
is visible.public void hide()
Layer
(visible()
()==false
).public void show()
Layer
(visible()
()==true
).public RectangleShape getVisibleObjectArea(RectangleShape rect)
DrawAtoms
.rect
- initial RectangleShape
to unite with (or null
).RectangleShape
, if !=null
)protected final void recalculate(RenderContext context)
DrawAtom
to recalculate its representation.
This method will only be called, if it became dirty via a call
to the #makeDirty
method or something has happened, that
causes all DrawAtoms
to recalculate their
representation.
This method should only be called by the render system.recalculate
in class DrawAtom
context
- the RenderContext
to useprotected final void draw(java.awt.Graphics g, RenderContext context)
this
DrawAtom
to the given
Graphics
g
.
This method should only be called by the render system.draw
in class DrawAtom
g
- Graphics for drawingcontext
- the RenderContext
to useDrawException
- if invalid call to this method
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |