Class sgraphics.TopViewer
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sgraphics.TopViewer

java.lang.Object
   |
   +----sgraphics.GlyphImpl
           |
           +----sgraphics.MonoGlyph
                   |
                   +----sgraphics.ViewerImpl
                           |
                           +----sgraphics.TopViewer

public class TopViewer
extends ViewerImpl
The TopViewer is topmost viewer in the viewer tree. Actually, a tree does not exist, but when a picker chain is assembled by pick(...), TopViewer is at the beginning of the list.

Constructor Index

 o TopViewer(Glyph, SgraphicsAdapter)
Construct a TopViewer.

Method Index

 o getSgraphicsAdapter()
 o grab(Viewer)
Grab all the events.
 o handleEvent(GraphicsEvent)
Handle the events.
 o needRedraw()
Redraws the whole glyph tree.
 o needRedraw(Area)
Redraws all glyphs overlapping with the area.
 o needResize()
Forces geometry calculation and redraws the whole glyph tree.
 o postEvent(GraphicsEvent)
Post an AWT event into the viewer system for processing.
 o ungrab()
Ungrab all the events.

Constructors

 o TopViewer
  public TopViewer(Glyph glyph,
                   SgraphicsAdapter adapter)
Construct a TopViewer.
Parameters:
glyph - the top most glyph in the glyph tree that TopViewer manages events for.
adapter - the Adapter that TopViewer processes events for.

Methods

 o handleEvent
  public boolean handleEvent(GraphicsEvent event)
Handle the events. This does not do anything.
Overrides:
handleEvent in class ViewerImpl
 o postEvent
  public boolean postEvent(GraphicsEvent event)
Post an AWT event into the viewer system for processing.
Parameters:
event - the event to be processed by the viewer system.
Returns:
true if processed. Event grabbing does not affect the return value.
 o grab
  public void grab(Viewer target)
Grab all the events. No other viewers will receive events untill ungrab is called.
Parameters:
target - the glyph to deliver the events to.
Overrides:
grab in class GlyphImpl
 o ungrab
  public void ungrab()
Ungrab all the events.
Overrides:
ungrab in class GlyphImpl
 o needRedraw
  public void needRedraw()
Redraws the whole glyph tree.
Overrides:
needRedraw in class GlyphImpl
 o needRedraw
  public void needRedraw(Area area)
Redraws all glyphs overlapping with the area.
Parameters:
area - the area that needs redrawing.
Overrides:
needRedraw in class GlyphImpl
 o needResize
  public void needResize()
Forces geometry calculation and redraws the whole glyph tree.
Overrides:
needResize in class GlyphImpl
 o getSgraphicsAdapter
  public SgraphicsAdapter getSgraphicsAdapter()
Overrides:
getSgraphicsAdapter in class GlyphImpl

All Packages  Class Hierarchy  This Package  Previous  Next  Index