Class gjt.rubberband.Rubberband
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class gjt.rubberband.Rubberband

java.lang.Object
   |
   +----gjt.rubberband.Rubberband

public class Rubberband
extends Object
A abstract base class for rubberbands.

Rubberbands do their rubberbanding inside of a Component, which must be specified at construction time.

Subclasses are responsible for implementing void drawLast(Graphics g) and void drawNext(Graphics g). drawLast() draws the appropriate geometric shape at the last rubberband location, while drawNext() draws the appropriate geometric shape at the next rubberband location. All of the underlying support for rubberbanding is taken care of here, including handling XOR mode setting; extensions of Rubberband need not concern themselves with anything but drawing the last and next geometric shapes.

See Also:
RubberbandLine, RubberbandRectangle, RubberbandEllipse, RubberbandTest

Variable Index

 o anchor
 o end
 o last
 o stretched

Constructor Index

 o Rubberband(Component)

Method Index

 o anchor(Point)
 o bounds()
 o drawLast(Graphics)
 o drawNext(Graphics)
 o end(Point)
 o getAnchor()
 o getEnd()
 o getLast()
 o getStretched()
 o lastBounds()
 o stretch(Point)

Variables

 o anchor
  protected Point anchor
 o stretched
  protected Point stretched
 o last
  protected Point last
 o end
  protected Point end

Constructors

 o Rubberband
  public Rubberband(Component component)

Methods

 o drawLast
  public abstract void drawLast(Graphics g)
 o drawNext
  public abstract void drawNext(Graphics g)
 o getAnchor
  public Point getAnchor()
 o getStretched
  public Point getStretched()
 o getLast
  public Point getLast()
 o getEnd
  public Point getEnd()
 o anchor
  public void anchor(Point p)
 o stretch
  public void stretch(Point p)
 o end
  public void end(Point p)
 o bounds
  public Rectangle bounds()
 o lastBounds
  public Rectangle lastBounds()

All Packages  Class Hierarchy  This Package  Previous  Next  Index