Package org.apache.pdfbox.debugger.ui
Class TreeViewMenu
- java.lang.Object
-
- org.apache.pdfbox.debugger.ui.MenuBase
-
- org.apache.pdfbox.debugger.ui.TreeViewMenu
-
public final class TreeViewMenu extends MenuBase
A singleton class that provides tree view menu which can be used to switch the kind of tree view. To act upon the menu item selection user of the class must add ActionListener which will check for the action command and act accordingly.
-
-
Field Summary
Fields Modifier and Type Field Description private javax.swing.JRadioButtonMenuItemcrtItemprivate static TreeViewMenuinstanceprivate javax.swing.JRadioButtonMenuItempagesItemprivate javax.swing.JRadioButtonMenuItemstructureItemprivate static java.util.List<java.lang.String>validTreeModesstatic java.lang.StringVIEW_CROSS_REF_TABLEstatic java.lang.StringVIEW_PAGESstatic java.lang.StringVIEW_STRUCTURE
-
Constructor Summary
Constructors Modifier Constructor Description privateTreeViewMenu()Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private javax.swing.JMenucreateTreeViewMenu()static TreeViewMenugetInstance()Provides the TreeViewMenu instance.java.lang.StringgetTreeViewSelection()Provide the current tree view selection.static booleanisValidViewMode(java.lang.String viewMode)Checks if the given viewMode value is a valid one.voidsetTreeViewSelection(java.lang.String selection)Set the tree view selection.-
Methods inherited from class org.apache.pdfbox.debugger.ui.MenuBase
addMenuListeners, getMenu, setEnableMenu, setMenu
-
-
-
-
Field Detail
-
VIEW_PAGES
public static final java.lang.String VIEW_PAGES
- See Also:
- Constant Field Values
-
VIEW_STRUCTURE
public static final java.lang.String VIEW_STRUCTURE
- See Also:
- Constant Field Values
-
VIEW_CROSS_REF_TABLE
public static final java.lang.String VIEW_CROSS_REF_TABLE
- See Also:
- Constant Field Values
-
validTreeModes
private static final java.util.List<java.lang.String> validTreeModes
-
instance
private static TreeViewMenu instance
-
pagesItem
private javax.swing.JRadioButtonMenuItem pagesItem
-
structureItem
private javax.swing.JRadioButtonMenuItem structureItem
-
crtItem
private javax.swing.JRadioButtonMenuItem crtItem
-
-
Method Detail
-
getInstance
public static TreeViewMenu getInstance()
Provides the TreeViewMenu instance.- Returns:
- TreeViewMenu instance.
-
setTreeViewSelection
public void setTreeViewSelection(java.lang.String selection)
Set the tree view selection.- Parameters:
selection- String instance.
-
getTreeViewSelection
public java.lang.String getTreeViewSelection()
Provide the current tree view selection.- Returns:
- the selection String instance
-
isValidViewMode
public static boolean isValidViewMode(java.lang.String viewMode)
Checks if the given viewMode value is a valid one.- Parameters:
viewMode- the view mode to be checked- Returns:
- true if the given value is a valid view mode, otherwise false
-
createTreeViewMenu
private javax.swing.JMenu createTreeViewMenu()
-
-