|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.user.client.History
This class allows you to interact with the browser's history stack. Each "item" on the stack is represented by a single string, referred to as a "token". You can create new history items (which have a token associated with them when they are created), and you can programmatically force the current history to move back or forward.
In order to receive notification of user-directed changes to the current
history item, implement the
HistoryListener
interface and attach it
via addHistoryListener(com.google.gwt.user.client.HistoryListener)
.
Example: code
Field Summary |
Fields inherited from class java.lang.Object |
typeId, typeName |
Constructor Summary | |
History()
|
Method Summary | |
static void |
addHistoryListener(HistoryListener listener)
Adds a listener to be informed of changes to the browser's history stack. |
static void |
back()
Programmatic equivalent to the user pressing the browser's 'back' button. |
static void |
forward()
Programmatic equivalent to the user pressing the browser's 'forward' button. |
static String |
getToken()
Gets the current history token. |
static void |
newItem(String historyToken)
Adds a new browser history entry. |
static void |
onHistoryChanged(String historyToken)
|
static void |
removeHistoryListener(HistoryListener listener)
Removes a history listener. |
Methods inherited from class java.lang.Object |
equals, finalize, hashCode, toString |
Constructor Detail |
public History()
Method Detail |
public static void addHistoryListener(HistoryListener listener)
listener
- the listener to be addedpublic static void back()
public static void forward()
public static String getToken()
public static void newItem(String historyToken)
onHistoryChanged(java.lang.String)
to be called as
well.
public static void onHistoryChanged(String historyToken)
public static void removeHistoryListener(HistoryListener listener)
listener
- the listener to be removed
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |