public class TreeHotSpot extends AbstractHotSpot
Tree
that can receive select and mouse events. The TreeHotSpot's
default behavior is to forward events to its parent HotSpot. Subclasses must override methods for events they can
react to, and all other events are handled by the parent.Modifier and Type | Field and Description |
---|---|
protected HotSpot |
parent
The parent HotSpot, or null if this TreeHotSpot has no parent.
|
active
Constructor and Description |
---|
TreeHotSpot(HotSpot parent)
Create a hot spot.
|
Modifier and Type | Method and Description |
---|---|
void |
mouseClicked(java.awt.event.MouseEvent event)
Forwards the event to the parent HotSpot if the parent is non-null.
|
void |
mousePressed(java.awt.event.MouseEvent event)
Forwards the event to the parent HotSpot if the parent is non-null.
|
void |
mouseReleased(java.awt.event.MouseEvent event)
Forwards the event to the parent HotSpot if the parent is non-null.
|
void |
mouseWheelMoved(java.awt.event.MouseWheelEvent event)
Forwards the event to the parent HotSpot if the parent is non-null.
|
void |
selected(SelectEvent event)
Forwards the event to the parent HotSpot if the parent is non-null.
|
getCursor, isActive, isConsumed, keyPressed, keyReleased, keyTyped, mouseDragged, mouseEntered, mouseExited, mouseMoved, setActive
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getBooleanValue, getBooleanValue, getChangeSupport, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getRestorableStateForAVPair, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
protected HotSpot parent
public TreeHotSpot(HotSpot parent)
parent
- The screen area that contains this hot spot. Input events that cannot be handled by this object
will be passed to the parent. May be null.public void mouseClicked(java.awt.event.MouseEvent event)
mouseClicked
in interface HotSpot
mouseClicked
in interface java.awt.event.MouseListener
mouseClicked
in class AbstractHotSpot
event
- The event to handle.public void mousePressed(java.awt.event.MouseEvent event)
mousePressed
in interface HotSpot
mousePressed
in interface java.awt.event.MouseListener
mousePressed
in class AbstractHotSpot
event
- The event to handle.public void mouseReleased(java.awt.event.MouseEvent event)
mouseReleased
in interface HotSpot
mouseReleased
in interface java.awt.event.MouseListener
mouseReleased
in class AbstractHotSpot
event
- The event to handle.public void mouseWheelMoved(java.awt.event.MouseWheelEvent event)
mouseWheelMoved
in interface HotSpot
mouseWheelMoved
in interface java.awt.event.MouseWheelListener
mouseWheelMoved
in class AbstractHotSpot
event
- The event to handle.public void selected(SelectEvent event)
selected
in interface SelectListener
selected
in interface HotSpot
selected
in class AbstractHotSpot
event
- The event to handle.