Class EditEvent

    • Field Detail

      • inputEvent

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

        protected final Rectangle pageBounds
    • Method Detail

      • 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()
      • 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()
      • isAltDown

        public boolean isAltDown()
        Returns:
        true if the alt key is pressed. Otherwise false
        See Also:
        InputEvent.isAltDown()
      • 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:
        InputEvent.isAltGraphDown()
      • isControlDown

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

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

        public boolean isShiftDown()
        Returns:
        True if shift is down, false else
        See Also:
        InputEvent.isShiftDown()
      • 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:
        hasPageContext()
      • 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.