public abstract class GUI extends Object implements GUIFactory
| Modifier and Type | Class and Description |
|---|---|
static class |
GUI.PageCounter |
static class |
GUI.ScrollPolicy
Generic ENUMS for setting similar JavaFX and Swing values.
|
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
allowScrolling
stops autoscrolling at screen edge
|
static boolean |
alwaysShowMouse |
protected String |
annotationTitle |
protected String |
attachmentsTitle |
protected boolean |
bookmarksGenerated |
protected String |
bookmarksTitle |
protected static int |
collapsedSize |
protected Values |
commonValues |
protected boolean |
confirmClose
confirms exit when closing the window
|
protected CommandListener |
currentCommandListener
listener on buttons, menus, combboxes to execute options (one instance on all objects)
|
protected Commands |
currentCommands |
static int |
CURSOR |
protected CustomMessageHandler |
customMessageHandler |
static boolean |
debugFX |
protected PdfDecoderInt |
decode_pdf
handle for internal use
|
static int |
DEFAULT_CURSOR |
protected static int |
defaultSelection
default scaling on the combobox scalingValues
|
static boolean |
deletePropertiesOnExit |
protected static int |
expandedSize |
protected boolean |
finishedDecoding |
protected Color |
glowInnerColor |
protected Color |
glowOuterColor |
protected static int |
glowThickness
Constants for glowing border
|
static int |
GRAB_CURSOR
grabbing cursor
|
static int |
GRABBING_CURSOR |
protected Font |
headFont |
protected static int |
inset
padding so that the pdf is not right at the edge
|
protected PdfLayerList |
layersObject |
protected String |
layersTitle |
protected GUIMenuItems |
menuItems |
protected static int |
minimumScreenWidth
minimum screen width to ensure menu buttons are visible
|
protected Map<FormObject,String> |
objs |
protected String |
pageTitle |
static int |
PAN_CURSOR |
static int |
PAN_CURSORB |
static int |
PAN_CURSORBL |
static int |
PAN_CURSORBR |
static int |
PAN_CURSORL |
static int |
PAN_CURSORR |
static int |
PAN_CURSORT |
static int |
PAN_CURSORTL |
static int |
PAN_CURSORTR |
protected boolean |
previewOnSingleScroll |
protected PropertiesFile |
properties |
protected RecentDocumentsFactory |
recent |
protected int |
rotation
store page rotation
|
protected GUICombo |
rotationBox
scaling factors on the page
|
protected float |
scaling
page scaling to use 1=100%
|
protected GUICombo |
scalingBox
scaling factors on the page
|
protected float[] |
scalingFloatValues
scaling values as floats to save conversion
|
protected GUISearchWindow |
searchFrame |
static boolean |
showMessages
control if messages appear
|
protected String |
signaturesTitle |
protected Font |
textFont |
protected GUIThumbnailPanel |
thumbnails |
protected GUIOutline |
tree
XML structure of bookmarks
|
static String |
windowTitle |
BUTTONBAR, MULTIPAGE, NAVBAR, PAGES| Constructor and Description |
|---|
GUI(PdfDecoderInt decode_pdf,
Values commonValues,
GUIThumbnailPanel thumbnails,
PropertiesFile properties) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addCombo(String tooltip,
int ID) |
protected void |
addComboListenerAndLabel(GUICombo combo)
Adds listener for the ComboBoxes and Title.
|
protected void |
addGUIComboBoxes(GUICombo combo)
Adds the ComboBoxes to theViewer.
|
boolean |
allowScrolling()
show if user has set auto-scrolling on or off - if on moves at edge of
panel to show more
|
boolean |
confirmClose()
show is user has set the option to have exit confirmed with a dialog
|
protected void |
createMainViewerWindow(int width,
int height)
Creates the Main Display Window for all of the JavaFX Content.
|
protected void |
createOtherToolBars() |
protected void |
createTopMenuBar()
Creates the top two menu bars, the file loading & viewer properties one
and the PDF toolbar, the one which controls printing, searching etc.
|
void |
createUniqueAnnotationIcons()
example code which sets up an individual icon for each annotation to display - only use
if you require each annotation to have its own icon
|
void |
decodeGUIPage(GUIFactory currentGUI)
called by nav functions to decode next page (in GUI code as needs to
manipulate large part of GUI)
|
void |
dispose()
Dispose of the elements that require disposal
|
protected static void |
getFlattenedTreeNodes(TreeNode theNode,
List<TreeNode> items) |
Color |
getGlowInnerColor()
Get the inner colour of the glow border
|
Color |
getGlowOuterColor()
Get the outer colour of the glow border
|
int |
getGlowThickness()
Get the thickness of the glow border
|
Map |
getHotspots()
get Map containing Form Objects setup for Unique Annotations
|
String |
getPageLabel(int pageNumber)
Get the label of the given page.
|
static int |
getPDFDisplayInset() |
int |
getRotation()
get current rotation
|
float |
getScaling()
get current scaling
|
int |
getSelectedComboIndex(int ID)
Get selected index for the specified combo-box
|
Object |
getSelectedComboItem(int ID)
Get selected item for the specified combo-box
|
protected String |
getTitle() |
Values |
getValues()
Get the values used by the GUI
|
void |
init(Commands currentCommands)
main method to initialise Swing specific code and create GUI display
|
boolean |
isCommandInThread()
Get if command is in a thread
|
boolean |
isExecutingCommand()
Get if their is currently a command executing
|
boolean |
pageLabelDiffers(int pageNumber)
Get if the page label for a given page differs from the default page numbers
|
void |
setAutoScrolling(boolean allowScrolling) |
void |
setCommandInThread(boolean b)
Used to flag if command is in a thread
|
void |
setDpi(int dpi)
Set the dpi value used to adjust scaling
|
void |
setExecutingCommand(boolean b)
Used to flag if command is executing
|
void |
setPdfDecoder(PdfDecoderInt decode_pdf)
Not part of API - used internally
|
void |
setPreferences(int dpi,
int search,
int border,
boolean scroll,
int pageMode,
boolean updateDefaultValue,
int maxNoOfMultiViewers)
Method to allow setting of common properties values
|
protected void |
setRotation() |
void |
setScaling(float s)
Set the scaling for the user interface and update the scaling combo box
|
void |
setSearchFrame(GUISearchWindow searchFrame)
Set the search frame to be used as part of the user interface
|
void |
setSelectedComboIndex(int ID,
int index)
Set selected index for the specified combo-box
|
void |
setSelectedComboItem(int ID,
String index)
Set selected item for the specified combo-box
|
protected abstract void |
setTitle(String title)
Sets the title for the Viewer.
|
protected void |
setupBorderPanes()
Sets up the panes to the left and right of the central display.
|
protected void |
setupBottomToolBarItems()
Sets up the position & visual style of the items on
the bottom toolbar (page navigation buttons etc).
|
protected void |
setupCenterPanelBackground()
Sets the background for the main center display
panel which holds the PDF content pane.
|
protected void |
setupComboBoxes()
Performs initial setup of the ComboBoxes.
|
protected void |
setupKeyboardControl()
Adds key listeners for keyboard navigation of the Viewer.
|
protected void |
setupPDFBorder()
Creates a glowing border around the PDFDisplayPane.
|
protected void |
setupPDFDisplayPane()
Sets up the central display pane to display the pdf content.
|
protected void |
setupSidebarTitles() |
protected void |
setViewerIcon()
Sets the icon for the Viewer.
|
void |
setViewerTitle(String title)
set title or over-ride with message
|
void |
toogleAutoScrolling()
toggle state of autoscrolling on/off
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitalterProperty, decodePage, enableCursor, enableDownloadBar, enableMemoryBar, enableNavigationBar, enablePageCounter, enableSearchItems, enableStatusBar, getAnnotationPanel, getBookmark, getButtons, getCombo, getCommand, getDisplayPane, getDividerLocation, getDropShadowDepth, getFrame, getGlassPane, getGUICursor, getMenuItems, getMultiViewerFrames, getOutlinePanel, getPageContainer, getPageCounter, getPageTurnScalingAppropriate, getPaperSizes, getPdfDecoder, getProperties, getPropertiesFileLocation, getRecentDocument, getSidebarTabCount, getSidebarTabTitleAt, getSideTabBar, getSplitDividerLocation, getStartSize, getStatusBar, getThumbnailPanel, getThumbnailScrollBar, getTitles, getType, getVerticalScrollBar, isSingle, open, openFile, openNewMultiplePage, printDialog, reinitialiseTabs, reinitThumbnails, removePageListener, removeSearchWindow, removeSidebarTabAt, rescanPdfLayers, resetComboBoxes, resetNavBar, resetPageNav, resetRotationBox, resetStatusMessage, rotate, scaleAndRotate, scaleToVisible, scrollToPage, searchInTab, setBookmarks, setCoordText, setDisplayMode, setDisplayView, setDownloadProgress, setMultibox, setNoPagesDecoded, setPage, setPageCounterText, setPageNumber, setPannable, setPropertiesFileLocation, setRecentDocument, setResults, setRootContainer, setRotationFromExternal, setScalingFromExternal, setScrollBarPolicy, setSearchText, setStartSize, setStatusProgress, setTabsNotInitialised, setThumbnailScrollBarValue, setThumbnailScrollBarVisibility, setupSplitPaneDivider, setupThumbnailPanel, showConfirmDialog, showConfirmDialog, showFirstTimePopup, showInputDialog, showInputDialog, showMessageDialog, showMessageDialog, showMessageDialog, showMessageDialog, showOverwriteDialog, snapScalingToDefaults, stopThumbnails, triggerPageTurnAnimation, updateStatusMessage, updateTextBoxSizepublic static boolean deletePropertiesOnExit
public static boolean alwaysShowMouse
protected static int expandedSize
protected static int collapsedSize
public static String windowTitle
protected RecentDocumentsFactory recent
protected CommandListener currentCommandListener
protected Commands currentCommands
protected CustomMessageHandler customMessageHandler
public static boolean showMessages
protected GUIMenuItems menuItems
protected PdfLayerList layersObject
protected boolean finishedDecoding
public static final int CURSOR
public static final int GRAB_CURSOR
public static final int GRABBING_CURSOR
public static final int DEFAULT_CURSOR
public static final int PAN_CURSOR
public static final int PAN_CURSORL
public static final int PAN_CURSORTL
public static final int PAN_CURSORT
public static final int PAN_CURSORTR
public static final int PAN_CURSORR
public static final int PAN_CURSORBR
public static final int PAN_CURSORB
public static final int PAN_CURSORBL
protected Font textFont
protected Font headFont
protected boolean previewOnSingleScroll
protected static final int glowThickness
protected final Color glowOuterColor
protected final Color glowInnerColor
protected Map<FormObject,String> objs
protected boolean bookmarksGenerated
protected GUISearchWindow searchFrame
protected String pageTitle
protected String bookmarksTitle
protected String signaturesTitle
protected String layersTitle
protected String annotationTitle
protected String attachmentsTitle
protected PdfDecoderInt decode_pdf
protected static final int minimumScreenWidth
protected GUIOutline tree
protected boolean allowScrolling
protected boolean confirmClose
protected float[] scalingFloatValues
protected float scaling
protected static int inset
protected int rotation
protected GUICombo rotationBox
protected GUICombo scalingBox
protected static int defaultSelection
protected final Values commonValues
protected final GUIThumbnailPanel thumbnails
protected final PropertiesFile properties
public static final boolean debugFX
public GUI(PdfDecoderInt decode_pdf, Values commonValues, GUIThumbnailPanel thumbnails, PropertiesFile properties)
public void setPreferences(int dpi,
int search,
int border,
boolean scroll,
int pageMode,
boolean updateDefaultValue,
int maxNoOfMultiViewers)
dpi - int value to set the dpi propertysearch - int value to set the search style propertyborder - int value to set the border propertyscroll - true to enable autoscrolling, false to disablepageMode - int value to set the starting display view modeupdateDefaultValue - true to enable automaticupdate property, false to disablemaxNoOfMultiViewers - int value to set the maximum amount of files openable by the Multiviewerpublic boolean allowScrolling()
GUIFactoryallowScrolling in interface GUIFactorypublic boolean confirmClose()
GUIFactoryconfirmClose in interface GUIFactorypublic void setAutoScrolling(boolean allowScrolling)
setAutoScrolling in interface GUIFactorypublic void toogleAutoScrolling()
GUIFactorytoogleAutoScrolling in interface GUIFactorypublic int getRotation()
GUIFactorygetRotation in interface GUIFactorypublic float getScaling()
GUIFactorygetScaling in interface GUIFactorypublic Values getValues()
getValues in interface GUIFactoryprotected void addCombo(String tooltip, int ID)
public Map getHotspots()
getHotspots in interface GUIFactorypublic void setScaling(float s)
s - float value representing the scaling where 1 is 100%public static int getPDFDisplayInset()
public void createUniqueAnnotationIcons()
To use this you ideally need to parse the annotations first -there is a method allowing you to extract just the annotations from the data.
public void setDpi(int dpi)
dpi - int value to represent the dpipublic void dispose()
dispose in interface GUIFactorypublic void init(Commands currentCommands)
init in interface GUIFactorycurrentCommands - Commands object to be used by the user interfaceprotected String getTitle()
public boolean isCommandInThread()
isCommandInThread in interface GUIFactorypublic void setCommandInThread(boolean b)
setCommandInThread in interface GUIFactoryb - true to flag command is in thread, false otherwise.public boolean isExecutingCommand()
isExecutingCommand in interface GUIFactorypublic void setExecutingCommand(boolean b)
setExecutingCommand in interface GUIFactoryb - true to flag command is executing, false otherwise.protected static void getFlattenedTreeNodes(TreeNode theNode, List<TreeNode> items)
public int getGlowThickness()
public Color getGlowOuterColor()
public Color getGlowInnerColor()
public void setSearchFrame(GUISearchWindow searchFrame)
setSearchFrame in interface GUIFactorysearchFrame - GUISearchWindow object to be used as the search windowprotected void setRotation()
public int getSelectedComboIndex(int ID)
ID - int value specifying a combo-boxpublic void setSelectedComboIndex(int ID,
int index)
ID - int value specifying a combo-boxindex - int value of the index to selectpublic Object getSelectedComboItem(int ID)
ID - int value specifying a combo-boxpublic void setSelectedComboItem(int ID,
String index)
ID - int value specifying a combo-boxindex - String value of the item to selectpublic void setPdfDecoder(PdfDecoderInt decode_pdf)
Set the PdfDecoderInt object used by the user interface
decode_pdf - PdfDecoderInt used for the PDF opened in the viewerpublic void decodeGUIPage(GUIFactory currentGUI)
public void setViewerTitle(String title)
GUIFactorysetViewerTitle in interface GUIFactoryprotected abstract void setTitle(String title)
protected void setViewerIcon()
protected void addComboListenerAndLabel(GUICombo combo)
protected void addGUIComboBoxes(GUICombo combo)
protected void setupCenterPanelBackground()
protected void setupComboBoxes()
protected void setupKeyboardControl()
protected void setupPDFDisplayPane()
protected void setupBorderPanes()
protected void createOtherToolBars()
protected void setupBottomToolBarItems()
protected void setupPDFBorder()
protected void createTopMenuBar()
protected void createMainViewerWindow(int width,
int height)
width - is of type intheight - is of type intprotected void setupSidebarTitles()
public String getPageLabel(int pageNumber)
getPageLabel in interface GUIFactorypageNumber - int value to present the page numberpublic boolean pageLabelDiffers(int pageNumber)
pageNumber - int value representing the page numberCopyright © 2017. All rights reserved.