|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
A generic DrawingCanvas on which Figures can be drawn and manipulated. It is expected that this will typically implemented by some sort of graphical Component but that is not necessary.
| Method Summary | |
void |
addHandle(Handle handle)
Add the handle to the receiver. |
void |
addHandles(Figure figure)
Add the handles corresponding to the figure to the receiver. |
void |
addHandles(Figure figure,
Handle[] handles)
Add the handles corresponding to the figure to the receiver. |
void |
addSelection(Figure figure)
Add the figure to the selections. |
void |
clearSelections()
Clear all the selections of the receiver. |
Handle[] |
getHandles()
Answer the handles of the receiver. |
Locator |
getLocator(int x,
int y)
Answer the locator that should be used for the given coordinates |
Figure[] |
getSelections()
Answer the selections of the receiver. |
DrawingStyle |
getStyle()
Answer the style which defines how to paint on the canvas. |
InputEventHandler |
getTool()
Answer the active tool |
Handle |
handleAt(int x,
int y)
Answer the handle at a given point |
void |
removeHandle(Handle handle)
Remove the handle from the receiver. |
void |
removeHandles(Figure figure)
Remove the handles corresponding to the figure to the receiver. |
void |
removeSelection(Figure figure)
Remove the figure from the selections. |
void |
repaint(java.awt.Rectangle rectangle)
Repaints part of the canvas. |
void |
select(Figure figure)
Make the figure the only selection Reflect the change if it's visible. |
void |
setSize(java.awt.Dimension size)
Set the size of the receiver. |
void |
setSize(int width,
int height)
Set the size of the receiver. |
void |
setStyle(DrawingStyle style)
Set the style defining how to paint on the canvas. |
void |
setTool(InputEventHandler tool)
Set the active tool |
void |
toggleSelection(Figure figure)
Toggle whether or not the figure is selected. |
void |
toolTaskCompleted(InputEventHandler tool)
Take appropriate action when the tool has completed its task. |
| Methods inherited from interface com.rolemodelsoft.drawlet.SequenceOfFigures |
addFigure,
addFigureBehind,
figureAt,
figures,
moveFigureBehind,
moveFigureInFront,
moveFigureToBack,
moveFigureToFront,
otherFigureAt,
removeFigure |
| Methods inherited from interface com.rolemodelsoft.drawlet.Paintable |
getBottom,
getBounds,
getHeight,
getLeft,
getRight,
getSize,
getTop,
getWidth,
paint |
| Method Detail |
public void addHandle(Handle handle)
handle - the handle to addpublic void addHandles(Figure figure)
figure - the figure for which handles should be added.
public void addHandles(Figure figure,
Handle[] handles)
figure - the figure for which handles are associated.handles - the handles to add.public void addSelection(Figure figure)
figure - the Figure to addpublic void clearSelections()
public Handle[] getHandles()
public Locator getLocator(int x,
int y)
x - the horizontal coordinatey - the vertical coordinatepublic Figure[] getSelections()
public DrawingStyle getStyle()
public InputEventHandler getTool()
public Handle handleAt(int x,
int y)
x - the x coordinatey - the y coordinatepublic void removeHandle(Handle handle)
handle - the handle to removepublic void removeHandles(Figure figure)
figure - the figure for which handles should be removed.public void removeSelection(Figure figure)
figure - the figure being deselectedpublic void repaint(java.awt.Rectangle rectangle)
rectangle - is the region to be repaintedpublic void select(Figure figure)
figure - the figure being deselected
public void setSize(int width,
int height)
width - the horizontal sizeheight - the vertical sizepublic void setSize(java.awt.Dimension size)
size - the new sizepublic void setStyle(DrawingStyle style)
style - the specified DrawingStylepublic void setTool(InputEventHandler tool)
tool - the InputEventHandler to set as the active toolpublic void toggleSelection(Figure figure)
figure - the figure of interestpublic void toolTaskCompleted(InputEventHandler tool)
tool - the tool which completed its task
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||