com.rolemodelsoft.drawlet.jfc
Class CanvasToolAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--com.rolemodelsoft.drawlet.jfc.CanvasToolAction

public class CanvasToolAction
extends javax.swing.AbstractAction

This class is used to create tools that will be used on the canvas (ex figure creation, figure selection etc...).

See Also:
Serialized Form

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Constructor Summary
CanvasToolAction()
          Creates a new, default CanvasToolAction.
CanvasToolAction(java.lang.String name)
          Creates a new CanvasToolAction and initializes it with the given name.
CanvasToolAction(java.lang.String name, DrawingCanvas canvas, InputEventHandler tool)
          Create a CanvasToolAction which will set the canvases tool when performed.
CanvasToolAction(java.lang.String name, javax.swing.Icon icon)
          Creates a new CanvasToolAction and initializes it with the given name and icon.
CanvasToolAction(java.lang.String name, javax.swing.Icon icon)
          Creates a new CanvasToolAction and initializes it with the given name and icon.
CanvasToolAction(java.lang.String name, javax.swing.Icon icon, DrawingCanvas canvas, InputEventHandler tool)
          Create a CanvasToolAction which will set the canvases tool when performed.
CanvasToolAction(java.lang.String name, javax.swing.Icon icon, DrawingCanvas canvas, InputEventHandler tool)
          Create a CanvasToolAction which will set the canvases tool when performed.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Set the tool of the canvas.
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CanvasToolAction

public CanvasToolAction()
Creates a new, default CanvasToolAction.

CanvasToolAction

public CanvasToolAction(java.lang.String name)
Creates a new CanvasToolAction and initializes it with the given name.
Parameters:
name - a String representing the name.

CanvasToolAction

public CanvasToolAction(java.lang.String name,
                        DrawingCanvas canvas,
                        InputEventHandler tool)
Create a CanvasToolAction which will set the canvases tool when performed.
Parameters:
name - the name for the action
canvas - the canvas to set the tool for
tool - the tool to have the canvas use

CanvasToolAction

public CanvasToolAction(java.lang.String name,
                        javax.swing.Icon icon)
Creates a new CanvasToolAction and initializes it with the given name and icon.
Parameters:
name - the name for this action
icon - the icon

CanvasToolAction

public CanvasToolAction(java.lang.String name,
                        javax.swing.Icon icon,
                        DrawingCanvas canvas,
                        InputEventHandler tool)
Create a CanvasToolAction which will set the canvases tool when performed.
Parameters:
name - the name for this action
icon - the icon
canvas - the canvas to set the tool for
tool - the tool to have the canvas use

CanvasToolAction

public CanvasToolAction(java.lang.String name,
                        javax.swing.Icon icon)
Creates a new CanvasToolAction and initializes it with the given name and icon.
Parameters:
name - the name for this action
icon - the icon

CanvasToolAction

public CanvasToolAction(java.lang.String name,
                        javax.swing.Icon icon,
                        DrawingCanvas canvas,
                        InputEventHandler tool)
Create a CanvasToolAction which will set the canvases tool when performed.
Parameters:
name - the name for this action
icon - the icon
canvas - the canvas to set the tool for
tool - the tool to have the canvas use
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Set the tool of the canvas.
Overrides:
actionPerformed in class javax.swing.AbstractAction
Parameters:
e - the event