|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.skeleton.commands.PreferenceHelper
Some utility methods for setting the preferences. They are needed twice:
| Constructor Summary | |
PreferenceHelper(ApplicationFrame frame)
Constructor specifying the SwingGraphFrame. |
|
| Method Summary | |
void |
applyGridSettings()
Applies the settings given by the preferences to the CompositeViewGrid object of the CompositeView. |
void |
applyGridSettings(GraphDocument document)
Applies the grid settings of the preferences to the CompositeViewGrid object of the CompositeView
of the given Document. |
void |
applyRulerSettings()
Applies the settings given by the preferences to the CompositeViewRuler object of views. |
void |
applyRulerSettings(GraphDocument document)
Applies the Ruler Settings to the given document. |
void |
changeNavigatorPanelRendererAttribute(java.lang.String name,
boolean value)
Sets an attribute on the AttributeSet that
is returned by the NavigatorPanel class
statically and which can be used to adjust the
RendererConfigurationC that is used by all
NavigatorPanels. |
void |
changeSwingGraphPanelRendererAttribute(java.lang.String name,
boolean value)
Sets an attribute on the AttributeSet that
is returned by the SwingGraphPanel class
statically and which can be used to adjust the
RendererConfigurationC that is used by all
SwingGraphPanels during user-interaction. |
java.io.File |
getCurrentDirectory()
Returns the current directory of this application. |
void |
initCurrentDirectory()
Initializes the currently used directory. |
void |
initFrameSizeAndPosition()
Initializes the size and the position of the top level frame to the values found in the preferences. |
void |
initToolbarVisibilties()
Called at Application start to initialize the visibilities of the Toolbar. |
void |
setCurrentDirectory(java.io.File directory)
Sets the currently used directory. |
void |
setLanguage(java.lang.String value)
Sets the used language to the one specified by value. |
void |
setLookAndFeel(java.lang.String laf)
Sets the look and feel to the one specified by value. |
void |
setSubMenuRecentlyUsed(SwingMenu menu)
Sets the Sub-Menu for the recenlty used files to the given SwingMenu. |
void |
setTooltipsEnabled(boolean b)
Enables the tooltips if b is true. |
void |
updateRecentlyUsedFilesMenu(ApplicationFrame applicationFrame)
Updates the menu of recently used files. |
void |
updateRecentlyUsedFilesMenu(ApplicationFrame applicationFrame,
java.io.File newestFile)
Updates the menu of recently used files and moves the given file to the top of the list. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PreferenceHelper(ApplicationFrame frame)
SwingGraphFrame.
frame - the SwingGraphFrame of the application.| Method Detail |
public void setLanguage(java.lang.String value)
value.
setLanguage in interface PreferenceHelpvalue - a string defining the language to be used.public void setLookAndFeel(java.lang.String laf)
value.
setLookAndFeel in interface PreferenceHelplaf - a string defining the look and feel to be used.public void setTooltipsEnabled(boolean b)
true.
setTooltipsEnabled in interface PreferenceHelpb - true, if tooltips should be displayed.
public void updateRecentlyUsedFilesMenu(ApplicationFrame applicationFrame,
java.io.File newestFile)
applicationFrame - the ApplicationFrame.newestFile - the file to move to the top of the listpublic void updateRecentlyUsedFilesMenu(ApplicationFrame applicationFrame)
applicationFrame - the ApplicationFrame.public java.io.File getCurrentDirectory()
getCurrentDirectory in interface PreferenceHelppublic void setCurrentDirectory(java.io.File directory)
setCurrentDirectory in interface PreferenceHelpdirectory - the directory to set.public void setSubMenuRecentlyUsed(SwingMenu menu)
SwingMenu.
menu - the SwingMenu to set.public void initFrameSizeAndPosition()
initFrameSizeAndPosition in interface PreferenceHelppublic void initCurrentDirectory()
initCurrentDirectory in interface PreferenceHelp
public void changeSwingGraphPanelRendererAttribute(java.lang.String name,
boolean value)
AttributeSet that
is returned by the SwingGraphPanel class
statically and which can be used to adjust the
RendererConfigurationC that is used by all
SwingGraphPanels during user-interaction.
name - of the renderer-configuration item to change.value - boolean-value to change the renderer-configuration item to.
public void changeNavigatorPanelRendererAttribute(java.lang.String name,
boolean value)
AttributeSet that
is returned by the NavigatorPanel class
statically and which can be used to adjust the
RendererConfigurationC that is used by all
NavigatorPanels.
name - of the renderer-configuration item to change.value - boolean-value to change the renderer-configuration item to.public void applyRulerSettings(GraphDocument document)
applyRulerSettings in interface PreferenceHelpdocument - the document to apply the new ruler settings to.public void applyRulerSettings()
CompositeViewRuler object of views.
applyRulerSettings in interface PreferenceHelppublic void applyGridSettings(GraphDocument document)
CompositeViewGrid object of the CompositeView
of the given Document.
applyGridSettings in interface PreferenceHelpdocument - the GraphDocument containing the grid to
configure.public void applyGridSettings()
CompositeViewGrid object of the CompositeView.
applyGridSettings in interface PreferenceHelppublic void initToolbarVisibilties()
initToolbarVisibilties in interface PreferenceHelp
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||