net.java.swingfx.rubberband.rubberbands
Class AnimatedRectangularRubberBand
java.lang.Object
javax.swing.event.MouseInputAdapter
net.java.swingfx.rubberband.rubberbands.AbstractRubberBand
net.java.swingfx.rubberband.rubberbands.RectangularRubberBand
net.java.swingfx.rubberband.rubberbands.AnimatedRectangularRubberBand
- All Implemented Interfaces:
- MouseListener, MouseMotionListener, EventListener, MouseInputListener, RubberBand
public class AnimatedRectangularRubberBand
- extends RectangularRubberBand
A RubberBand
which is rectangular and animated
- Since:
- 1.0
$Revision: 1.1 $
- Author:
- rwickesser
Method Summary |
void |
draw(Graphics g)
Draws the rubber band on the given Graphics object |
void |
startRubberBand(EventObject event)
Called when the rubber band is first created, typically on a mouse pressed
event |
void |
stopRubberBand(EventObject event)
Called when the rubber band is done being created, typically on a mouse released
event |
void |
updateRubberBand(EventObject event)
Called when the rubber band is being updated, typically on a mouse dragged
event |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AnimatedRectangularRubberBand
public AnimatedRectangularRubberBand(RubberBandCanvas canvas)
- Creates a new rubber band which is rectangular and animated
- Parameters:
canvas
- the canvas to draw the rubber band on
draw
public void draw(Graphics g)
- Description copied from interface:
RubberBand
- Draws the rubber band on the given
Graphics
object
- Specified by:
draw
in interface RubberBand
- Overrides:
draw
in class RectangularRubberBand
- Parameters:
g
- the Graphics
object to draw the rubber band on
startRubberBand
public void startRubberBand(EventObject event)
- Description copied from interface:
RubberBand
- Called when the rubber band is first created, typically on a mouse pressed
event
- Specified by:
startRubberBand
in interface RubberBand
- Overrides:
startRubberBand
in class RectangularRubberBand
- Parameters:
event
- the event that started the rubber band
stopRubberBand
public void stopRubberBand(EventObject event)
- Description copied from interface:
RubberBand
- Called when the rubber band is done being created, typically on a mouse released
event
- Specified by:
stopRubberBand
in interface RubberBand
- Overrides:
stopRubberBand
in class RectangularRubberBand
- Parameters:
event
- the event that stopped the rubber band
updateRubberBand
public void updateRubberBand(EventObject event)
- Description copied from interface:
RubberBand
- Called when the rubber band is being updated, typically on a mouse dragged
event
- Specified by:
updateRubberBand
in interface RubberBand
- Overrides:
updateRubberBand
in class RectangularRubberBand
- Parameters:
event
- the event that started the rubber band