public class PDFViewer
extends javafx.scene.control.Control
contextMenuProperty, skinProperty, tooltipProperty
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, heightProperty, insetsProperty, maxHeightProperty, maxWidthProperty, minHeightProperty, minWidthProperty, opaqueInsetsProperty, paddingProperty, prefHeightProperty, prefWidthProperty, scaleShapeProperty, shapeProperty, snapToPixelProperty, widthProperty
impl_traversalEngineProperty, needsLayoutProperty
accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, cacheHintProperty, cacheProperty, clipProperty, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, focusedProperty, focusTraversableProperty, hoverProperty, idProperty, impl_showMnemonicsProperty, inputMethodRequestsProperty, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParentTransformProperty, localToSceneTransformProperty, managedProperty, mouseTransparentProperty, nodeOrientationProperty, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, pickOnBoundsProperty, pressedProperty, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, styleProperty, translateXProperty, translateYProperty, translateZProperty, visibleProperty
Modifier and Type | Field and Description |
---|---|
static int |
ZOOMMODE_FITPAGE
FitPage zoom mode changes the scale when the window is resized so that the page
is displayed using the maximum available space.
|
static int |
ZOOMMODE_FITWIDTH
FitWidth zoom mode changes the scale when the window is resized so that the full
width of the page is displayed using the maximum available space.
|
static int |
ZOOMMODE_NORMAL
Normal zoom mode means that the scale remains the same when the window is resized.
|
Constructor and Description |
---|
PDFViewer()
Constructs a new JavaFX PDFViewer
|
Modifier and Type | Method and Description |
---|---|
void |
clearDocument()
Clears any loaded document.
|
IPDFDocument |
getDocument()
Returns the PDF document currently displayed.
|
int |
getPageNumber()
Returns the currently displayed page.
|
int |
getRotation()
Returns the current rotation.
|
double |
getScale()
Returns the current scale used to display the PDF document.
|
javafx.scene.control.ScrollPane |
getScrollPane()
Returns a reference to the PDFViewer scroll pane.
|
PDFToolBar |
getToolBar()
Returns the navigation toolbar.
|
int |
getZoomMode()
Get the current zoom mode.
|
void |
loadPDF(InputStream inStream)
Load and display a PDF document using an InputStream.
|
void |
loadPDF(PDFSource source)
Load and display a PDF document using an object that implements
PDFSource.
|
void |
loadPDF(String fileName)
Load and display a PDF document using a file name.
|
void |
loadPDF(URL url)
Load and display a PDF document using a URL.
|
void |
openFile()
Initiates the file open process.
|
void |
rotateCCW()
Rotates pages 90 degrees counter-clockwise.
|
void |
rotateCW()
Rotates pages 90 degrees clockwise.
|
void |
setDocument(IPDFDocument pdfDoc)
Sets this bean's document.
|
static boolean |
setKey(String key)
Sets product key.
|
void |
setPage(int pageNumber)
Changes the currently displayed page.
|
void |
setRotation(int rotation)
Sets the current rotation.
|
void |
setScale(double scale)
Changes the display scale for the PDF document.
|
void |
setSplitVisible(boolean visible)
Method to show or hide the split pane functionality.
|
void |
setToolBarVisible(boolean visible)
Sets the visibility of the PDFToolBar used for the PDFViewerNew.
|
void |
setZoomMode(int zoomMode)
Sets the current zoom mode.
|
contextMenuProperty, executeAccessibleAction, getBaselineOffset, getClassCssMetaData, getContextMenu, getCssMetaData, getSkin, getTooltip, isResizable, queryAccessibleAttribute, setContextMenu, setSkin, setTooltip, skinProperty, tooltipProperty
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, getBackground, getBorder, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getUserAgentStylesheet, getWidth, heightProperty, impl_computeGeomBounds, impl_createPeer, impl_updatePeer, insetsProperty, isCacheShape, isCenterShape, isScaleShape, isSnapToPixel, layoutInArea, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, opaqueInsetsProperty, paddingProperty, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, scaleShapeProperty, setBackground, setBorder, setCacheShape, setCenterShape, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapToPixelProperty, widthProperty
getChildrenUnmodifiable, getImpl_traversalEngine, getStylesheets, impl_getAllParentStylesheets, impl_processMXNode, impl_traversalEngineProperty, isNeedsLayout, layout, lookup, needsLayoutProperty, requestLayout, setImpl_traversalEngine
accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, fireEvent, focusedProperty, focusTraversableProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, hasProperties, hoverProperty, idProperty, impl_findStyles, impl_getLeafTransform, impl_getMatchingStyles, impl_getPeer, impl_getPivotX, impl_getPivotY, impl_getPivotZ, impl_getStyleMap, impl_hasTransforms, impl_isShowMnemonics, impl_isTreeVisible, impl_pickNode, impl_processCSS, impl_reapplyCSS, impl_setShowMnemonics, impl_setStyleMap, impl_showMnemonicsProperty, impl_syncPeer, impl_transformsChanged, impl_traverse, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookupAll, managedProperty, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, pseudoClassStateChanged, relocate, removeEventFilter, removeEventHandler, requestFocus, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setEffect, setEventDispatcher, setFocusTraversable, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, visibleProperty
public static final int ZOOMMODE_NORMAL
public static final int ZOOMMODE_FITPAGE
public static final int ZOOMMODE_FITWIDTH
public static boolean setKey(String key)
key
- Product key.public int getPageNumber()
public void openFile() throws PDFException
PDFException
public IPDFDocument getDocument()
public void clearDocument()
public void setDocument(IPDFDocument pdfDoc)
PDFViewerNew
will go back to page 1 of the document and
reset the page control in the toolbar. The method will also start
generating a new set of thumbviews for the pages.pdfDoc
- The new document.public void loadPDF(InputStream inStream) throws PDFException
inStream
- InputStream used to read the PDF document.PDFException
public void loadPDF(PDFSource source) throws PDFException
source
- Object that implements the PDFSource interface.PDFException
public void loadPDF(URL url) throws PDFException
url
- URL pointing to the location of the PDF document.PDFException
public void loadPDF(String fileName) throws PDFException
fileName
- Name of the PDF document file.PDFException
public int getRotation()
public void setRotation(int rotation)
rotation
- Rotation angle in degrees.public void rotateCW()
public void rotateCCW()
public void setScale(double scale)
scale
- Magnification factor as a percentage. 100 is true size.public void setZoomMode(int zoomMode)
zoomMode
- The new zoom mode. This value has to be either
ZOOMMODE_NORMAL, ZOOMMODE_FITWIDTH, or ZOOMMODE_FITPAGE. If
zoomMode is ZOOMMODE_FITWIDTH or ZOOMMODE_FITPAGE, the method
will call setScale immediately to adjust the scale so that the
page fits in the display window optimally.public int getZoomMode()
public double getScale()
public void setPage(int pageNumber)
pageNumber
- Page to display. Pages are indexed starting at 1.public void setSplitVisible(boolean visible)
true
, the left side of the PDFViewerNew will show a panel
with thumbnails. When visible is false
, the thumbnails will
not be displayed.visible
- The split pane visibilitypublic void setToolBarVisible(boolean visible)
visible
- public PDFToolBar getToolBar()
public javafx.scene.control.ScrollPane getScrollPane()