|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RubberBand
Defines the required functionality for creating a rubber band
Method Summary | |
---|---|
void |
addMouseListeners()
Enforces that the mouse listeners are added to the canvas |
void |
draw(Graphics g)
Draws the rubber band on the given Graphics object |
Rectangle |
getBounds()
Returns an integer Rectangle which contains the
size and location of this rubber band |
void |
setCanvas(RubberBandCanvas canvas)
Sets the canvas which the rubber band will be drawn onto |
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 |
update(int x,
int y,
int width,
int height)
Updates the parameters of the rubber band |
void |
updateRubberBand(EventObject event)
Called when the rubber band is being updated, typically on a mouse dragged event |
Method Detail |
---|
void addMouseListeners()
void draw(Graphics g)
Graphics
object
g
- the Graphics
object to draw the rubber band onRectangle getBounds()
Rectangle
which contains the
size and location of this rubber band
Rectangle
which contains the size and
location of this rubber bandvoid setCanvas(RubberBandCanvas canvas)
canvas
- the canvas which the rubber band will be drawn ontovoid update(int x, int y, int width, int height)
x
- the x coordinatey
- the y coordinatewidth
- the width of the rubber bandheight
- the height of the rubber bandvoid startRubberBand(EventObject event)
event
- the event that started the rubber bandvoid stopRubberBand(EventObject event)
event
- the event that stopped the rubber bandvoid updateRubberBand(EventObject event)
event
- the event that started the rubber band
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |