|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.genuine.organizer.AbstractModule net.sf.genuine.preferences.PreferencesModule
The preferences module creates both the preferences service and the preferences dialog that may be used by all applications. In order to use the preferences infrastructure provided by Genuine, an application has to include this module in its application configuration file.
Example (taken from the example application):
<module id="PreferencesModule" class="net.sf.genuine.preferences.PreferencesModule"> <properties> <property key="PreferencesRoot" value="net/sf/genuine/example/crm/"/> <propertyset key="PreferencesPages"> <propertysetvalue value="net.sf.genuine.preferences.general.AppearancePreferencesPage"/> </propertyset> </properties> <menubar> <menu id="edit.menu"> <menuitem id="preferences" separator="infront"/> </menu> </menubar> <services> <service interface="net.sf.genuine.preferences.PreferencesService"/> </services> <visualcomponents> <visualcomponent id="preferences.component" modal="true"> <size width="600" height="400"/> </visualcomponent> </visualcomponents> </module>
Both of the two properties shown in the example are mandatory:
PreferencesRoot
: A path to the
Preferences
node that is the root preferences node
for the application (see PreferencesService.getPreferences(String)
).PreferencesPages
: A property set that has to contain the fully
expanded class names of all preferences pages that should be shown on
the preferences dialog. All classes given have to inherit from the abstract class
PreferencesPage
Genuine uses the default preferences storage mechanism of the Java plattform.
In order to use a different preference storage mechanism, you need to set up
this mechanism in your own application. You may create a sub class of this
module in which you may set it up before you call the initialize
method of this module.
PreferencesService
,
PreferencesPage
Constructor Summary | |
PreferencesModule()
|
Method Summary | |
VisualComponent |
createVisualComponent(java.lang.String componentId,
java.lang.String instanceId)
Creates the preferences component. |
void |
initialize(java.lang.String moduleId,
ModuleManager moduleManager,
java.util.Map properties)
Initializes both the service and the dialog. |
Methods inherited from class net.sf.genuine.organizer.AbstractModule |
getAction, getComponentManager, getHelperService, getId, getMessageBus, getModuleManager, getProperty, getService, getServiceBroker, postInitialize, registerAction, registerService |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PreferencesModule()
Method Detail |
public void initialize(java.lang.String moduleId, ModuleManager moduleManager, java.util.Map properties) throws ConfigurationException
initialize
in interface Module
initialize
in class AbstractModule
ConfigurationException
public VisualComponent createVisualComponent(java.lang.String componentId, java.lang.String instanceId) throws ConfigurationException
createVisualComponent
in interface Module
createVisualComponent
in class AbstractModule
ConfigurationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |