|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gishur.gui2.DrawAtom | +--gishur.gui2.BackgroundLayer
The basic BackgroundLayer for drawing backgrounds. This class should be
parent class for all other backgrounds. In this implementation the background
will simply cleared with the color specified in the properties list under
the key "background_color". To change the background color, simply change / set
the property in the BackgroundLayer or one of its parents properties list and
mark the BackgroundLayer as dirty (via makeDirty()
).
Properties Summary | |||
Key | Value Type | Default value | Meaning |
background_color | java.awt.Color | Color.lightGray | The background color. |
LayerManager
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 | |
BackgroundLayer()
The default constructor for BackgroundLayers. |
Method Summary | |
boolean |
dirty()
Returns true, if the object is currently marked as dirty. |
protected void |
draw(java.awt.Graphics g,
RenderContext context)
Draws this DrawAtom to the given
Graphics g .
|
void |
makeDirty()
Makes this object dirty and marks it for repainting. |
protected void |
recalculate(RenderContext context)
Forces the DrawAtom to recalculate its representation.
|
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 BackgroundLayer()
Method Detail |
protected 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 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 methodpublic boolean dirty()
public void makeDirty()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |