Class PreferencesStorage
java.lang.Object
org.jppf.ui.monitoring.charts.config.PreferencesStorage
This class provides an API to store and retrieve the chart configuration
preferences, using the preferences mechanism.
- Author:
- Laurent Cohen
-
Constructor Summary
ConstructorsConstructorDescriptionPreferencesStorage(JPPFChartBuilder chartBuilder) Initialize this preferences storage with a specified chart builder. -
Method Summary
Modifier and TypeMethodDescriptionLoad a chart configuration from a preferences node.voidLoad all chart configurations from the preferences tree, and create the corresponding charts.voidLoad all chart configurations from the preferences tree, and create the corresponding charts.loadTabCharts(Preferences tabNode) Load the chart configurations for a tab from a specified tab preferences node.voidRemove all tabs and charts configurations from the user preferences.voidsaveAll()Save all tabs and charts configurations in the user preferences.voidsaveChartConfiguration(TabConfiguration tab, ChartConfiguration config) Save a specified chart configuration in the preferences tree.voidSave a specified tab configuration in the preferences tree.
-
Constructor Details
-
PreferencesStorage
Initialize this preferences storage with a specified chart builder.- Parameters:
chartBuilder- the chart builder from which to get the charts.
-
-
Method Details
-
loadChartConfigurations
public void loadChartConfigurations()Load all chart configurations from the preferences tree, and create the corresponding charts. -
loadDefaultChartConfigurations
public void loadDefaultChartConfigurations()Load all chart configurations from the preferences tree, and create the corresponding charts. -
loadTabCharts
Load the chart configurations for a tab from a specified tab preferences node.- Parameters:
tabNode- the tab preferences node that contains the chart configuration nodes.- Returns:
- an array of
ChartConfigurationinstances.
-
loadChartConfiguration
Load a chart configuration from a preferences node.- Parameters:
child- the preferences node to load the configuration from.- Returns:
- a
ChartConfigurationinstance.
-
saveAll
public void saveAll()Save all tabs and charts configurations in the user preferences. -
saveTabConfiguration
Save a specified tab configuration in the preferences tree.- Parameters:
tab- the tab to save.
-
saveChartConfiguration
Save a specified chart configuration in the preferences tree.- Parameters:
tab- the tab into which to save the configuration.config- the configuration to save.
-
removeAllSaved
public void removeAllSaved()Remove all tabs and charts configurations from the user preferences.
-