Package com.lowagie.rups.view
Class PageNavigationAction
- java.lang.Object
-
- com.lowagie.rups.view.PageNavigationAction
-
- All Implemented Interfaces:
IconActionListener,java.awt.event.ActionListener,java.util.EventListener
public class PageNavigationAction extends java.lang.Object implements IconActionListener
Class that can be used for some basic navigation actions. Each action also has a corresponding icon.
-
-
Field Summary
Fields Modifier and Type Field Description static intFIRST_PAGEType to go to the first page.protected javax.swing.IconiconThe icon corresponding with the action.static intLAST_PAGEType to go to the last page.protected PageNavigationListenerlistenerThe object that is listening to the page navigation.static intNEXT_PAGEType to go to the next page.static intPREVIOUS_PAGEType to go to the previous page.protected inttypeThe type of this action.
-
Constructor Summary
Constructors Constructor Description PageNavigationAction(PageNavigationListener listener, int type, boolean withIcon)Creates a page navigation action.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(java.awt.event.ActionEvent evt)javax.swing.IcongetIcon()Returns an Icon.
-
-
-
Field Detail
-
FIRST_PAGE
public static final int FIRST_PAGE
Type to go to the first page.- See Also:
- Constant Field Values
-
PREVIOUS_PAGE
public static final int PREVIOUS_PAGE
Type to go to the previous page.- See Also:
- Constant Field Values
-
NEXT_PAGE
public static final int NEXT_PAGE
Type to go to the next page.- See Also:
- Constant Field Values
-
LAST_PAGE
public static final int LAST_PAGE
Type to go to the last page.- See Also:
- Constant Field Values
-
type
protected int type
The type of this action.
-
listener
protected PageNavigationListener listener
The object that is listening to the page navigation.
-
icon
protected javax.swing.Icon icon
The icon corresponding with the action.
-
-
Constructor Detail
-
PageNavigationAction
public PageNavigationAction(PageNavigationListener listener, int type, boolean withIcon)
Creates a page navigation action.- Parameters:
listener- the object listening to the page navigationtype- the type of actionwithIcon- if false, no icon will be attached to the action
-
-
Method Detail
-
getIcon
public javax.swing.Icon getIcon()
Description copied from interface:IconActionListenerReturns an Icon.- Specified by:
getIconin interfaceIconActionListener- See Also:
IconActionListener.getIcon()
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent evt)
- Specified by:
actionPerformedin interfacejava.awt.event.ActionListener- See Also:
ActionListener.actionPerformed(java.awt.event.ActionEvent)
-
-