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

Class sgraphics.Picker

java.lang.Object
   |
   +----sgraphics.Picker

public class Picker
extends Object
Picker is used to pick the glyph tree.

Variable Index

 o area
Area for a DAMAGE based pick.
 o AREA
 o height
 o hitType
The type of hit.
 o POINT
 o width
 o x
 o y

Constructor Index

 o Picker(Picker, Viewer)
 o Picker(Viewer, Area)
Create a picker using an area.
 o Picker(Viewer, GraphicsEvent)
Create a picker using an event.

Method Index

 o attach(Picker)
 o detach(Picker)
 o getNext()
 o getPrevious()
 o getViewer()
 o hit()
 o hit(Glyph)
Call hit when the event intersects a glyph.
 o hitList()
Get the hit list.
 o hits()
Get the number of hits.
 o setPrevious(Picker)

Variables

 o AREA
  public final static int AREA
 o POINT
  public final static int POINT
 o hitType
  public int hitType
The type of hit. Can be AREA or POINT.
 o x
  public float x
 o y
  public float y
 o width
  public float width
 o height
  public float height
 o area
  public Area area
Area for a DAMAGE based pick.

Constructors

 o Picker
  public Picker(Viewer viewer,
                GraphicsEvent event)
Create a picker using an event.
Parameters:
event - the event to use to set the x and y.
 o Picker
  public Picker(Picker picker,
                Viewer viewer)
 o Picker
  public Picker(Viewer viewer,
                Area a)
Create a picker using an area. The alignment is not used.
Parameters:
a - the area to use to set the x, y, length, and height.

Methods

 o hit
  public void hit(Glyph g)
Call hit when the event intersects a glyph.
Parameters:
g - the glyph that was hit.
 o hit
  public boolean hit()
 o hits
  public int hits()
Get the number of hits.
Returns:
the number of hits.
 o hitList
  public Glyph[] hitList()
Get the hit list. Do not use the length of the list to determine the number of elements. Call hits() instead. This list may be longer than the number of hits.
Returns:
the hit list.
 o attach
  public void attach(Picker pick)
 o setPrevious
  protected void setPrevious(Picker pick)
 o detach
  public void detach(Picker pick)
 o getNext
  public Picker getNext()
 o getPrevious
  public Picker getPrevious()
 o getViewer
  public Viewer getViewer()

All Packages  Class Hierarchy  This Package  Previous  Next  Index