Hi Paco,
First of all thanks for your help.
I do not know if you see the class java that I send, but I have a problem.
I have two class DisegnaPoligonoExtension and DisegnaPoligonoPlugIn
DisegnaPoligonoPlugIn extends DrawPolygonTool and implements PlugIn, in the
method install of the class DisegnaPoligonoExtension I must initialize
DisegnaPoligonoPlugIn
private DisegnaPoligonoPlugIn disegnapoligonoPlugIn;
public void install( PlugInContext context ) throws Exception {
if(disegnapoligonoPlugIn == null)
{
disegnapoligonoPlugIn = new DisegnaPoligonoPlugIn(null);
.....
}
I initialize to null is correct? If no which value I can use
When I execute the extension I have the following problem
14/02/2007 12:29:55 ERROR root:197 - Exception in thread "main"
14/02/2007 12:29:55 ERROR root:197 - java.lang.InstantiationException:
org.saig.jump.plugin.DisegnaPoligono.DisegnaPoligonoPlugIn
14/02/2007 12:29:55 ERROR root:197 - at java.lang.Class.newInstance0(Unknown
Source)
14/02/2007 12:29:55 ERROR root:197 - at java.lang.Class.newInstance(Unknown
Source)
14/02/2007 12:29:55 ERROR root:197 - at
com.vividsolutions.jump.workbench.plugin.PlugInManager.loadPlugInClasses(PlugInManager.java:205)
14/02/2007 12:29:55 ERROR root:197 - at
com.vividsolutions.jump.workbench.plugin.PlugInManager.load(PlugInManager.java:125)
14/02/2007 12:29:55 ERROR root:197 - at
com.vividsolutions.jump.workbench.JUMPConfiguration.initializeExternalPlugIns(JUMPConfiguration.java:1560)
14/02/2007 12:29:55 ERROR root:197 - at
com.vividsolutions.jump.workbench.JUMPConfiguration.configure(JUMPConfiguration.java:677)
14/02/2007 12:29:55 ERROR root:197 - at
com.vividsolutions.jump.workbench.JUMPWorkbench.main(JUMPWorkbench.java:369)
-----Messaggio originale-----
Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Per conto di [EMAIL PROTECTED]
Inviato: giovedì 24 aprile 2008 12.16
A: [email protected]
Oggetto: Resumen de Kosmo, Vol 24, Envío 30
Envie los mensajes para la lista Kosmo a
[email protected]
Para subscribirse o anular su subscripción a través de WEB
http://lists.saig.es/mailman/listinfo/kosmo
O por correo electrónico, enviando un mensaje con el texto "help" en
el asunto (subject) o en el cuerpo a:
[EMAIL PROTECTED]
Puede contactar con el responsable de la lista escribiendo a:
[EMAIL PROTECTED]
Si responde a algún contenido de este mensaje, por favor, edite la
linea del asunto (subject) para que el texto sea mas especifico que:
"Re: Contents of Kosmo digest...". Ademas, por favor, incluya en la
respuesta solo aquellas partes del mensaje a las que esta
respondiendo.
Asuntos del día:
1. Re: (no subject) (Paco Abato)
----------------------------------------------------------------------
Message: 1
Date: Thu, 24 Apr 2008 11:32:06 +0200
From: Paco Abato <[EMAIL PROTECTED]>
Subject: Re: [Kosmo] (no subject)
To: Lista de Kosmo <[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Hi, Giovanni,
#execute is the first method called in the plugin. It is used to test
initial state (checking that there is an editable layer, for example).
If execute returns true (indicating the test was satisfied) the plugin
continues executing. Then, the user can draw the poligon and after
finishing drawing the method #gestureFinished is called. Here, into
#gestureFinished (you must override it), you can introduce the
functionality you want (for example, to show a message indicating the
number of vertices of the new polygon).
I can't send you an example now, I'm sorry. Maybe another list user can.
Regards.
Giovanni Virdis escribió:
> Hi, I send you my class that extends DrawPolygonTool.
>
> I want that when I press a button I can draw a new polygon and after I
> want make an others action for example show a message. I use the execute
> method (public boolean execute(PlugInContext context) throws Exception).
> You can send me an example .
>
>
>
> Thanks
>
>
>
> Regards Giovanni
>
>
>
>
> __________ Información de NOD32, revisión 3050 (20080423) __________
>
> Este mensaje ha sido analizado con NOD32 antivirus system
> http://www.nod32.com
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Kosmo mailing list
> [email protected]
> http://lists.saig.es/mailman/listinfo/kosmo
>
>
>
> __________ Información de NOD32, revisión 3050 (20080423) __________
>
> Este mensaje ha sido analizado con NOD32 antivirus system
> http://www.nod32.com
>
------------------------------
_______________________________________________
Kosmo mailing list
[email protected]
http://lists.saig.es/mailman/listinfo/kosmo
Fin de Resumen de Kosmo, Vol 24, Envío 30
*****************************************
_______________________________________________
Kosmo mailing list
[email protected]
http://lists.saig.es/mailman/listinfo/kosmo