com.google.gwt.user.client.impl
Class HistoryImpl

java.lang.Object
  extended by com.google.gwt.user.client.impl.HistoryImpl
All Implemented Interfaces:
HasValueChangeHandlers<java.lang.String>, HasHandlers

public class HistoryImpl
extends java.lang.Object
implements HasValueChangeHandlers<java.lang.String>, HasHandlers

Native implementation associated with History. User classes should not use this class directly.

This base version uses the HTML5 standard window.onhashchange event to determine when the URL hash identifier changes.


Constructor Summary
HistoryImpl()
           
 
Method Summary
 HandlerRegistration addValueChangeHandler(ValueChangeHandler<java.lang.String> handler)
          Adds a ValueChangeEvent handler to be informed of changes to the browser's history stack.
 void fireEvent(GwtEvent<?> event)
          Fires the given event to all the appropriate handlers.
 void fireHistoryChangedImpl(java.lang.String newToken)
          Fires the ValueChangeEvent to all handlers with the given tokens.
 HandlerManager getHandlers()
           
static java.lang.String getToken()
           
 boolean init()
           
 void newItem(java.lang.String historyToken, boolean issueEvent)
           
 void newItemOnEvent(java.lang.String historyToken)
           
static void setUpdateHashOnIE6(boolean updateHash)
          Deprecated. This is no longer necessary, as the underlying performance problem has been solved. It is now a no-op.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HistoryImpl

public HistoryImpl()
Method Detail

getToken

public static java.lang.String getToken()

setUpdateHashOnIE6

@Deprecated
public static void setUpdateHashOnIE6(boolean updateHash)
Deprecated. This is no longer necessary, as the underlying performance problem has been solved. It is now a no-op.

Sets whether the IE6 history implementation will update the URL hash when creating a new item. This should be used only for applications with large DOM structures that are suffering from performance problems when creating a new history item on IE6 and 7.


addValueChangeHandler

public HandlerRegistration addValueChangeHandler(ValueChangeHandler<java.lang.String> handler)
Adds a ValueChangeEvent handler to be informed of changes to the browser's history stack.

Specified by:
addValueChangeHandler in interface HasValueChangeHandlers<java.lang.String>
Parameters:
handler - the handler
Returns:
the registration for the event

fireEvent

public void fireEvent(GwtEvent<?> event)
Description copied from interface: HasHandlers
Fires the given event to all the appropriate handlers.

Specified by:
fireEvent in interface HasHandlers
Parameters:
event - the event to be fired

fireHistoryChangedImpl

public void fireHistoryChangedImpl(java.lang.String newToken)
Fires the ValueChangeEvent to all handlers with the given tokens.


getHandlers

public HandlerManager getHandlers()

init

public boolean init()

newItem

public final void newItem(java.lang.String historyToken,
                          boolean issueEvent)

newItemOnEvent

public final void newItemOnEvent(java.lang.String historyToken)