Package org.apache.batik.apps.svgbrowser
Class LocalHistory
- java.lang.Object
-
- org.apache.batik.apps.svgbrowser.LocalHistory
-
public class LocalHistory extends java.lang.ObjectThis class represents an history of the files visited by a single browser frame.- Version:
- $Id: LocalHistory.java 1733416 2016-03-03 07:07:13Z gadams $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classLocalHistory.RadioListenerTo listen to the radio buttons.
-
Field Summary
Fields Modifier and Type Field Description protected java.awt.event.ActionListeneractionListenerThe action listener.protected static intBACK_PENDING_STATEprotected intcurrentURIThe index of the current URI.protected static intFORWARD_PENDING_STATEprotected javax.swing.ButtonGroupgroupThe button group for the menu items.protected intindexThe index of the first history item in this menu.protected javax.swing.JMenumenuThe menu which contains the history.protected static intRELOAD_PENDING_STATEprotected static intSTABLE_STATEprotected intstateThe current state.protected JSVGViewerFramesvgFrameThe frame to manage.protected java.util.ListvisitedURIsThe visited URIs.
-
Constructor Summary
Constructors Constructor Description LocalHistory(javax.swing.JMenuBar mb, JSVGViewerFrame svgFrame)Creates a new local history.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidback()Goes back of one position in the history.booleancanGoBack()Whether it is possible to go back.booleancanGoForward()Whether 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.voidupdate(java.lang.String uri)Updates the history.
-
-
-
Field Detail
-
svgFrame
protected JSVGViewerFrame svgFrame
The frame to manage.
-
menu
protected javax.swing.JMenu menu
The menu which contains the history.
-
index
protected int index
The index of the first history item in this menu.
-
visitedURIs
protected java.util.List visitedURIs
The visited URIs.
-
currentURI
protected int currentURI
The index of the current URI.
-
group
protected javax.swing.ButtonGroup group
The button group for the menu items.
-
actionListener
protected java.awt.event.ActionListener actionListener
The action listener.
-
state
protected int state
The current state.
-
STABLE_STATE
protected static final int STABLE_STATE
- See Also:
- Constant Field Values
-
BACK_PENDING_STATE
protected static final int BACK_PENDING_STATE
- See Also:
- Constant Field Values
-
FORWARD_PENDING_STATE
protected static final int FORWARD_PENDING_STATE
- See Also:
- Constant Field Values
-
RELOAD_PENDING_STATE
protected static final int RELOAD_PENDING_STATE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LocalHistory
public LocalHistory(javax.swing.JMenuBar mb, JSVGViewerFrame svgFrame)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 Detail
-
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
public void update(java.lang.String uri)
Updates the history.- Parameters:
uri- The URI of the document just loaded.
-
update
protected void update()
Updates the state of this history.
-
-