Create a widget that displays the current page number, and allows the user
to enter a new pagenumber for display.
The following
initialization parameters can be specified to configure this feature.
usePageLabels | If true (the default), display the page label for
the selected page if specified. If false, display the physical page number (the default behaviour
prior to 2.11.19). |
alignment | Can be set to "right", "center" or "left" (the default) to position the page
number in the box |
The name of this feature is PageNumber
This code is copyright the Big Faceless Organization. You're welcome to use, modify and distribute it in any form in your own projects, provided those projects continue to make use of the Big Faceless PDF library.
- Since:
- 2.8
Methods inherited from class org.faceless.pdf2.viewer2.ViewerWidget |
action, createActionListener, getComponent, getViewer, isButtonEnabledByDefault, isDocumentRequired, isMenuEnabledByDefault, setButton, setComponent, setDocumentRequired, setMenu, setMenu, setToolBarEnabled, setToolBarEnabledAlways, setToolBarFloatable, setToolBarFloating, toString |
PageNumber
public PageNumber()
initialize
public void initialize(PDFViewer viewer)
- Description copied from class:
ViewerFeature
- Called when the feature is first added to a viewer
- Overrides:
initialize
in class ViewerWidget
setUsePageLabels
public void setUsePageLabels(boolean uselabels)
- Set whether to display the "page labels" if defined on this PDF, or
whether to always display the physical page number.
- Parameters:
uselabels
- if true, use the page labels if defined, otherwise use the physical page number- Since:
- 2.11.19
- See Also:
PDF.getPageLabel(int)
,
ThumbnailPanel.setUsePageLabels(boolean)
documentUpdated
public void documentUpdated(DocumentPanelEvent event)
- Description copied from interface:
DocumentPanelListener
- Called when an
DocumentPanelEvent
is raised
- Specified by:
documentUpdated
in interface DocumentPanelListener
propertyChange
public void propertyChange(PropertyChangeEvent e)
- Specified by:
propertyChange
in interface PropertyChangeListener
Copyright © 2001-2013 Big Faceless Organization