Class EditEvent

java.lang.Object
com.levigo.jadice.web.client.tool.events.EventObject
com.levigo.jadice.web.client.tool.events.EditEvent
Direct Known Subclasses:
KeyEditEvent, MouseWheelEditEvent, PointedEditEvent

public abstract class EditEvent extends EventObject
  • Field Details

    • inputEvent

      protected final com.google.gwt.event.dom.client.DomEvent<?> inputEvent
    • pageBounds

      protected final Rectangle pageBounds
    • document

      protected Document document
  • Method Details

    • create

      public static EditEvent create(PageView source, com.google.gwt.event.dom.client.DomEvent<?> e, Page page, int pageIndex, Rectangle renderBounds, RenderControls renderControls, int clickCount, boolean isPopupTrigger)
      Create the correct EditEvent for the given InputEvent.
      Parameters:
      source - the source PageView
      e - the underlying DomEvent
      page - the Page the event belongs to
      pageIndex - the index of the Page
      renderBounds - the bounds where the page was rendered
      renderControls - the RenderControls
      clickCount - the click count
      isPopupTrigger - controls the popup trigger
      Returns:
      the EditEvent
    • getDocument

      public Document getDocument()
    • getRenderedSize

      public Dimension getRenderedSize()
      Return size of the rendered page this event pertains to.

      Caveat: Clients must not attempt to call this method unless hasPageContext() returned true.

      Returns:
      The rendered size
      Throws:
      IllegalStateException - if the event does not have a page context
    • getRenderedPageBounds

      public Rectangle getRenderedPageBounds()
      Return bounds of the rendered page this event pertains to.

      Caveat: Clients must not attempt to call this method unless hasPageContext() returned true.

      Returns:
      The rendered page bounds
      Throws:
      IllegalStateException - if the event does not have a page context
    • getInputEvent

      public abstract InputEvent getInputEvent()
      Overridden in subclasses.

      Implement only for legacy purposes.

      Returns:
      The inputEvent used for legacy purposes.
    • getGwtEvent

      public com.google.gwt.event.dom.client.DomEvent<?> getGwtEvent()
    • getPageRenderControls

      public RenderControls getPageRenderControls()
      Return RenderControls used to render the page this event pertains to.

      Caveat: Clients must not attempt to call this method unless hasPageContext() returned true.

      Returns:
      The RenderControls
      Throws:
      IllegalStateException - if the event does not have a page context
      See Also:
    • isConsumed

      public boolean isConsumed()
    • consume

      public void consume()
    • preventPageViewFocus

      public void preventPageViewFocus()
      Prevent, that the PageView gets the Focus after an MouseDownEvent. Use this if you have your own focus on some elements, so the PageView will not steal the focus.
    • isPreventPageViewFocus

      public boolean isPreventPageViewFocus()
    • getModifiers

      @Deprecated public int getModifiers()
      Deprecated.
      Returns:
      deprecated - don't use
      See Also:
    • getModifiersEx

      @Deprecated public int getModifiersEx()
      Deprecated.
      use for example isAltDown,...
      Returns:
      deprecated - don't use
      See Also:
    • getWhen

      @Deprecated public long getWhen()
      Deprecated.
      not supported in GWT
      Returns:
      deprecated - don't use
      See Also:
    • isAltDown

      public boolean isAltDown()
      Returns:
      true if the alt key is pressed. Otherwise false
      See Also:
    • isAltGraphDown

      @Deprecated public boolean isAltGraphDown()
      Deprecated.
      dont use this, see http://msdn.microsoft.com/en-us/library/windows/desktop/aa511502.aspx and search for AltGr: "Don't use Ctrl+Alt combinations, because Windows interprets this combination in some language versions as an AltGR key, which generates alphanumeric characters."
      Returns:
      deprecated - don't use
      See Also:
    • isControlDown

      public boolean isControlDown()
      Returns:
      True if control is down, false else
      See Also:
    • isMetaDown

      public boolean isMetaDown()
      Returns:
      True if meta is down, false else
      See Also:
    • isShiftDown

      public boolean isShiftDown()
      Returns:
      True if shift is down, false else
      See Also:
    • getInputEventType

      public com.google.gwt.event.dom.client.DomEvent.Type<?> getInputEventType()
      Returns:
      the Type of the InputEvent
    • getPage

      public Page getPage()
      Return the Page to which this event pertains to. This may be null for events happening outside the scope of a page.
      Returns:
      the page
    • getPageIndex

      public int getPageIndex()
      Returns:
      The page index
    • hasPageContext

      public boolean hasPageContext()
      Return whether this event has a Page as a context. An event typically has a page as its context, if the mouse currently resides within the bounds of some rendered page. In some cases, an event can have a context page, event if the mouse is not currently within the page's render bounds, such as for drag events for a drag gesture that started within the bounds but have since left it.

      Caveat: Clients must not attempt to call this method unless hasPageContext() returned true.

      Returns:
      whether the current event has a page as its context
      Throws:
      IllegalStateException - if the event does not have a page context
      See Also:
    • toString

      public String toString()
      Description copied from class: EventObject
      Returns a String representation of this EventObject.
      Overrides:
      toString in class EventObject
      Returns:
      A a String representation of this EventObject.