public final class PersonalizeAttributes
extends java.lang.Object
Provides access to the PersonalizeAttributes object, which allows to access the personalization features of Chart FX.
Many users require and demand information on an individual basis. Using personalized charts allows users to change visual attributes and have those settings saved locally. When the user accesses the chart in the future, the saved settings can be automatically loaded so the users can view a chart configured to their personal preferences.
When using the personalized features for Chart FX, the users attribute changes must be saved locally on their computer. The setName
method allows you to create unique or uniform names for your charts so the personalized settings can be loaded or saved.
Constructor and Description |
---|
PersonalizeAttributes() |
Modifier and Type | Method and Description |
---|---|
void |
addPersonalizingListener(PersonalizeListener value)
Adds a PersonalizingListener to the listener list.
|
java.lang.String |
getName()
Allows you to set the personalization name of the chart.
|
PersonalizationStore |
getStore()
Gets or sets the Store location for the personalization.
|
boolean |
isAutoLoad()
Allows you to enable or disable the automatic loading of the chart personalization.
|
boolean |
isAutoSave()
Gets or sets a value indicating to enable or disable the automatic saving of the chart attributes.
|
boolean |
isCanRestore()
Returns True if the original chart can be restored.
|
boolean |
isEnabled()
Allow you to enable the Personalize Attributes.
|
boolean |
isEnableRestore()
Allow you to enable the restoration of the chart.
|
boolean |
load()
Applies any previously saved personalizations to the chart.
|
boolean |
load(java.lang.String name)
Apply any previously saved personalizations to the chart, from a unique name previously saved.
|
void |
removePersonalizingListener(PersonalizeListener value)
Removes a PersonalizingListener from the listener list.
|
void |
resetAutoLoad()
Set the property AutoLoad to its default value.
|
void |
resetAutoSave()
Set the property AutoSave to its default value.
|
void |
resetEnabled()
Set the property Enabled to its default value.
|
void |
resetEnableRestore()
Set the property EnableRestore to its default value.
|
void |
resetFlags()
Set the property Flags to its default value.
|
void |
resetName()
Set the property Name to its default value.
|
void |
resetResetViewState()
Set the property ResetViewState to its default value.
|
void |
resetStore()
Set the property Store to its default value.
|
void |
restoreDefault()
Clears all the transformations made by the end-user and resets the chart to the default personalization settings.
|
boolean |
save()
Saves the personalization settings configured for the chart.
|
boolean |
save(java.lang.String name)
Saves the personalization settings configured for the chart, identified with a unique name, to allow saving multiple personalization versions.
|
void |
setAsDefault()
Sets the current personalization to the default personalization.
|
void |
setAutoLoad(boolean value)
Allows you to enable or disable the automatic loading of the chart personalization.
|
void |
setAutoSave(boolean value)
Gets or sets a value indicating to enable or disable the automatic saving of the chart attributes.
|
void |
setEnabled(boolean value)
Allow you to enable the Personalize Attributes.
|
void |
setEnableRestore(boolean value)
Allow you to enable the restoration of the chart.
|
void |
setName(java.lang.String value)
Allows you to set the personalization name of the chart.
|
void |
setStore(PersonalizationStore value)
Gets or sets the Store location for the personalization.
|
public boolean isAutoLoad()
chart1.getPersonalize().setAutoLoad(true);
resetAutoLoad
public void setAutoLoad(boolean value)
chart1.getPersonalize().setAutoLoad(true);
value
- resetAutoLoad
public boolean isAutoSave()
chart1.getPersonalize().setAutoSave(true);
resetAutoSave
public void setAutoSave(boolean value)
chart1.getPersonalize().setAutoSave(true);
value
- resetAutoSave
public boolean isCanRestore()
boolean bCanRestore; bCanRestore = chart1.getPersonalize().getCanRestore();
public boolean isEnableRestore()
chart1.getPersonalize().setEnableRestore(true);
resetEnableRestore
public void setEnableRestore(boolean value)
chart1.getPersonalize().setEnableRestore(true);
value
- resetEnableRestore
public boolean isEnabled()
Allow you to enable the Personalize Attributes.
The isAutoLoad
method gets or sets a value indicating to enable or disable the automatic loading of the chart personalization. When isAutoLoad
is set to True, the personalized features are automatically loaded when the chart is created.
The isAutoSave
method gets or sets a value indicating to enable or disable the automatic saving of the chart attributes. When isAutoSave
is set to True, the personalized features are automatically saved when the chart is destroyed.
The isCanRestore
method returns True if the original chart can be restored. By default, returns False but it will return True as soon as the end-user modifies any attribute of the chart or a saved chart is loaded.
The isEnableRestore
method allows you to enable restoration of the chart. When the user makes the first visual change to the chart through the UI, the original chart is saved in memory if EnableRestore is set to True.
The setPersonalize
method returns the PersonalizeAttributes object of a chart.
resetEnabled
public void setEnabled(boolean value)
Allow you to enable the Personalize Attributes.
The isAutoLoad
method gets or sets a value indicating to enable or disable the automatic loading of the chart personalization. When isAutoLoad
is set to True, the personalized features are automatically loaded when the chart is created.
The isAutoSave
method gets or sets a value indicating to enable or disable the automatic saving of the chart attributes. When isAutoSave
is set to True, the personalized features are automatically saved when the chart is destroyed.
The isCanRestore
method returns True if the original chart can be restored. By default, returns False but it will return True as soon as the end-user modifies any attribute of the chart or a saved chart is loaded.
The isEnableRestore
method allows you to enable restoration of the chart. When the user makes the first visual change to the chart through the UI, the original chart is saved in memory if EnableRestore is set to True.
The setPersonalize
method returns the PersonalizeAttributes object of a chart.
value
- resetEnabled
public java.lang.String getName()
chart1.getPersonalize().setName("Test1.PieChart"); chart1.getPersonalize().load();
resetName
public void setName(java.lang.String value)
chart1.getPersonalize().setName("Test1.PieChart"); chart1.getPersonalize().load();
value
- resetName
public PersonalizationStore getStore()
Gets or sets the Store location for the personalization.
On a Web Form project, the available options are Cookie and User Profile. User Profile is the option by default.
resetStore
public void setStore(PersonalizationStore value)
Gets or sets the Store location for the personalization.
On a Web Form project, the available options are Cookie and User Profile. User Profile is the option by default.
value
- resetStore
public boolean load()
Applies any previously saved personalizations to the chart.
The load
method returns false if there are no personalization settings saved.
The personalization can be saved using the exportChart
method of the Chart
class.
setFileContents
should be set to Template or BinaryTemplate to save only the personalization.
To load the saved personalizations to the chart:
chart1.getPersonalize().load();
public boolean load(java.lang.String name)
The load
method returns false if there are no personalization settings saved.
The personalization can be saved using the exportChart
method of the Chart
class.
setFileContents
should be set to Template or BinaryTemplate to save only the personalization.
To load the saved personalizations to the chart:
chart1.getPersonalize().load();
name
- Name of the personalization settings that was previously saved to.public void resetAutoLoad()
isAutoLoad
public void resetAutoSave()
isAutoSave
public void resetEnableRestore()
isEnableRestore
public void resetEnabled()
isEnabled
public void resetFlags()
public void resetName()
setName
public void resetResetViewState()
public void resetStore()
setStore
public void restoreDefault()
The setPersonalize
method returns the
The isCanRestore
method returns True if the original chart can be restored. By default, this method returns False but it will return True as soon as the end-user modifies any attribute of the chart or a saved chart is loaded.
The isEnableRestore
method allows you to enable restoration of the chart. When the user makes the first visual change to the chart through the UI, the original chart is saved in memory if
This sample shows how to set the current personalization settings as default settings. If the user changes the visual settings, the default personalization can be brought back:
chart1.getPersonalize().SetAsDefault(); /* Latter in the code, when the settings need to be restored *\/ chart1.getPersonalize().RestoreDefault();
public boolean save()
Saves the personalization settings configured for the chart.
The personalization can be saved using the exportChart
method of the Chart class.
setFileContents
should be set to Template or BinaryTemplate to only save the personalization.
To save the chart personalizations:
chart1.getPersonalize().Save();
public boolean save(java.lang.String name)
The personalization can be saved using the exportChart
method of the Chart class.
setFileContents
should be set to Template or BinaryTemplate to only save the personalization.
To save the chart personalizations:
chart1.getPersonalize().Save();
name
- Name to identify the specific saved personalization settings.public void setAsDefault()
The supported members of the PersonalizeAttributes object allow you to customize the personalization features for the chart. isAutoLoad
, isAutoSave
, isCanRestore
, isEnableRestore
are all supported attributes. Using the setAsDefault
method, developers can configure the current settings as the default settings for that chart.
The setPersonalize
method returns the
To set the current personalization to the default personalization:
chart1.getPersonalize().SetAsDefault();
public void addPersonalizingListener(PersonalizeListener value)
value
- public void removePersonalizingListener(PersonalizeListener value)
value
- 2014 Software FX, Inc. All Rights Reserved. Chart FX is a registered trademark of Software FX, Inc
All other names are trademarks or registered trademarks of their respective owners.