public class LocalHistory extends Object
Modifier and Type | Class and Description |
---|---|
protected class |
LocalHistory.RadioListener
To listen to the radio buttons.
|
Modifier and Type | Field and Description |
---|---|
protected ActionListener |
actionListener
The action listener.
|
protected static int |
BACK_PENDING_STATE |
protected int |
currentURI
The index of the current URI.
|
protected static int |
FORWARD_PENDING_STATE |
protected ButtonGroup |
group
The button group for the menu items.
|
protected int |
index
The index of the first history item in this menu.
|
protected JMenu |
menu
The menu which contains the history.
|
protected static int |
RELOAD_PENDING_STATE |
protected static int |
STABLE_STATE |
protected int |
state
The current state.
|
protected JSVGViewerFrame |
svgFrame
The frame to manage.
|
protected List |
visitedURIs
The visited URIs.
|
Constructor and Description |
---|
LocalHistory(JMenuBar mb,
JSVGViewerFrame svgFrame)
Creates a new local history.
|
Modifier and Type | Method and Description |
---|---|
void |
back()
Goes back of one position in the history.
|
boolean |
canGoBack()
Whether it is possible to go back.
|
boolean |
canGoForward()
Whether it is possible to go forward.
|
void |
forward()
Goes forward of one position in the history.
|
void |
reload()
Reloads the current document.
|
protected void |
update()
Updates the state of this history.
|
void |
update(String uri)
Updates the history.
|
protected JSVGViewerFrame svgFrame
protected JMenu menu
protected int index
protected List visitedURIs
protected int currentURI
protected ButtonGroup group
protected ActionListener actionListener
protected int state
protected static final int STABLE_STATE
protected static final int BACK_PENDING_STATE
protected static final int FORWARD_PENDING_STATE
protected static final int RELOAD_PENDING_STATE
public LocalHistory(JMenuBar mb, JSVGViewerFrame svgFrame)
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.public void back()
canGoBack()
is true.public boolean canGoBack()
public void forward()
canGoForward()
is true.public boolean canGoForward()
public void reload()
public void update(String uri)
uri
- The URI of the document just loaded.protected void update()
Copyright © 2000–2023 Apache Software Foundation. All rights reserved.