edu.mines.jtk.mosaic
Class MouseTrackMode
java.lang.Object
javax.swing.AbstractAction
edu.mines.jtk.awt.Mode
edu.mines.jtk.mosaic.MouseTrackMode
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class MouseTrackMode
- extends Mode
A mode for tracking the mouse location. When this mode is active,
then mouse movement within any tile is highlighted in any tile axes
in that tile's row and column. This mode is not exclusive.
- Version:
- 2006.01.01
- Author:
- Dave Hale, Colorado School of Mines
- See Also:
- Serialized Form
| Fields inherited from class javax.swing.AbstractAction |
changeSupport, enabled |
| Fields inherited from interface javax.swing.Action |
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON |
|
Method Summary |
boolean |
isExclusive()
Returns false, to indicate that mouse track mode is not exclusive. |
protected void |
setActive(java.awt.Component component,
boolean active)
Activates or deactivates this mode for the specified component. |
| Methods inherited from class edu.mines.jtk.awt.Mode |
actionPerformed, getCursor, isActive, loadCursor, loadIcon, setAcceleratorKey, setActive, setCursor, setEnabled, setIcon, setLongDescription, setMnemonicKey, setName, setShortDescription |
| Methods inherited from class javax.swing.AbstractAction |
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MouseTrackMode
public MouseTrackMode(ModeManager modeManager)
- Constructs a mouse track mode with specified manager.
- Parameters:
modeManager - the mode manager for this mode.
isExclusive
public boolean isExclusive()
- Returns false, to indicate that mouse track mode is not exclusive.
- Overrides:
isExclusive in class Mode
- Returns:
- false.
setActive
protected void setActive(java.awt.Component component,
boolean active)
- Description copied from class:
Mode
- Activates or deactivates this mode for the specified component.
Typically, in their implementations of this method, modes add or
remove input event listeners, when the mode is applicable to the
specified component or type of component.
This method should not be called directly. The mode's manager calls
this method for all of its components. Implementations of this method
should do nothing for components for which the mode is inapplicable.
- Specified by:
setActive in class Mode
- Parameters:
component - the component for which to enable the mode.active - true, to activate; false, to deactivate.