|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.rolemodelsoft.drawlet.basics.AbstractInputEventHandler
|
+--com.rolemodelsoft.drawlet.basics.CanvasHandle
|
+--com.rolemodelsoft.drawlet.text.LabelEditHandle
A handle one can use to edit labels. Currently this is rather primitive as it does not allow for insert and replacing of a subset of text... this should be a temporary limitation. This would typically be invoked as an editTool (see Figure), but could be used in other contexts.
| Field Summary | |
protected Figure |
figure
The figure whose label we are editing. |
protected java.lang.String |
string
The local copy of the string being edited. |
| Fields inherited from class com.rolemodelsoft.drawlet.basics.CanvasHandle |
canvas,
halfWidth,
HANDLE_SIZE,
previousTool |
| Constructor Summary | |
LabelEditHandle(Figure figure)
Answer a new instance prepared to edit the figure. |
|
| Method Summary | |
java.awt.Rectangle |
getBounds()
Returns the current bounds of this handle. |
java.awt.Rectangle |
getLabelBounds()
Returns the current bounds of the label. |
protected DrawingStyle |
getStyle()
Answer the DrawingStyle to use when displaying. |
void |
keyTyped(java.awt.event.KeyEvent evt)
Called if a character is typed. |
void |
mousePressed(java.awt.event.MouseEvent evt)
Called if the mouse is pressed. |
void |
mouseReleased(java.awt.event.MouseEvent evt)
Called if the mouse goes up. |
void |
paint(java.awt.Graphics g)
Paints the receiver. |
void |
releaseControl(DrawingCanvas canvas)
Release control of the canvas and clean up if necessary. |
void |
takeControl(DrawingCanvas canvas)
Make the handle be the event handler for the canvas. |
| Methods inherited from class com.rolemodelsoft.drawlet.basics.CanvasHandle |
contains,
defaultHandleSize,
finished,
getHandleHeight,
getHandleSize,
getHandleWidth,
getX,
getY,
intersects,
setHandleSize |
| Methods inherited from class com.rolemodelsoft.drawlet.basics.AbstractInputEventHandler |
keyPressed,
keyReleased,
mouseClicked,
mouseDoubleClicked,
mouseDragged,
mouseEntered,
mouseExited,
mouseMoved,
mouseSingleClicked |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
protected Figure figure
protected java.lang.String string
| Constructor Detail |
public LabelEditHandle(Figure figure)
figure - the figure whose label is to be edited.| Method Detail |
public java.awt.Rectangle getBounds()
public java.awt.Rectangle getLabelBounds()
protected DrawingStyle getStyle()
public void keyTyped(java.awt.event.KeyEvent evt)
evt - the eventpublic void mousePressed(java.awt.event.MouseEvent evt)
evt - the eventpublic void mouseReleased(java.awt.event.MouseEvent evt)
evt - the event.public void paint(java.awt.Graphics g)
g - the specified Graphics windowpublic void releaseControl(DrawingCanvas canvas)
canvas - the canvas which the receiver is to release controlpublic void takeControl(DrawingCanvas canvas)
x - the x coordinatey - the y coordinate
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||