|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.faceless.pdf2.viewer2.ViewerFeature
org.faceless.pdf2.viewer2.SidePanelFactory
org.faceless.pdf2.viewer2.feature.ThumbnailPanel
public class ThumbnailPanel
Creates a ThumbnailPanel.ThumbnailSidePanel
that displays the page thumbnails.
Since release 2.10.2 the Thumbnail panel can also be used to
reorder, delete and insert pages or entire documents. Modifying
a document in this way requires the EncryptionHandler
on
the document grants the "Assemble" right.
It's also possible to add custom actions to a ThumbnailPanel by
adding features implementing ThumbnailPanel.ThumbnailSelectionAction
.
These will be available via keyboard shortcut or the popup menu
on the panel.
editable | true or false , for setEditable() |
---|---|
draggable | true or false , for setDraggable() |
scrollFollow | true or false , for setScrollFollow() |
usePageLabels | true or false , for setUsePageLabels() |
thumbnailSize | number , for setThumbnailSize() . Default is 100 |
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.
ThumbnailPanel.ThumbnailSelectionAction
Nested Class Summary | |
---|---|
static class |
ThumbnailPanel.SinglePagePanel
A JPanel representing a single page image. |
static interface |
ThumbnailPanel.ThumbnailSelectionAction
This interface should be implemented by any ViewerFeature that
should be available as an action on the ThumbnailPanel.View , either by the popup
menu or by keypress. |
static class |
ThumbnailPanel.ThumbnailSidePanel
This type of SidePanel is returned from a call to createSidePanel() . |
static class |
ThumbnailPanel.View
This class is the JPanel containing all the thumbnails. |
Constructor Summary | |
---|---|
ThumbnailPanel()
Create a new ThumbnailPanel |
Method Summary | |
---|---|
void |
addAction(ThumbnailPanel.ThumbnailSelectionAction action)
If this ThumbnailPanel is part of a DocumentPanel with no viewer, use this method add add ThumbnailPanel.ThumbnailSelectionAction actions to the
panel. |
SidePanel |
createSidePanel()
Create and return a new SidePanel . |
void |
initialize(PDFViewer viewer)
Called when the feature is first added to a viewer |
void |
setDraggable(boolean draggable)
Determines whether SidePanels created by this factory can be edited by dragging pages around or dragging new documents in. |
void |
setEditable(boolean editmode)
Determine whether SidePanels created by this factory allow pages to be edited in any way - either reordered via dragging or through any editing ThumbnailPanel.ThumbnailSelectionAction . |
void |
setScrollFollow(boolean follow)
Set whether the thumbnail panel should scroll to follow the currently selected page or not. |
void |
setThumbnailSize(int thumbnailsize)
Set the size of the longest dimension of each thumbnail. |
void |
setUsePageLabels(boolean uselabels)
Set whether to number the pages using the "page labels" if defined on this PDF, or whether to always use the physical page number. |
Methods inherited from class org.faceless.pdf2.viewer2.SidePanelFactory |
---|
isSidePanelRequired, 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 |
---|
public ThumbnailPanel()
Method Detail |
---|
public void setEditable(boolean editmode)
ThumbnailPanel.ThumbnailSelectionAction
.
The default is true, but this may be overridden by the PDF itself
if it is encypted and doesn't allow edting.
editmode
- true if SidePanels created by this Factory allow alterations to the PDFpublic void setDraggable(boolean draggable)
setEditable(boolean)
- if that flag is
true but this flag false, the document can still be edited by
other means via the Thumbnail panel
public void setScrollFollow(boolean follow)
follow
- whether to follow the currently selected page
in the viewport or not.public void setUsePageLabels(boolean uselabels)
uselabels
- if true, use the page labels if defined, otherwise use the physical page numberPDF.getPageLabel(int)
,
PageNumber.setUsePageLabels(boolean)
public void addAction(ThumbnailPanel.ThumbnailSelectionAction action)
ThumbnailPanel.ThumbnailSelectionAction
actions to the
panel.
public void setThumbnailSize(int thumbnailsize)
public void initialize(PDFViewer viewer)
ViewerFeature
initialize
in class ViewerFeature
public SidePanel createSidePanel()
SidePanelFactory
SidePanel
.
createSidePanel
in class SidePanelFactory
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |