Class LocalHistory
java.lang.Object
org.apache.batik.apps.svgbrowser.LocalHistory
This class represents an history of the files visited by a single
browser frame.
- Version:
- $Id$
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classTo listen to the radio buttons. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ActionListenerThe action listener.protected static final intprotected intThe index of the current URI.protected static final intprotected ButtonGroupThe button group for the menu items.protected intThe index of the first history item in this menu.protected JMenuThe menu which contains the history.protected static final intprotected static final intprotected intThe current state.protected JSVGViewerFrameThe frame to manage.protected ListThe visited URIs. -
Constructor Summary
ConstructorsConstructorDescriptionLocalHistory(JMenuBar mb, JSVGViewerFrame svgFrame) Creates a new local history. -
Method Summary
Modifier and TypeMethodDescriptionvoidback()Goes back of one position in the history.booleanWhether it is possible to go back.booleanWhether it is possible to go forward.voidforward()Goes forward of one position in the history.voidreload()Reloads the current document.protected voidupdate()Updates the state of this history.voidUpdates the history.
-
Field Details
-
svgFrame
The frame to manage. -
index
protected int indexThe index of the first history item in this menu. -
visitedURIs
The visited URIs. -
currentURI
protected int currentURIThe index of the current URI. -
group
The button group for the menu items. -
actionListener
The action listener. -
state
protected int stateThe current state. -
STABLE_STATE
protected static final int STABLE_STATE- See Also:
-
BACK_PENDING_STATE
protected static final int BACK_PENDING_STATE- See Also:
-
FORWARD_PENDING_STATE
protected static final int FORWARD_PENDING_STATE- See Also:
-
RELOAD_PENDING_STATE
protected static final int RELOAD_PENDING_STATE- See Also:
-
-
Constructor Details
-
LocalHistory
Creates a new local history.- Parameters:
mb- The menubar used to display the history. It must contain one '@@@' item used as marker to place the history items.svgFrame- The frame to manage.
-
-
Method Details
-
back
public void back()Goes back of one position in the history. Assumes thatcanGoBack()is true. -
canGoBack
public boolean canGoBack()Whether it is possible to go back. -
forward
public void forward()Goes forward of one position in the history. Assumes thatcanGoForward()is true. -
canGoForward
public boolean canGoForward()Whether it is possible to go forward. -
reload
public void reload()Reloads the current document. -
update
Updates the history.- Parameters:
uri- The URI of the document just loaded.
-
update
protected void update()Updates the state of this history.
-