gishur.gui2
Class DrawShadow

java.lang.Object
  |
  +--gishur.gui2.DrawAtom
        |
        +--gishur.gui2.DrawShadow

public class DrawShadow
extends DrawAtom

Shadows levels of another DrawAtom.

Version:
1.0
Author:
Thomas Wolf

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
DrawShadow(DrawAtom source)
          Constructs a new DrawShadow shadowing the given source DrawAtom.
DrawShadow(DrawAtom source, byte level_mask)
          Constructs a new DrawShadow shadowing the given source DrawAtom.
DrawShadow(DrawAtom source, byte level_mask, boolean remove_source_levels)
          Constructs a new DrawShadow shadowing the given source DrawAtom.
 
Method Summary
 void add(DrawShadow drw)
          Adds the DrawShadow drw at the end of this DrawShadow.
protected  void draw(java.awt.Graphics g, RenderContext context)
          Draws this DrawAtom to the given Graphics g.
 void insert(DrawShadow p, DrawShadow drw)
          Inserts the DrawShadow drw in this DrawShadow before p.
 byte levelMask()
          Returns the level mask (a combination of levels, that are displayed by this DrawObject).
protected  void preprocessEvent(int id, DrawAtom sender)
          Preprocesses the event specified via its id sent by the given source.
protected  void recalculate(RenderContext context)
          Forces the DrawAtom to recalculate its representation.
 void remove(DrawShadow drw)
          Removes the given DrawShadow from this DrawShadow.
 
Methods inherited from class gishur.gui2.DrawAtom
addProperties, collectHits, dispatchEvent, displayManager, drawComponent, getBounds, getLocalProperty, getProperty, getProperty, getRequiredProperty, locate, prepeareRenderContext, 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

DrawShadow

public DrawShadow(DrawAtom source)
Constructs a new DrawShadow shadowing the given source DrawAtom.

DrawShadow

public DrawShadow(DrawAtom source,
                  byte level_mask,
                  boolean remove_source_levels)
Constructs a new DrawShadow shadowing the given source DrawAtom.

DrawShadow

public DrawShadow(DrawAtom source,
                  byte level_mask)
Constructs a new DrawShadow shadowing the given source DrawAtom.
Method Detail

levelMask

public byte levelMask()
Returns the level mask (a combination of levels, that are displayed by this DrawObject).
Returns:
level mask

add

public void add(DrawShadow drw)
Adds the DrawShadow drw at the end of this DrawShadow.
Parameters:
drw - DrawShadow to add

insert

public void insert(DrawShadow p,
                   DrawShadow drw)
Inserts the DrawShadow drw in this DrawShadow before p.
Parameters:
p - group member to insert before or null to add at the end of this DrawShadow
drw - DrawObject to insert

remove

public void remove(DrawShadow drw)
Removes the given DrawShadow from this DrawShadow.
Parameters:
drw - DrawShadow to remove

preprocessEvent

protected void preprocessEvent(int id,
                               DrawAtom sender)
Preprocesses the event specified via its id sent by the given source. This method will be called by events produced by the DrawAtom itself and by DrawAtom where this depends from. The method will be called before events are filtered out.
Overrides:
preprocessEvent in class DrawAtom
Parameters:
id - the event id
sender - the source of the event
See Also:
DrawEvent

recalculate

protected void recalculate(RenderContext context)
Forces the 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.
Overrides:
recalculate in class DrawAtom
Parameters:
context - the RenderContext to use

draw

protected void draw(java.awt.Graphics g,
                    RenderContext context)
Draws this DrawAtom to the given Graphics g. This method should only be called by the render system.
Overrides:
draw in class DrawAtom
Parameters:
g - Graphics for drawing
context - the RenderContext to use
Throws:
DrawException - if invalid call to this method