gishur.gui2
Class DisplayGroup

java.lang.Object
  |
  +--gishur.gui2.DrawAtom
        |
        +--gishur.gui2.DrawObject
              |
              +--gishur.gui2.DisplayGroup

public class DisplayGroup
extends DrawObject

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
DisplayGroup()
          Default DisplayGroup constructor.
 
Method Summary
 void add(DrawObject drw)
          Adds the DrawObject drw at the end of the group.
 void add(DrawObject drw, boolean visible)
          Adds the DrawObject drw at the end of the group.
 DrawObject child()
          Returns the first group element of the group.
 void clear()
          Removes all member DrawObject from this group.
 void insert(DrawObject p, DrawObject drw)
          Inserts the DrawObject drw in the group before p.
 void insert(DrawObject p, DrawObject drw, boolean visible)
          Inserts the DrawObject drw in the group before p.
 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 recalculate(RenderContext context, PropertyStatusReader properties)
          Forces the DrawAtom to recalculate its representation.
 void remove(DrawObject drw)
          Removes the given DrawObject from this group.
 
Methods inherited from class gishur.gui2.DrawObject
addDrawDependency, addPainter, blockRepaint, checkState, checkStateCleared, clearCache, clearState, dependency, dirty, disableEvents, draw, draw, enableEvents, ensureRecalculate, findPainter, firstPainter, fullscreen, hide, hide, levelMask, levelUsed, locate, makeDirty, makeDirty, next, nextPainter, prepeareRenderContext, prev, processDrawEvent, processEvent, propertyReader, recalculate, 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

DisplayGroup

public DisplayGroup()
Default DisplayGroup constructor.
Method Detail

recalculate

protected void recalculate(RenderContext context,
                           PropertyStatusReader properties)
Forces the DrawAtom to recalculate its representation. This method will only be called, if it became dirty via a call to the DrawObject.makeDirty(boolean) 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 DrawObject
Parameters:
context - the RenderContext to use
properties - the PropertyStatusReader to use for reading properties

next

public DrawObject next()
Returns the next DrawObject in the group or null if it is the last group element.
Overrides:
next in class DrawObject
Returns:
next DrawObject

prev

public DrawObject prev()
Returns the previous DrawObject in the group or null if it is the first group element.
Overrides:
prev in class DrawObject
Returns:
previous DrawObject

parent

public DrawObject parent()
Returns the parent group of this DrawObject.
Overrides:
parent in class DrawObject
Returns:
parent

child

public DrawObject child()
Returns the first group element of the group.
Overrides:
child in class DrawObject
Returns:
first child

add

public void add(DrawObject drw)
Adds the DrawObject drw at the end of the group. The inserted element will be made visible via DrawObject.show(boolean).
Parameters:
drw - DrawObject to add

insert

public void insert(DrawObject p,
                   DrawObject drw)
Inserts the DrawObject drw in the group before p. The inserted element will be made visible via DrawObject.show(boolean).
Overrides:
insert in class DrawObject
Parameters:
p - group member to insert before or null to add at the end of the group
drw - DrawObject to insert

add

public void add(DrawObject drw,
                boolean visible)
Adds the DrawObject drw at the end of the group.
Parameters:
drw - DrawObject to add
visible - if true, the element will be made visible via DrawObject.show(boolean) else it will be hidden

insert

public void insert(DrawObject p,
                   DrawObject drw,
                   boolean visible)
Inserts the DrawObject drw in the group before p.
Parameters:
p - group member to insert before or null to add at the end of the layer
drw - DrawObject to insert
visible - if true, the element will be made visible via DrawObject.show(boolean) else it will be hidden

remove

public void remove(DrawObject drw)
Removes the given DrawObject from this group. If the specified DrawObject has members, all members were removed first. Insertion of the DrawObject inserts only the DrawObject - without its members.
Overrides:
remove in class DrawObject
Parameters:
drw - DrawObject to remove

clear

public void clear()
Removes all member DrawObject from this group.
Overrides:
clear in class DrawObject