|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.esa.beam.framework.ui.tool.AbstractTool
@Deprecated public abstract class AbstractTool
An abstract implementation of the tool interface.
| Constructor Summary | |
|---|---|
protected |
AbstractTool()
Deprecated. |
| 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. |
void |
draw(Graphics2D g2d)
Deprecated. Draws this Drawable on the given Graphics2D drawing surface. |
protected void |
finish()
Deprecated. This method can be called by a tool, when it finishes its work. |
protected void |
fireToolActivated()
Deprecated. |
protected void |
fireToolCanceled()
Deprecated. |
protected void |
fireToolDeactivated()
Deprecated. |
protected void |
fireToolDisabled()
Deprecated. |
protected void |
fireToolEnabled()
Deprecated. |
protected void |
fireToolFinished()
Deprecated. |
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 e)
Deprecated. Handles a tool input event. |
boolean |
isActive()
Deprecated. An active tool is the currently selected tool in the DrawingView. |
protected static boolean |
isAltKeyDown(ToolInputEvent e)
Deprecated. |
boolean |
isCanceled()
Deprecated. A tool must be enabled in order to use it and to activate/deactivate it. |
protected static boolean |
isControlKeyDown(ToolInputEvent e)
Deprecated. |
protected static boolean |
isDoubleLeftClick(ToolInputEvent e)
Deprecated. |
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. |
protected static boolean |
isLeftMouseButtonDown(ToolInputEvent e)
Deprecated. |
protected static boolean |
isShiftKeyDown(ToolInputEvent e)
Deprecated. |
protected static boolean |
isSingleLeftClick(ToolInputEvent e)
Deprecated. |
void |
keyPressed(ToolInputEvent e)
Deprecated. Invoked when a key has been pressed. |
void |
keyReleased(ToolInputEvent e)
Deprecated. Invoked when a key has been released. |
void |
keyTyped(ToolInputEvent e)
Deprecated. Invoked when a key has been typed. |
void |
mouseClicked(ToolInputEvent e)
Deprecated. Invoked when the mouse has been clicked on a component. |
void |
mouseDragged(ToolInputEvent e)
Deprecated. Invoked when a mouse button is pressed on a component and then dragged. |
void |
mouseEntered(ToolInputEvent e)
Deprecated. Invoked when the mouse enters a component. |
void |
mouseExited(ToolInputEvent e)
Deprecated. Invoked when the mouse exits a component. |
void |
mouseMoved(ToolInputEvent e)
Deprecated. Invoked when the mouse button has been moved on a component (with no buttons no down). |
void |
mousePressed(ToolInputEvent e)
Deprecated. Invoked when a mouse button has been pressed on a component. |
void |
mouseReleased(ToolInputEvent e)
Deprecated. Invoked when a mouse button has been released on a component. |
void |
removeToolListener(ToolListener listener)
Deprecated. Removes an existsing tool listener from this tool. |
protected void |
setActive(boolean active)
Deprecated. |
protected void |
setCanceled(boolean canceled)
Deprecated. |
protected void |
setDragging(boolean dragging)
Deprecated. |
void |
setDrawingEditor(DrawingEditor editor)
Deprecated. Sets the editor for this tool. |
void |
setEnabled(boolean enabled)
Deprecated. Sets the enabled state of this tool. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected AbstractTool()
| Method Detail |
|---|
public Drawable getDrawable()
AbstractTool is a
Drawable.
If your tool does not paint anything, override this method and simply return null here.
getDrawable in interface Toolthispublic void draw(Graphics2D g2d)
Drawable on the given Graphics2D drawing surface.
The default implementation is left empty. Override this method in order to perform
some drawing while the tool executes.
draw in interface Drawableg2d - the graphics contextpublic void activate()
The default implementation calls setCanceled(false) followed by setActive(true).
Subclassers should always call super.activate().
activate in interface Toolpublic void deactivate()
The default implementation cancels this tool if it is active and the calls setActive(false).
Subclassers should always call super.deactivate().
deactivate in interface Toolpublic boolean isActive()
isActive in interface ToolisEnabled()protected void setActive(boolean active)
public boolean isEnabled()
isEnabled in interface ToolisActive()public void setEnabled(boolean enabled)
Tool
setEnabled in interface Toolenabled - the enabled stateprotected void finish()
The default implementation simply calls fireToolFinished().
Subclassers should always call
super.finish().
public void cancel()
The default implementation simply calls setCanceled(false).
Subclassers should always call super.cancel().
cancel in interface Toolpublic boolean isCanceled()
isActive()protected void setCanceled(boolean canceled)
public boolean isDragging()
Tool
isDragging in interface Toolprotected void setDragging(boolean dragging)
public DrawingEditor getDrawingEditor()
getDrawingEditor in interface Toolnullpublic void setDrawingEditor(DrawingEditor editor)
setDrawingEditor in interface Tooleditor - the editor, can be nullpublic Cursor getCursor()
null.
getCursor in interface Toolnull if this tool does not have a special cursor.public void keyPressed(ToolInputEvent e)
e - The tool input event.public void keyReleased(ToolInputEvent e)
e - The tool input event.public void keyTyped(ToolInputEvent e)
e - The tool input event.public void mouseClicked(ToolInputEvent e)
e - The tool input event.public void mouseDragged(ToolInputEvent e)
e - The tool input event.public void mouseEntered(ToolInputEvent e)
e - The tool input event.public void mouseExited(ToolInputEvent e)
e - The tool input event.public void mouseMoved(ToolInputEvent e)
e - The tool input event.public void mousePressed(ToolInputEvent e)
e - The tool input event.public void mouseReleased(ToolInputEvent e)
e - The tool input event.protected static boolean isSingleLeftClick(ToolInputEvent e)
protected static boolean isDoubleLeftClick(ToolInputEvent e)
protected static boolean isLeftMouseButtonDown(ToolInputEvent e)
protected static boolean isShiftKeyDown(ToolInputEvent e)
protected static boolean isControlKeyDown(ToolInputEvent e)
protected static boolean isAltKeyDown(ToolInputEvent e)
public void addToolListener(ToolListener listener)
addToolListener in interface Toollistener - the new listener to be addedpublic void removeToolListener(ToolListener listener)
removeToolListener in interface Toollistener - the existsing listener to be removedprotected void fireToolActivated()
protected void fireToolDeactivated()
protected void fireToolEnabled()
protected void fireToolDisabled()
protected void fireToolCanceled()
protected void fireToolFinished()
public void handleEvent(ToolInputEvent e)
Tool
handleEvent in interface Toole - a tool input event
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||