[Gvsig_english] Add extension preferences to gvSig Preferences'sWindow

Jorge Piera piera_jor at gva.es
Wed Apr 4 18:02:44 CEST 2007


Hi Simone,

You can create two layers from the same datasource and you can have a 
look to the gvp file that will be create when you save the project. A 
FLayer is defined by the atributes that you need to create them, but it 
doesn't has identification information.

If is a vectorial layer loaded from a local file, you can obtain the 
file PATH (See the VectorialFileDriver class)

Regards

Simone Casciaroli escribió:
> Many thanks Jaume and Vincente for the response, I would have liked to 
> thank you after adding this capability to my extension but I have some 
> trouble with layer identification and I had no time to implement yours 
> interisting suggestions.
>
> I take advantage of this mail to ask you an advice about layer 
> identification: I am developing an extension that allow a specific 
> Info for cadastral data, I have used a PointBehaviour and I am 
> developing a new listener that control if the active layer is the 
> cadastral one configured by the user. I saw that the FLayer Interface 
> have the getName function but this function return the name of the 
> layer in the TOC, I need a more strong identification information, for 
> example the path on file system of the layer, is there something like 
> this in FLayer hierarchy?
> Thanks in advance for your response
>
> Simone
>
> On 3/30/07, *Vicente Caballero Navarro* < vicente.caballero at iver.es 
> <mailto:vicente.caballero at iver.es>> wrote:
>
>     Hello.
>
>     Also you can implement, in your extension, the interface
>     "com.iver.andami.preferences.IPreferenceExtension" and to return
>     in its
>     method "getPreferencesPage()" your own "PreferencePage" extending
>     AbstractPreferencePage.
>
>     In this way Andami will do the work and will charge your class of
>     preferences.
>
>     Un saludo.
>
>     Vicente Caballero Navarro
>     Grupo desarrollo gvSIG.
>     IVER TI S.A.
>     C/ Salamanca, 50-52
>     46005-Valencia
>     Tlf.+34963163400
>     www.iver.es <http://www.iver.es>
>     www.gvsig.com <http://www.gvsig.com>
>
>     ----- Original Message -----
>     From: "jaume dominguez faus" < jaume.dominguez at iver.es
>     <mailto:jaume.dominguez at iver.es>>
>     To: "Users and Developers mailing list"
>     <gvsig_internacional at runas.cap.gva.es
>     <mailto:gvsig_internacional at runas.cap.gva.es>>
>     Sent: Friday, March 30, 2007 12:10 PM
>     Subject: Re: [Gvsig_english] Add extension preferences to gvSig
>     Preferences'sWindow
>
>
>     > 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
>     <mailto: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)
>     >
>     > _______________________________________________
>     > Gvsig_internacional mailing list
>     > Gvsig_internacional at runas.cap.gva.es
>     <mailto:Gvsig_internacional at runas.cap.gva.es>
>     > http://runas.cap.gva.es/mailman/listinfo/gvsig_internacional
>     >
>     >
>
>
>     _______________________________________________
>     Gvsig_internacional mailing list
>     Gvsig_internacional at runas.cap.gva.es
>     <mailto:Gvsig_internacional at runas.cap.gva.es>
>     http://runas.cap.gva.es/mailman/listinfo/gvsig_internacional
>     <http://runas.cap.gva.es/mailman/listinfo/gvsig_internacional>
>
>
>
>
> -- 
> 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
>   


-- 
Jorge Piera Llodrá
Especialista en Servicios OGC
Equipo de desarrollo gvSIG
IVER TI S.A.
C/ Salamanca, 50-52
46005-Valencia
Tlf.+34963163400
www.iver.es
www.gvsig.com 





More information about the Gvsig_internacional mailing list