org.esa.beam.framework.ui.tool
Interface Tool

All Known Implementing Classes:
AbstractTool

Deprecated. since BEAM 4.7, no replacement

@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.

Version:
$Revision$ $Date$
Author:
Norman Fomferra

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

isActive

boolean isActive()
Deprecated. 
An active tool is the currently selected tool in the DrawingView. A tool can be activated/deactivated by calling the activate()/deactivate() method.

Returns:
true if the tool is the selected tool in the DrawingView, false otherwise
See Also:
isEnabled()

activate

void activate()
Deprecated. 
Activates the tool for the given view. This method is called whenever the user switches to this tool. Use this method to reinitialize a tool. Note, a valid view must be present in order for the tool to accept activation.


deactivate

void deactivate()
Deprecated. 
Deactivates the tool. This method is called whenever the user switches to another tool. Use this method to do some clean-up when the tool is switched.

Subclassers should always call super.deactivate().


cancel

void cancel()
Deprecated. 
Cancels the tool. This method is called whenever the user switches to another tool while this tool is active. Use this method to do some clean-up when the tool is switched.

Subclassers should always call super.cancel().


isEnabled

boolean isEnabled()
Deprecated. 
A tool must be enabled in order to use it and to activate/deactivate it. Typically, the program enables or disables a tool.

See Also:
isActive()

setEnabled

void setEnabled(boolean enabled)
Deprecated. 
Sets the enabled state of this tool.

Parameters:
enabled - the enabled state

isDragging

boolean isDragging()
Deprecated. 
Determines whether oer not this tool is currently dragging.


getCursor

Cursor getCursor()
Deprecated. 
Gets the cursor for this tool.

Returns:
the cursor for this tool or null if this tool does not have a special cursor.

getDrawingEditor

DrawingEditor getDrawingEditor()
Deprecated. 
Gets the editor for this tool. The editor is the image display on which this tool acts.

Returns:
the editor, can be null

setDrawingEditor

void setDrawingEditor(DrawingEditor drawingEditor)
Deprecated. 
Sets the editor for this tool. The editor is the image display on which this tool acts.

Parameters:
drawingEditor - the editor, can be null

addToolListener

void addToolListener(ToolListener listener)
Deprecated. 
Adds a new tool listener to this tool.

Parameters:
listener - the new listener to be added

removeToolListener

void removeToolListener(ToolListener listener)
Deprecated. 
Removes an existsing tool listener from this tool.

Parameters:
listener - the existsing listener to be removed

handleEvent

void handleEvent(ToolInputEvent toolInputEvent)
Deprecated. 
Handles a tool input event.

Parameters:
toolInputEvent - a tool input event

getDrawable

Drawable getDrawable()
Deprecated. 
Gets a thing that can be drawn while the tool is working.

Returns:
the drawable, or null if this tool cannot be drawn


Copyright © 2002-2012 Brockmann Consult GmbH. All Rights Reserved.