Class MouseEventUI<V extends JComponent>

  • All Implemented Interfaces:
    Serializable
    Direct Known Subclasses:
    TransformUI

    public class MouseEventUI<V extends JComponent>
    extends org.jdesktop.jxlayer.plaf.AbstractLayerUI<V>
    This class provides for MouseEvent re-dispatching. It may be used to set a tool tip on JXLayer's glass pane and still have the child components receive MouseEvents.

    Note: A MouseEventUI instance cannot be shared and can be set to a single JXLayer instance only.

    See Also:
    Serialized Form
    • Constructor Detail

      • MouseEventUI

        public MouseEventUI()
    • Method Detail

      • installUI

        public void installUI​(JComponent component)
                       throws IllegalStateException
        Overridden to check if this LayerUI has not been installed already, and to set the argument component as the installed JXLayer.
        Overrides:
        installUI in class org.jdesktop.jxlayer.plaf.AbstractLayerUI<V extends JComponent>
        Throws:
        IllegalStateException - when this LayerUI has been installed already
        See Also:
        getInstalledLayer()
      • uninstallUI

        public void uninstallUI​(JComponent c)
        Overridden to remove the installed JXLayer.
        Overrides:
        uninstallUI in class org.jdesktop.jxlayer.plaf.AbstractLayerUI<V extends JComponent>
      • eventDispatched

        public void eventDispatched​(AWTEvent event,
                                    org.jdesktop.jxlayer.JXLayer<? extends V> layer)
        Overridden to allow for re-dispatching of mouse events to their intended (visual) recipients, rather than to the components according to their bounds.
        Overrides:
        eventDispatched in class org.jdesktop.jxlayer.plaf.AbstractLayerUI<V extends JComponent>
      • processMouseWheelEvent

        protected void processMouseWheelEvent​(MouseWheelEvent event,
                                              org.jdesktop.jxlayer.JXLayer<? extends V> jxlayer)
        Re-dispatches the event to the first component in the hierarchy that has a MouseWheelListener registered.
        Overrides:
        processMouseWheelEvent in class org.jdesktop.jxlayer.plaf.AbstractLayerUI<V extends JComponent>
      • getInstalledLayer

        protected org.jdesktop.jxlayer.JXLayer<? extends V> getInstalledLayer()