public class XTCEViewerPreferences extends Object
| Modifier and Type | Method and Description |
|---|---|
void |
addFindContainerSearch(String searchItem)
Adds another Find Container Search Text item to the history with a
limit of 25 non-duplicate items, with the most recent being the first
on the list.
|
void |
addFindParameterSearch(String searchItem)
Adds another Find Parameter Search Text item to the history with a
limit of 25 non-duplicate items, with the most recent being the first
on the list.
|
void |
addFindTelecommandSearch(String searchItem)
Adds another Find Telecommand Search Text item to the history with a
limit of 25 non-duplicate items, with the most recent being the first
on the list.
|
void |
addSavedXPathQuerySearch(String searchItem)
Adds another XPath Query item to the saved cache with a limit of 25
non-duplicate items, with the most recent being the first on the list.
|
void |
clearRecentFilesList(JMenu recentItemsMenu)
Method to erase the recent files list.
|
String |
getContainerOrientationOption()
Retrieve the user preference for drawing containers and telecommands
as to their orientation on the drawing.
|
String |
getCurrentWorkingDirectory()
Retrieve the last working directory that was used for a load or save
operation, considering that this is not retained in the Preferences.
|
static XTCEViewerPreferences |
getInstance()
The instance accessor to retrieve the singleton reference to the
preferences object.
|
Locale |
getLanguagePreference()
Retrieve the user last selected language and country preference or the
default of English/US if it has not been explicitly set.
|
String |
getPreferredAliasNamespaceOption()
Retrieve the user preference for which namespace to show Aliases for on
XTCEViewer displays.
|
int |
getRecentFilesMaxCountOption()
Retrieve the user preference for the number of files to store in the
recently loaded list for quicker access.
|
List<String> |
getRecentFindContainerSearches()
Retrieve the list of recent Find Container Search Text items to display
in the combo box for user convenience.
|
List<String> |
getRecentFindParameterSearches()
Retrieve the list of recent Find Parameter Search Text items to display
in the combo box for user convenience.
|
List<String> |
getRecentFindTelecommandSearches()
Retrieve the list of recent Find Telecommand Search Text items to
display in the combo box for user convenience.
|
List<String> |
getSavedXPathQueries()
Retrieve the list of stored XPath Query items to display in the combo
box for user convenience.
|
boolean |
getShowAliasNamespacesOption()
Retrieve the user preference for showing the alias namespace on the
XTCEViewer displays in the form of NS::ALIAS, which is generally
recommended if more than one namespace is to be shown.
|
boolean |
getShowAllAliasNamespacesOption()
Retrieve the user preference for showing all available Aliases on the
XTCEViewer displays.
|
boolean |
getShowAllContainerConditionalsOption()
Retrieve the user preference for showing all available conditions and
their children on containers within the XTCEViewer displays.
|
boolean |
getUseXIncludeOption()
Retrieve the user preference for using the XInclude XML feature when
loading a database document.
|
boolean |
getValidateOnLoadOption()
Retrieves the user preference for exercising XSD validation on any
XTCE XML document at time of load.
|
void |
removeSavedXPathQuerySearch(String searchItem)
Removes an XPath Query item from the saved cache.
|
void |
setContainerOrientationOption(String orientDrawingAs)
Sets the user preference for drawing containers and telecommands
as to their orientation on the drawing.
|
void |
setCurrentWorkingDirectory(String dirName)
Sets the last working directory that was used for a load or save
operation, considering that this is not retained in the Preferences.
|
void |
setLanguagePreference(Locale locale)
Sets the user preferred language and country preference.
|
void |
setParentWindow(XTCEViewer viewerTool)
This permits the XTCEViewer application to set a reference to itself
for displaying the warning dialog in the event that the preferences
cannot be saved.
|
void |
setPreferredAliasNamespaceOption(String ns)
Sets the user preference for which namespace to show Aliases for on
XTCEViewer displays.
|
void |
setRecentFilesMaxCountOption(int maxNum)
Sets the user preference for the number of files to store in the
recently loaded list for quicker access.
|
void |
setShowAliasNamespacesOption(boolean flag)
Sets the user preference for showing the alias namespace on the
XTCEViewer displays in the form of NS::ALIAS, which is generally
recommended if more than one namespace is to be shown.
|
void |
setShowAllAliasNamespacesOption(boolean flag)
Sets the user preference for showing all available Aliases on the
XTCEViewer displays.
|
void |
setShowAllContainerConditionalsOption(boolean flag)
Sets the user preference for showing all available conditions and
their children on containers within the XTCEViewer displays.
|
void |
setUseXIncludeOption(boolean flag)
Sets the user preference for using the XInclude XML feature when
loading a database document.
|
void |
setValidateOnLoadOption(boolean flag)
Sets the user preference for exercising the XSD validation on any
XTCE XML document at time of load.
|
void |
updateExampleFilesList(JMenu exampleItemsMenu)
Method to initialize/update the example databases list from the
internal database package directory included with the toolkit.
|
void |
updateRecentFilesList(JMenu recentItemsMenu,
File dbFile)
Method to add the most recently loaded file to the recent items menu
list, store it in the preferences, and re-sort the menu items.
|
public static XTCEViewerPreferences getInstance()
public boolean getValidateOnLoadOption()
public void setValidateOnLoadOption(boolean flag)
flag - Boolean indicating if the XSD validation should be enabled
on the next document load and for any other document load events until
otherwise changed again by the user.public boolean getShowAliasNamespacesOption()
public void setShowAliasNamespacesOption(boolean flag)
flag - Boolean indicating if the user interface should show the
alias namespaces in the form NS::ALIAS or just the ALIAS name.public boolean getShowAllAliasNamespacesOption()
public void setShowAllAliasNamespacesOption(boolean flag)
flag - Boolean indicating if all aliases of all namespaces will be
displayed on the user interface.public boolean getUseXIncludeOption()
public void setUseXIncludeOption(boolean flag)
flag - boolean indicating if future documents should have the XML
XInclude feature observed.public String getPreferredAliasNamespaceOption()
public void setPreferredAliasNamespaceOption(String ns)
ns - String containing the preferred namespace to show the user on
the user interface.public int getRecentFilesMaxCountOption()
public void setRecentFilesMaxCountOption(int maxNum)
maxNum - Integer value containing the maximum number of files to
store on the recent files loaded list, with the oldest ones being
dropped when the count is exceeded.public boolean getShowAllContainerConditionalsOption()
public void setShowAllContainerConditionalsOption(boolean flag)
flag - Boolean indicating if all conditionals for containers will
be displayed on the user interface.public String getContainerOrientationOption()
public void setContainerOrientationOption(String orientDrawingAs)
orientDrawingAs - String containing either "LEFT_TO_RIGHT" or
"TOP_TO_BOTTOM". Anything else will be no change.public void updateRecentFilesList(JMenu recentItemsMenu, File dbFile)
recentItemsMenu - The JMenu object to update the list with the
latest loaded file.dbFile - The File object of the just loaded XTCE database or null
if the list need not be updated, rather just the menu (such as startup).public void updateExampleFilesList(JMenu exampleItemsMenu)
exampleItemsMenu - JMenu item on the File Menu that contains the
list of example databases.public void clearRecentFilesList(JMenu recentItemsMenu)
recentItemsMenu - The JMenu object to clear the items from.public List<String> getSavedXPathQueries()
public void addSavedXPathQuerySearch(String searchItem)
searchItem - String containing the user text string to add.public void removeSavedXPathQuerySearch(String searchItem)
searchItem - String containing the user text string to remove.public List<String> getRecentFindParameterSearches()
public void addFindParameterSearch(String searchItem)
searchItem - String containing the user text string to add.public List<String> getRecentFindContainerSearches()
public void addFindContainerSearch(String searchItem)
searchItem - String containing the user text string to add.public List<String> getRecentFindTelecommandSearches()
public void addFindTelecommandSearch(String searchItem)
searchItem - String containing the user text string to add.public String getCurrentWorkingDirectory()
public void setCurrentWorkingDirectory(String dirName)
dirName - String containing the last working directory that was
used for a load or save operation.public Locale getLanguagePreference()
public void setLanguagePreference(Locale locale)
locale - containing the language and country preference.public void setParentWindow(XTCEViewer viewerTool)
viewerTool - The XTCEViewer application that instantiated this
preferences object.Copyright © 2015–2019. All rights reserved.