Class TreeHotSpot

  • All Implemented Interfaces:
    AVList, SelectListener, HotSpot, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.util.EventListener
    Direct Known Subclasses:
    DragControl, ScrollBar.ScrollControl

    public class TreeHotSpot
    extends AbstractHotSpot
    An area of a 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.
    • Field Detail

      • parent

        protected HotSpot parent
        The parent HotSpot, or null if this TreeHotSpot has no parent.
    • Constructor Detail

      • TreeHotSpot

        public TreeHotSpot​(HotSpot parent)
        Create a hot spot.
        Parameters:
        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.
    • Method Detail

      • selected

        public void selected​(SelectEvent event)
        Forwards the event to the parent HotSpot if the parent is non-null. Otherwise does nothing. Override this method to handle key released events.
        Specified by:
        selected in interface HotSpot
        Specified by:
        selected in interface SelectListener
        Overrides:
        selected in class AbstractHotSpot
        Parameters:
        event - The event to handle.
      • mouseClicked

        public void mouseClicked​(java.awt.event.MouseEvent event)
        Forwards the event to the parent HotSpot if the parent is non-null. Otherwise does nothing. Override this method to handle mouse click events.
        Specified by:
        mouseClicked in interface HotSpot
        Specified by:
        mouseClicked in interface java.awt.event.MouseListener
        Overrides:
        mouseClicked in class AbstractHotSpot
        Parameters:
        event - The event to handle.
      • mousePressed

        public void mousePressed​(java.awt.event.MouseEvent event)
        Forwards the event to the parent HotSpot if the parent is non-null. Otherwise does nothing. Override this method to handle mouse pressed events.
        Specified by:
        mousePressed in interface HotSpot
        Specified by:
        mousePressed in interface java.awt.event.MouseListener
        Overrides:
        mousePressed in class AbstractHotSpot
        Parameters:
        event - The event to handle.
      • mouseReleased

        public void mouseReleased​(java.awt.event.MouseEvent event)
        Forwards the event to the parent HotSpot if the parent is non-null. Otherwise does nothing. Override this method to handle mouse released events.
        Specified by:
        mouseReleased in interface HotSpot
        Specified by:
        mouseReleased in interface java.awt.event.MouseListener
        Overrides:
        mouseReleased in class AbstractHotSpot
        Parameters:
        event - The event to handle.
      • mouseWheelMoved

        public void mouseWheelMoved​(java.awt.event.MouseWheelEvent event)
        Forwards the event to the parent HotSpot if the parent is non-null. Otherwise does nothing. Override this method to handle mouse wheel events.
        Specified by:
        mouseWheelMoved in interface HotSpot
        Specified by:
        mouseWheelMoved in interface java.awt.event.MouseWheelListener
        Overrides:
        mouseWheelMoved in class AbstractHotSpot
        Parameters:
        event - The event to handle.