Package snap.swing

Class SwingEvent

java.lang.Object
snap.view.ViewEvent
snap.swing.SwingEvent
All Implemented Interfaces:
Cloneable

public class SwingEvent extends ViewEvent
An ViewEvent implementation for Swing.
  • Constructor Details

    • SwingEvent

      public SwingEvent()
  • Method Details

    • isAltDown

      public boolean isAltDown()
      Returns whether alt key is down.
      Overrides:
      isAltDown in class ViewEvent
    • isControlDown

      public boolean isControlDown()
      Returns whether control key is down.
      Overrides:
      isControlDown in class ViewEvent
    • isMetaDown

      public boolean isMetaDown()
      Returns whether "meta" key is down (the command key on Mac with no equivalent on Windows).
      Overrides:
      isMetaDown in class ViewEvent
    • isShiftDown

      public boolean isShiftDown()
      Returns whether shift key is down.
      Overrides:
      isShiftDown in class ViewEvent
    • isShortcutDown

      public boolean isShortcutDown()
      Returns whether shortcut key is pressed.
      Overrides:
      isShortcutDown in class ViewEvent
    • isPopupTrigger

      public boolean isPopupTrigger()
      Returns whether popup trigger is down.
      Overrides:
      isPopupTrigger in class ViewEvent
    • getPointImpl

      protected Point getPointImpl()
      Returns the location for a mouse event or drop event.
      Overrides:
      getPointImpl in class ViewEvent
    • getScrollY

      public double getScrollY()
      Returns the scroll amount X.
      Overrides:
      getScrollY in class ViewEvent
    • getScrollX

      public double getScrollX()
      Returns the scroll amount X.
      Overrides:
      getScrollX in class ViewEvent
    • getKeyCode

      public int getKeyCode()
      Returns the event keycode.
      Overrides:
      getKeyCode in class ViewEvent
    • getKeyChar

      public char getKeyChar()
      Returns the event key char.
      Overrides:
      getKeyChar in class ViewEvent
    • acceptDrag

      public void acceptDrag()
      Called to indicate that drop is accepted.
      Overrides:
      acceptDrag in class ViewEvent
    • dropComplete

      public void dropComplete()
      Called to indicate that drop is complete.
      Overrides:
      dropComplete in class ViewEvent
    • getClipboard

      public Clipboard getClipboard()
      Returns the drag Clipboard for this event.
      Overrides:
      getClipboard in class ViewEvent
    • consume

      public void consume()
      Consume event.
      Overrides:
      consume in class ViewEvent
    • getTypeImpl

      protected ViewEvent.Type getTypeImpl()
      Computes the event type from EventObject.
      Specified by:
      getTypeImpl in class ViewEvent