org.faceless.pdf2.viewer2.feature
Class PageNumber

java.lang.Object
  extended by org.faceless.pdf2.viewer2.ViewerFeature
      extended by org.faceless.pdf2.viewer2.ViewerWidget
          extended by org.faceless.pdf2.viewer2.feature.PageNumber
All Implemented Interfaces:
PropertyChangeListener, EventListener, DocumentPanelListener

public class PageNumber
extends ViewerWidget
implements DocumentPanelListener, PropertyChangeListener

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.
usePageLabelsIf 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).
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

Constructor Summary
PageNumber()
           
 
Method Summary
 void documentUpdated(DocumentPanelEvent event)
          Called when an DocumentPanelEvent is raised
 void initialize(PDFViewer viewer)
          Called when the feature is first added to a viewer
 void propertyChange(PropertyChangeEvent e)
           
 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.
 
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
 
Methods inherited from class org.faceless.pdf2.viewer2.ViewerFeature
getAllEnabledFeatures, getAllFeatures, getCustomJavaScript, getFeatureProperty, getFeatureURLProperty, getName, isEnabledByDefault, setFeatureName, teardown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PageNumber

public PageNumber()
Method Detail

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-2010 Big Faceless Organization