Class HyperlinkPushState

  • All Implemented Interfaces:
    com.google.gwt.event.dom.client.HasClickHandlers, com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.i18n.shared.HasDirectionEstimator, com.google.gwt.safehtml.client.HasSafeHtml, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasDirectionalSafeHtml, com.google.gwt.user.client.ui.HasDirectionalText, com.google.gwt.user.client.ui.HasHTML, com.google.gwt.user.client.ui.HasText, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.IsWidget, com.google.gwt.user.client.ui.SourcesClickEvents

    public class HyperlinkPushState
    extends com.google.gwt.user.client.ui.Hyperlink
    Widget that is an internal hyperlink and supports HTML5 pushState.

    It extends GWT's original InlineHyperlink and moves the history token from the hash to the path.

    This has the advantage that no-pushState browsers see the correct nice link while still using a Hyperlink implementation which does not cause reloads.

    Author:
    Johannes Barop
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject

        com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
    • Field Summary

      • Fields inherited from class com.google.gwt.user.client.ui.Hyperlink

        DEFAULT_DIRECTION_ESTIMATOR, directionalTextHelper
      • Fields inherited from class com.google.gwt.user.client.ui.UIObject

        DEBUG_ID_PREFIX
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      String getTargetHistoryToken()  
      void onBrowserEvent​(com.google.gwt.user.client.Event pevent)  
      void setTargetHistoryToken​(String ptargetHistoryToken)  
      • Methods inherited from class com.google.gwt.user.client.ui.Hyperlink

        addClickHandler, addClickListener, getDirectionEstimator, getHTML, getText, getTextDirection, onEnsureDebugId, removeClickListener, setDirectionEstimator, setDirectionEstimator, setHTML, setHTML, setHTML, setText, setText
      • Methods inherited from class com.google.gwt.user.client.ui.Widget

        addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
      • Methods inherited from class com.google.gwt.user.client.ui.UIObject

        addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
      • Methods inherited from interface com.google.gwt.event.shared.HasHandlers

        fireEvent
    • Constructor Detail

      • HyperlinkPushState

        public HyperlinkPushState​(String ptext,
                                  String ptargetHistoryToken)
        Calls Hyperlink(String, String).
      • HyperlinkPushState

        public HyperlinkPushState()
        No arg constructor, calls Hyperlink().
    • Method Detail

      • setTargetHistoryToken

        public void setTargetHistoryToken​(String ptargetHistoryToken)
        Overrides:
        setTargetHistoryToken in class com.google.gwt.user.client.ui.Hyperlink
      • getTargetHistoryToken

        public String getTargetHistoryToken()
        Overrides:
        getTargetHistoryToken in class com.google.gwt.user.client.ui.Hyperlink
      • onBrowserEvent

        public void onBrowserEvent​(com.google.gwt.user.client.Event pevent)
        Specified by:
        onBrowserEvent in interface com.google.gwt.user.client.EventListener
        Overrides:
        onBrowserEvent in class com.google.gwt.user.client.ui.Hyperlink