|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
@Deprecated public interface Tool
A tool is used to let a user operate on a, usually graphical, view.
Views with an active tool delegate all mouse and keyboard input to the active tool.
The use can activate and deactivate a tool by pressing the associated tool button. In a real-world application, tools are usually mutually exclusive - only one tool can be activated at the same time.
| Method Summary | |
|---|---|
void |
activate()
Deprecated. Activates the tool for the given view. |
void |
addToolListener(ToolListener listener)
Deprecated. Adds a new tool listener to this tool. |
void |
cancel()
Deprecated. Cancels the tool. |
void |
deactivate()
Deprecated. Deactivates the tool. |
Cursor |
getCursor()
Deprecated. Gets the cursor for this tool. |
Drawable |
getDrawable()
Deprecated. Gets a thing that can be drawn while the tool is working. |
DrawingEditor |
getDrawingEditor()
Deprecated. Gets the editor for this tool. |
void |
handleEvent(ToolInputEvent toolInputEvent)
Deprecated. Handles a tool input event. |
boolean |
isActive()
Deprecated. An active tool is the currently selected tool in the DrawingView. |
boolean |
isDragging()
Deprecated. Determines whether oer not this tool is currently dragging. |
boolean |
isEnabled()
Deprecated. A tool must be enabled in order to use it and to activate/deactivate it. |
void |
removeToolListener(ToolListener listener)
Deprecated. Removes an existsing tool listener from this tool. |
void |
setDrawingEditor(DrawingEditor drawingEditor)
Deprecated. Sets the editor for this tool. |
void |
setEnabled(boolean enabled)
Deprecated. Sets the enabled state of this tool. |
| Method Detail |
|---|
boolean isActive()
isEnabled()void activate()
void deactivate()
Subclassers should always call super.deactivate().
void cancel()
Subclassers should always call super.cancel().
boolean isEnabled()
isActive()void setEnabled(boolean enabled)
enabled - the enabled stateboolean isDragging()
Cursor getCursor()
null if this tool does not have a special cursor.DrawingEditor getDrawingEditor()
nullvoid setDrawingEditor(DrawingEditor drawingEditor)
drawingEditor - the editor, can be nullvoid addToolListener(ToolListener listener)
listener - the new listener to be addedvoid removeToolListener(ToolListener listener)
listener - the existsing listener to be removedvoid handleEvent(ToolInputEvent toolInputEvent)
toolInputEvent - a tool input eventDrawable getDrawable()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||