public class JavaFxGUI extends GUI
GUI.PageCounter, GUI.ScrollPolicy| Modifier and Type | Field and Description |
|---|---|
protected JavaFXButtons |
fxButtons |
javafx.scene.control.TextField |
pageCounter2 |
allowScrolling, alwaysShowMouse, annotationTitle, attachmentsTitle, bookmarksGenerated, bookmarksTitle, collapsedSize, commonValues, confirmClose, currentCommandListener, currentCommands, CURSOR, customMessageHandler, debugFX, decode_pdf, DEFAULT_CURSOR, defaultSelection, deletePropertiesOnExit, expandedSize, finishedDecoding, glowInnerColor, glowOuterColor, glowThickness, GRAB_CURSOR, GRABBING_CURSOR, headFont, inset, layersObject, layersTitle, menuItems, minimumScreenWidth, objs, pageTitle, PAN_CURSOR, PAN_CURSORB, PAN_CURSORBL, PAN_CURSORBR, PAN_CURSORL, PAN_CURSORR, PAN_CURSORT, PAN_CURSORTL, PAN_CURSORTR, previewOnSingleScroll, properties, recent, rotation, rotationBox, scaling, scalingBox, scalingFloatValues, searchFrame, showMessages, signaturesTitle, textFont, thumbnails, tree, windowTitleBUTTONBAR, MULTIPAGE, NAVBAR, PAGES| Constructor and Description |
|---|
JavaFxGUI(javafx.stage.Stage stage,
PdfDecoderInt decode_pdf,
Values commonValues,
GUIThumbnailPanel thumbnails,
PropertiesFile properties) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addComboListenerAndLabel(GUICombo combo)
Overrides method from GUI.java, see GUI.java for DOCS.
|
protected void |
addGUIComboBoxes(GUICombo combo)
Overrides method from GUI.java, see GUI.java for DOCS.
|
void |
alterProperty(String value,
boolean set) |
protected void |
createMainViewerWindow(int width,
int height)
Creates the Main Display Window for all of the JavaFX Content.
|
protected void |
createOtherToolBars()
method being called from within init to create other tool bars to add to
display
|
protected void |
createTopMenuBar()
Creates the top two menu bars, the file loading & viewer properties one
and the PDF toolbar, the one which controls searching etc.
|
void |
decodePage()
Key method that calls decodePage from GUI.java
|
void |
dispose()
Method to dispose of objects used by the interface before closing.
|
void |
enableCursor(boolean enabled,
boolean visible)
Enable and or set visibility for the cursor display for multi box
|
void |
enableDownloadBar(boolean enabled,
boolean visible)
Enable and or set visibility for the download display for multi box
|
void |
enableMemoryBar(boolean enabled,
boolean visible) |
void |
enableNavigationBar(boolean enabled,
boolean visible) |
void |
enablePageCounter(GUI.PageCounter value,
boolean enabled,
boolean visibility)
Enable and make visible different parts of the page counter of all of it
|
void |
enableSearchItems(boolean enabled)
Method to enable / disable search options on the toolbar.
|
void |
enableStatusBar(boolean enabled,
boolean visible)
Enable and or set visibility for the status bar for multi box
|
GUIAnnotationPanel |
getAnnotationPanel()
Annotation panel is not available in FX Viewer
|
String |
getBookmark(String bookmark)
Gets the page number of the given bookmark
|
GUIButtons |
getButtons()
Get the GUIButtons object that holds all buttons used by the user interface
|
GUICombo |
getCombo(int ID)
return comboBox or nul if not (QUALITY, SCALING or ROTATION
|
Commands |
getCommand()
Gets the Commands object used by the user interface
|
javafx.scene.control.SplitPane |
getDisplayPane()
Returns the split pane used in the display area of the viewer.
|
double |
getDividerLocation()
Get the divider location for the viewer
|
int |
getDropShadowDepth()
Get the thickness of the glow border
|
javafx.stage.Stage |
getFrame()
allow access to root frame if required
|
Object |
getGlassPane()
Glass pane is not available in FX Viewer
|
SwingCursor |
getGUICursor()
Not part of API - used internally
|
GUIMenuItems |
getMenuItems()
Get the GUIMenuItems object that holds all the menu items used by the user interface.
|
Object |
getMultiViewerFrames()
Used in Swing MultiViewer only
|
Object |
getOutlinePanel()
Gets the object used for the outline panel
|
javafx.scene.control.ScrollPane |
getPageContainer()
Get the page container for the PDF display area
|
Object |
getPageCounter(GUI.PageCounter value)
Get the page counter segments
|
boolean |
getPageTurnScalingAppropriate()
Not part of API - used internally
|
PaperSizes |
getPaperSizes()
Gets the paper sizes for use by the print dialog
|
PdfDecoderFX |
getPdfDecoder()
Get the PdfDecoderFX object used to display the PDF in the user interface
|
PropertiesFile |
getProperties()
This method returns the object that stores and handles the various preferences for the viewer.
|
String |
getPropertiesFileLocation()
Gets the file path for the properties file used in the viewer.
|
RecentDocumentsFactory |
getRecentDocument()
Returns the RecentDocumentFactory used to hand the recent document list
|
javafx.scene.layout.BorderPane |
getRoot()
Get the root pane that holds the GUI interface
|
static double |
getScalingRatio(double actualW,
double actualH,
double maxW,
double maxH)
Get the scaling ratio required to fit one dimension to another
|
int |
getSidebarTabCount()
Get the current count of tabs on the side tab bar
|
String |
getSidebarTabTitleAt(int pos)
Get the title of the tab at the given position
|
Object |
getSideTabBar()
Get the TabPane, as an Object, used for the side tab bar
|
int |
getSplitDividerLocation()
getSplitDividerLocation not supported in OpenViewerFX
|
double |
getStartSize()
Get the start / collapsed position of the split pane divider
|
Object |
getStatusBar()
getStatusBar not supported in OpenViewerFX
|
Object |
getThumbnailPanel()
Gets the object used for the thumbnail panel.
|
Object |
getThumbnailScrollBar()
Returns the scroll bar used in single page mode that shows page thumbnails as you scroll
|
protected String |
getTitle() |
String |
getTitles(String title)
Checks if title matches the title of any of the side tab bar tabs
|
Enum |
getType()
Get the type of the user interface
|
Object |
getVerticalScrollBar()
Can't get the scrollbar from a scroll pane, other methods should be
implemented to circumvent this when needed
|
void |
init(Commands currentCommands)
main method to initialise Swing specific code and create GUI display
|
boolean |
isSingle()
JavaFX is only in single mode
|
void |
open(String fileName)
Open a file in the Viewer
|
void |
openFile(String fileToOpen)
Open a file in the Viewer
|
PdfDecoderInt |
openNewMultiplePage(String selectedFile,
Values commonValues)
Not used in FX.
|
Object |
printDialog(String[] printersList,
String defaultPrinter)
Printing is not currently supported in OpenViewerFX
|
void |
reinitialiseTabs(boolean showVisible)
Set the side tab bar state and set any values required for that state.
|
void |
reinitThumbnails()
Flags the pages thumbnail tab as requiring reinitialisation
|
void |
removePageListener()
Remove the ChangeListener from the PdfDecoder and flush cached pages
|
void |
removeSearchWindow(boolean justHide)
Removes the search window from view with option to clear search results
|
void |
removeSidebarTabAt(int pos)
Remove the tab at the specified position from the side tab bar
|
void |
rescanPdfLayers()
Not part of API - used internally
|
void |
resetComboBoxes(boolean value)
set all 3 combo boxes to isEnabled(value)
|
void |
resetNavBar()
reset the navigation bar so that it appears closed
|
void |
resetPageNav()
Reset the page counter to empty them.
|
void |
resetRotationBox()
align rotation combo box to default for page
|
void |
resetStatusMessage(String message) |
void |
rotate()
read value from rotation box and apply - called by combo listener
|
void |
scaleAndRotate()
all scaling and rotation should go through this.
|
float |
scaleToVisible(float left,
float right,
float top,
float bottom)
calculates the scaling required to make the given area visible
|
void |
scrollToPage(int page)
Scrolls the view to the specified page.
|
void |
searchInTab(GUISearchWindow searchFrame)
Set Search Bar to be in the Left hand Tabbed pane
|
void |
setBookmarks(boolean alwaysGenerate)
Set the bookmarks for the outline panel
|
void |
setCoordText(String string)
set text displayed in cursor co-ordinates box
|
void |
setDisplayMode(Integer mode)
setDisplayMode not supported in OpenViewerFX
|
void |
setDisplayView(int displayView,
int orientation)
set view mode used in panel and redraw in new mode
SINGLE_PAGE,CONTINUOUS,FACING,CONTINUOUS_FACING delay is the time in
milli-seconds which scrolling can stop before background page drawing
starts Multipage views not in OS releases
|
void |
setDownloadProgress(String message,
int percentage) |
void |
setMultibox(int[] flags)
Not part of API - used internally
|
void |
setNoPagesDecoded()
flush list of pages decoded
|
void |
setPage(int page)
Set the interfaces page counter to the page number
and alter any other interface options to match.
|
void |
setPageCounterText(GUI.PageCounter value,
String text)
Set the text content for a section of the page counter.
|
void |
setPageNumber()
set page number at bottom of screen
|
void |
setPannable(boolean pan)
Set is the page display can be panned
|
void |
setPropertiesFileLocation(String file)
Sets the properties file to be used
|
void |
setRecentDocument()
Create the RecentDocuments for the user interface
|
void |
setResults(GUISearchList results)
Set the search list to be used to hold search results in menu bar search mode
|
void |
setRootContainer(Object rawValue) |
void |
setRotationFromExternal(int rot)
Method to set the viewers rotation from external sources.
|
void |
setScalingFromExternal(String scale)
Method to set the viewers scaling from external sources.
|
void |
setScrollBarPolicy(GUI.ScrollPolicy pol)
Sets the scroll bar policy for the display areas scroll pane
|
void |
setSearchText(Object searchText)
Set the search text field to be used for the menu bar search input
|
void |
setStartSize(int size)
Set the start / collapsed position of the split pane divider
|
void |
setStatusProgress(int size)
set current status value 0 -100
|
void |
setTabsNotInitialised(boolean b)
Set tabs not initialised flag to prevent use of tabs.
|
void |
setThumbnailScrollBarValue(int pageNum)
Set the position of the scroll bar based on desired page number
|
void |
setThumbnailScrollBarVisibility(boolean isVisible)
Control thumbnail scroll bars visibility
|
protected void |
setTitle(String title)
Overrides method from GUI.java, see GUI.java for DOCS.
|
protected void |
setupBorderPanes()
Overrides method from GUI.java, see GUI.java for DOCS.
|
protected void |
setupBottomToolBarItems()
Sets up the position & visual style of the items on the bottom toolbar
(page navigation buttons etc).
|
protected void |
setupCenterPanelBackground()
Overrides method from GUI.java, see GUI.java for DOCS.
|
protected void |
setupComboBoxes()
Overrides method from GUI.java, see GUI.java for DOCS.
|
protected void |
setupKeyboardControl()
Uses Keyboard Arrow Keys (UP/DOWN LEFT/RIGT) to Control Page Navigation.
|
protected void |
setupPDFBorder()
Creates a glowing border around the PDFDisplayPane.
|
protected void |
setupPDFDisplayPane()
Sets up the central display pane to display the pdf content.
|
void |
setupSplitPaneDivider(int size,
boolean visibility)
Set up the split pane divider for use
|
void |
setupThumbnailPanel()
Set the thumbnail panel ready for display.
|
protected void |
setViewerIcon()
Overrides method from GUI.java, see GUI.java for DOCS.
|
int |
showConfirmDialog(Object message,
String title,
int optionType,
int messageType) |
int |
showConfirmDialog(String message,
String message2,
int option) |
void |
showFirstTimePopup()
Method used to show popups that are displayed the first time the Viewer is opened
|
String |
showInputDialog(Object message,
String title,
int type) |
String |
showInputDialog(String message) |
void |
showMessageDialog(Object info) |
int |
showMessageDialog(Object message1,
Object[] options,
int selectedChoice) |
void |
showMessageDialog(Object message,
String title,
int type) |
void |
showMessageDialog(String message) |
void |
showMessageDialog(String message,
String title)
Show a message dialog with the specified message and title
|
int |
showOverwriteDialog(String file,
boolean yesToAllPresent) |
void |
snapScalingToDefaults(float newScaling)
Set scaling to nearest of the viewer default values.
|
void |
stopThumbnails()
Stop thumbnail generation in the pages thumbnail tab
|
void |
triggerPageTurnAnimation(PdfDecoderInt decode_pdf,
Values commonValues,
int updatedTotal,
boolean rightTurn)
triggerPageTurnAnimation is unsupported in OpenViewerFX
|
void |
updateStatusMessage(String message)
message to show in status object
|
void |
updateTextBoxSize()
Update the page counter input size to accommodate the contents
|
void |
updateTransitionType()
Set the transition type to be used when changing between pages
|
addCombo, allowScrolling, confirmClose, createUniqueAnnotationIcons, decodeGUIPage, getFlattenedTreeNodes, getGlowInnerColor, getGlowOuterColor, getGlowThickness, getHotspots, getPageLabel, getPDFDisplayInset, getRotation, getScaling, getSelectedComboIndex, getSelectedComboItem, getValues, isCommandInThread, isExecutingCommand, pageLabelDiffers, setAutoScrolling, setCommandInThread, setDpi, setExecutingCommand, setPdfDecoder, setPreferences, setRotation, setScaling, setSearchFrame, setSelectedComboIndex, setSelectedComboItem, setupSidebarTitles, setViewerTitle, toogleAutoScrollingprotected final JavaFXButtons fxButtons
public javafx.scene.control.TextField pageCounter2
public JavaFxGUI(javafx.stage.Stage stage,
PdfDecoderInt decode_pdf,
Values commonValues,
GUIThumbnailPanel thumbnails,
PropertiesFile properties)
public Object getThumbnailScrollBar()
public void setThumbnailScrollBarVisibility(boolean isVisible)
isVisible - boolean value to control visibilitypublic void setThumbnailScrollBarValue(int pageNum)
pageNum - int value for the pagepublic javafx.scene.control.SplitPane getDisplayPane()
public Object getMultiViewerFrames()
public String getPropertiesFileLocation()
public String getBookmark(String bookmark)
bookmark - String value of the bookmarkpublic void reinitialiseTabs(boolean showVisible)
showVisible - true to expand the side tab bar, false to collapsepublic void stopThumbnails()
public void reinitThumbnails()
public void resetNavBar()
public void setNoPagesDecoded()
GUIFactorypublic void setDisplayMode(Integer mode)
public boolean isSingle()
public Object getThumbnailPanel()
public Object getOutlinePanel()
public Object getVerticalScrollBar()
public void setRootContainer(Object rawValue)
public void resetRotationBox()
GUIFactorypublic PropertiesFile getProperties()
GUIFactorypublic void searchInTab(GUISearchWindow searchFrame)
public void setPropertiesFileLocation(String file)
file - String file name for the properties file to be usedpublic Commands getCommand()
public void init(Commands currentCommands)
GUIinit in interface GUIFactoryinit in class GUIcurrentCommands - Commands object to be used by the user interfaceprotected void createOtherToolBars()
createOtherToolBars in class GUIpublic void setMultibox(int[] flags)
Set the state and value for the multi box at the bottom left of the user interface.
flags - an int[] used to control multi box displayprotected void setViewerIcon()
setViewerIcon in class GUIpublic void setDisplayView(int displayView,
int orientation)
protected void setTitle(String title)
public void resetComboBoxes(boolean value)
GUIFactorypublic GUICombo getCombo(int ID)
GUIFactorypublic void scaleAndRotate()
public static double getScalingRatio(double actualW,
double actualH,
double maxW,
double maxH)
actualW - double value representing actual widthactualH - double value representing actual heightmaxW - double value representing max widthmaxH - double value representing max heightpublic void snapScalingToDefaults(float newScaling)
newScaling - The scaling value to snap to viewer default valuespublic void rotate()
GUIFactorypublic void scrollToPage(int page)
page - Page to scroll to.public void setupThumbnailPanel()
public void setBookmarks(boolean alwaysGenerate)
alwaysGenerate - true we will generate the bookmarks, false we only generate bookmarks if not already generatedpublic void setCoordText(String string)
GUIFactorypublic void setPageNumber()
GUIFactorypublic void setPage(int page)
page - page number as an intpublic Enum getType()
public void resetPageNav()
public void setRotationFromExternal(int rot)
rot - The rotation to use in the Viewerpublic void setScalingFromExternal(String scale)
scale - The scaling to use in the Viewer as a Stringpublic javafx.stage.Stage getFrame()
GUIFactorypublic int showMessageDialog(Object message1, Object[] options, int selectedChoice)
public int showOverwriteDialog(String file, boolean yesToAllPresent)
public void showMessageDialog(String message)
public void showMessageDialog(String message, String title)
message - String message to be used in the dialogtitle - String title to be used in the dialogpublic void showMessageDialog(Object info)
public void showFirstTimePopup()
public int showConfirmDialog(Object message, String title, int optionType, int messageType)
public void setDownloadProgress(String message, int percentage)
public void updateStatusMessage(String message)
GUIFactorypublic void resetStatusMessage(String message)
public void setStatusProgress(int size)
GUIFactorypublic int getSplitDividerLocation()
public Object printDialog(String[] printersList, String defaultPrinter)
printersList - defaultPrinter - public PaperSizes getPaperSizes()
public void setSearchText(Object searchText)
searchText - A JTextField to be used for search inputpublic void setResults(GUISearchList results)
results - an implementation of GUISearchListpublic Object getSideTabBar()
public void enableSearchItems(boolean enabled)
GUIFactorypublic void removeSearchWindow(boolean justHide)
justHide - true to just remove the search window, false to also clear current resultspublic void alterProperty(String value, boolean set)
public void dispose()
dispose in interface GUIFactorydispose in class GUIpublic boolean getPageTurnScalingAppropriate()
public SwingCursor getGUICursor()
public void rescanPdfLayers()
public String getTitles(String title)
title - String title to check for.public Object getStatusBar()
public GUIButtons getButtons()
public GUIMenuItems getMenuItems()
public void setTabsNotInitialised(boolean b)
b - true to mark the tabs as not initialised, false to mark as initialisedpublic void decodePage()
public void updateTransitionType()
public javafx.scene.control.ScrollPane getPageContainer()
public PdfDecoderFX getPdfDecoder()
protected void addComboListenerAndLabel(GUICombo combo)
addComboListenerAndLabel in class GUIprotected void addGUIComboBoxes(GUICombo combo)
addGUIComboBoxes in class GUIprotected void setupCenterPanelBackground()
setupCenterPanelBackground in class GUIprotected void setupComboBoxes()
setupComboBoxes in class GUIprotected void setupKeyboardControl()
setupKeyboardControl in class GUIprotected void setupPDFDisplayPane()
GUIsetupPDFDisplayPane in class GUIprotected void setupBorderPanes()
setupBorderPanes in class GUIprotected void setupBottomToolBarItems()
setupBottomToolBarItems in class GUIprotected void setupPDFBorder()
setupPDFBorder in class GUIprotected void createTopMenuBar()
createTopMenuBar in class GUIprotected void createMainViewerWindow(int width,
int height)
createMainViewerWindow in class GUIwidth - is of type intheight - is of type intpublic void setScrollBarPolicy(GUI.ScrollPolicy pol)
pol - ScrollPolicy to be applied to the scroll panepublic RecentDocumentsFactory getRecentDocument()
public void setRecentDocument()
public void openFile(String fileToOpen)
fileToOpen - String filename for the file to be openedpublic void open(String fileName)
fileName - String filename for the file to be openedpublic void enablePageCounter(GUI.PageCounter value, boolean enabled, boolean visibility)
value - PageCounter value for the different page counter elementsenabled - true to enable the counter section, false to disable.visibility - true to make visible the counter section, false to disable.public void removePageListener()
public void setPageCounterText(GUI.PageCounter value, String text)
value - PageCounter value for the different page counter elementstext - String value to be place in the page counterpublic Object getPageCounter(GUI.PageCounter value)
value - PageCounter value for the different page counter elementspublic void updateTextBoxSize()
public void enableCursor(boolean enabled,
boolean visible)
enabled - true to enable, false to disablevisible - true to make visible, false to make invisiblepublic void enableMemoryBar(boolean enabled,
boolean visible)
public void enableNavigationBar(boolean enabled,
boolean visible)
public void enableDownloadBar(boolean enabled,
boolean visible)
enabled - true to enable, false to disablevisible - true to make visible, false to make invisiblepublic int getSidebarTabCount()
public String getSidebarTabTitleAt(int pos)
pos - The position of the tab on the tabbed panepublic void removeSidebarTabAt(int pos)
pos - Tab index to removed.public double getDividerLocation()
public double getStartSize()
public void setStartSize(int size)
size - position as an intpublic float scaleToVisible(float left,
float right,
float top,
float bottom)
public int getDropShadowDepth()
public javafx.scene.layout.BorderPane getRoot()
public void setPannable(boolean pan)
pan - boolean value to control if pannablepublic void setupSplitPaneDivider(int size,
boolean visibility)
size - unsupported in OpenViewerFXvisibility - true to set left side of divider visible and enabled, false to set disabled and invisiblepublic void enableStatusBar(boolean enabled,
boolean visible)
enabled - true to enable, false to disablevisible - true to make visible, false to make invisiblepublic GUIAnnotationPanel getAnnotationPanel()
public Object getGlassPane()
public PdfDecoderInt openNewMultiplePage(String selectedFile, Values commonValues)
RuntimeException - When called throws a runtime exceptionpublic void triggerPageTurnAnimation(PdfDecoderInt decode_pdf, Values commonValues, int updatedTotal, boolean rightTurn)
Copyright © 2017. All rights reserved.