[Gvsig_english] Add extension preferences to gvSigPreferences'sWindow

Vicente Caballero Navarro vicente.caballero at iver.es
Wed Apr 4 17:55:51 CEST 2007


Hello.

For you comment, the layer is vectorial of file and you can obtain the path at this way:

FLyrVect lv = (FLyrVect) yourLayer;
VectorialFileDriver vfl = (VectorialFileDriver) lv.getSource();
File file = cfl.getFile();
String path = file.getAbsolutePath();

Un saludo.

Vicente Caballero Navarro
Grupo desarrollo gvSIG.
IVER TI S.A.
C/ Salamanca, 50-52
46005-Valencia
Tlf.+34963163400
www.iver.es
www.gvsig.com

  ----- Original Message ----- 
  From: Simone Casciaroli 
  To: Users and Developers mailing list 
  Sent: Wednesday, April 04, 2007 5:19 PM
  Subject: Re: [Gvsig_english] Add extension preferences to gvSigPreferences'sWindow


  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> 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
    www.gvsig.com

    ----- Original Message -----
    From: "jaume dominguez faus" < jaume.dominguez at iver.es>
    To: "Users and Developers mailing list" 
    <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 
    >>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
    > http://runas.cap.gva.es/mailman/listinfo/gvsig_internacional
    >
    >


    _______________________________________________
    Gvsig_internacional mailing list
    Gvsig_internacional at runas.cap.gva.es
    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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://runas.cap.gva.es/pipermail/gvsig_internacional/attachments/20070404/027c4bde/attachment-0001.htm


More information about the Gvsig_internacional mailing list