[Gvsig_english] Add extension preferences to gvSig Preferences's
Window
jaume dominguez faus
jaume.dominguez at iver.es
Fri Mar 30 12:10:51 CEST 2007
Sure, Simone.
A Preference page is added as you can see in the
com.iver.core.PreferencesExtension class (located in the project
libCorePlugin)
You don't need to change this file. Just replicate its behavior in your
extension class.
1) Write your preference's page class extending AbstractPreferencePage.
I suggest you to spend a little bit reading its javadoc. You can also
have a look to other PreferencePage already implemented.
2) add your preference page as an extension point as follows
this.extensionPoints.add("AplicationPreferences","the name you will
use", new YourPreferencePageClass());
3) now your class is loaded in the system an can be used. Thus, let's
add it to the preferences dialog
DlgPreferences dlgPreferences=PluginServices.getDlgPreferences();
dlgPreferences.refreshExtensionPoints(); // what a bad name,
huh? i'd prefer "refreshPageEntries();" or something like that
Ciao, and good luck
Salut!
En/na Simone Casciaroli ha escrit:
> Hi list,
> I began to develop some extension to gvSig but I am not yet practical
> with extension mechanism.
> I would like to know if it's possible to create a new section of
> gvSIG's Preferences's window to allow the user to customise the
> configuration option of an extension.
> I hope it's possible to create this "customisation" without modify the
> gvSIG core program library but using extension mechanism.
> Waiting for your response I thank you for your work.
>
> --
> Simone Casciaroli
> Core Soluzioni Informatiche S.r.l.
> http://www.corenet.it
> Via Calzolerie, 2 - 40125 BOLOGNA - ITALY
> tel. +39.051.278969
> fax. +39.051.270806
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Gvsig_internacional mailing list
>Gvsig_internacional at runas.cap.gva.es
>http://runas.cap.gva.es/mailman/listinfo/gvsig_internacional
>
>
--
Jaume Dominguez Faus
Àrea de Software Lliure
Equip gvSIG
Iver TI
C. Salamanca, 52
46005 València
Telf: 902 25 25 40 Fax: 96 316 27 16
(Spain)
More information about the Gvsig_internacional
mailing list