All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----gjt.rubberband.Rubberband
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. Extensions may get information about where to draw their shape from getAnchor(), getStretched(), and getLast(), and getEnd(), all of which return a Point.
protected Point anchorPt
protected Point stretchedPt
protected Point lastPt
protected Point endPt
public Rubberband()
public Rubberband(Component c)
public abstract void drawLast(Graphics g)
public abstract void drawNext(Graphics g)
public void setActive(boolean b)
public void setComponent(Component c)
public boolean isActive()
public Point getAnchor()
public Point getStretched()
public Point getLast()
public Point getEnd()
public void anchor(Point p)
public void stretch(Point p)
public void end(Point p)
public Rectangle getBounds()
public Rectangle lastBounds()
All Packages Class Hierarchy This Package Previous Next Index