[JPP-Devel] question...

2008-12-03 Thread Nils Kuhn
Hello,
I don't know whether this the right place to get some answers but I have 
a question on the source of openJUMP and didn't found a clear, well 
arranged developer-forum.

I am developing a small information system based on openJUMP. I do some 
manipulations on the core-source of openJUMP and the main functionality 
of the system is implemented as an Extension with ToolboxPlugIns, 
PlugIns and CursorTools.

My simple question:
Could you give me a code-example for changing the activated cursor tool 
(e.g. activating the Pan-CursorTool) and for executing a PlugIn from the 
openJUMP-main menu or from the toolbar. My starting ppoint is just a 
WorkbenchContext.

Please give me a hint, thanks a lot,
Nils

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


[JPP-Devel] Custom draw tools

2008-12-03 Thread Larry Becker
Based on input from Jukka, I have agreed to work on a function that will
allow the user to define a custom draw tool.  The basic use case for this
tool is to make it easier to enter special features while in the field.  I
think the example he gave was entering the location of trees, utility poles,
 etc. while stream digitizing some other feature like a road using GPS.
What this seems to require is a function on the Customize menu that will put
up a dialog that will allow the user to specify custom draw tools to be
added to the toolbox.  It could include options for geometry type, default
layer, default attribute (name, type, and value), and others to be defined.
I have already modified the LineString tool to allow continuation of
interrupted digitizing sessions, so this function should make it possible.

I have the basic code to do this already used by the Jython toolbox
(attached).  I just need to create the customization dialog and some glue
code.  Before I get started, I thought I would through it open for
suggestions.  Additional use cases would be helpful.

Of course, I expect that a simple example tool would help with this process.
Here is a (Jython) example of how the code is currently used to create a two
point line tool:

lineTool = DrawCustomTool(featureDrawingUtil, maxClicks = 2, toolName =
Line Tool, geometryType = linestring)
toolbox.add(featureDrawingUtil.prepare(lineTool, 1))

To make more complex custom tools, Jython code is needed.  However,
BeanShell script could be used just as well.

regards,
Larry
-- 
http://amusingprogrammer.blogspot.com/


DrawCustomTool.java
Description: Binary data
-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


Re: [JPP-Devel] question...

2008-12-03 Thread Stefan Steiniger
Hei Nils,

this is the right list to ask these questions.

Unfortunately, for me, it is not clear what you are trying to do - so no 
simple question... can you specify?

However, we have methods to add tools/plugins to the toolbox (see class 
OpenJumpConfiguration.java for examples) and to the main toolbar (see 
JumpConfiguration.java). In general plugins add themselves to the menus, 
toolbar, toolbox - depending on the order of call.

Adding a new toolbox for your own functions is possible too (I do that 
for my work, the only problem is that one can not add threaded plugins) 
- I could send some code on that on request.

in general a few hints can be found on the OJ wiki too: 
http://openjump.org/wiki/show/Documentation
(scroll down to documentation for developers)

hope some of these infos help

cheers,
Stefan

Nils Kuhn wrote:
 Hello,
 I don't know whether this the right place to get some answers but I have 
 a question on the source of openJUMP and didn't found a clear, well 
 arranged developer-forum.
 
 I am developing a small information system based on openJUMP. I do some 
 manipulations on the core-source of openJUMP and the main functionality 
 of the system is implemented as an Extension with ToolboxPlugIns, 
 PlugIns and CursorTools.
 
 My simple question:
 Could you give me a code-example for changing the activated cursor tool 
 (e.g. activating the Pan-CursorTool) and for executing a PlugIn from the 
 openJUMP-main menu or from the toolbar. My starting ppoint is just a 
 WorkbenchContext.
 
 Please give me a hint, thanks a lot,
 Nils
 
 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
 Build the coolest Linux based applications with Moblin SDK  win great prizes
 Grand prize is a trip for two to an Open Source event anywhere in the world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 Jump-pilot-devel mailing list
 Jump-pilot-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
 
 

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


[JPP-Devel] R: [Fwd: [jump-pilot - Problems with PlugIns] RE: Problems getting Oracle Connection]

2008-12-03 Thread Stefan Steiniger
keeps going - but I like the thread (sadly for Paolo)

 Original Message 
Subject:[jump-pilot - Problems with PlugIns] RE: Problems getting 
Oracle Connection
Date:   Wed, 03 Dec 2008 13:45:08 +
From:   SourceForge.net [EMAIL PROTECTED]
To: [EMAIL PROTECTED]



Read and respond to this message at: 
https://sourceforge.net/forum/message.php?msg_id=5752065
By: simonecampora

Hi! Well, I hope to be more helpful for the development of this plugin!

I tried to look at the source but I don't know how to solve it, however I know
where the problem is.

I tried to run the same query on Oracle 10g and obviously it didn't work.

the query is something like:

select SDO_TUNE.EXTENT_OF('SCHEMA.MYTABLE','MYUSERNAME') from dual t;

the problem is that on Oracle the same query is working when i use the synthax

select SDO_TUNE.EXTENT_OF('MYTABLE','MYUSERNAME') from dual t;

do you know how to modify that query on your plugin code? I've just seen 
something
like

---SISDBSMetadata.java-
  public Envelope getExtents( String datasetName, String attributeName )
  {
//use geometry(extent()) to make sure a geometry is 
returned, not a BOX
CommandBuilder builder = new CommandBuilder(conn.getData());
//builder.appendLine(SELECT 
geometry(extent(${specifiedgeom})));

//to support all different adapters, let them specify the table 
to act upon,
//because some of them will want to use something like SELECT 
xxx FROM DUAL
//instead of SELECT xxx FROM some_table
//builder.appendLine(SELECT ${EXTENT} FROM ${st} t);
builder.appendLine(SELECT ${EXTENT} FROM ${EXTENT_TABLE} t);

and I imagine I should modify the ${EXTENT} string but I don't know how.

thanks for the help

__
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit: 
https://sourceforge.net/forum/unmonitor.php?forum_id=729480



-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


[JPP-Devel] R: R: [Fwd: [jump-pilot - Problems with PlugIns] RE: Problems getting Oracle Connection]

2008-12-03 Thread P . Rizzi Ag . Mobilità Ambiente
Well, kind of funny anyway... :-)

I can't understand why you wrote:
select SDO_TUNE.EXTENT_OF('SCHEMA.MYTABLE','MYUSERNAME') from dual t;

it's the 'MYUSERNAME' part that makes me wonder...
The syntax is supposed to be:
SDO_TUNE.EXTENT_OF(
 table_name IN VARCHAR2,
 column_name IN VARCHAR2
 ) RETURN SDO_GEOMETRY;

so that parameter shuould be the geometric column name.
The one you chose in the Add datastore Layer dialog.

I tried using my Oracle server and it worked with this syntax:
SELECT SDO_TUNE.EXTENT_OF('INTERSCAMBIO.SIS_ELEMENTO_STRADALE','GEOM') FROM 
DUAL t

As you can see the first parameter is the schema-qualified table name
and the second is the geometric column name. The schema name INTERSCAMBIO
is the default schema for the logged-in user INTERSCAMBIO, and gets
automatically used when you use that famous '-' dash.
Alas, in the Add datastore Layer dialog you are not forced to choose
only one of the listed table names, you can write it by yourself and you
can do it using a schema-qualified name (SCHEMA.TABLE) or omitting the
schema (TABLE). Try playing with that also.
I don't know, maybe there's a difference in the schemas structures
between my server and yours...
Or is the column name that's wrong...

If you want to modify the source code you can try with:
builder.appendLine(SELECT SDO_TUNE.EXTENT_OF('${t_nq}','${EXTENT_GEOM_nq}') 
FROM ${EXTENT_TABLE} t);

but it may do more harm than heal...
The difference should just be in that '${t_nq}' that gets only the table name,
instead of the original '${st_nq}' that gets schema.table.
Good luck!!!

Bye
Paolo


P.S: If you modify the source like that it'll stoop working for PostGIS, 
obviously...


 -Messaggio originale-
 Da: Stefan Steiniger [mailto:[EMAIL PROTECTED]
 Inviato: mercoledì 3 dicembre 2008 18.59
 A: List for discussion of JPP development and use.
 Oggetto: [JPP-Devel] R: [Fwd: [jump-pilot - Problems with PlugIns] RE:
 Problems getting Oracle Connection]
 
 
 keeps going - but I like the thread (sadly for Paolo)
 
  Original Message 
 Subject:  [jump-pilot - Problems with PlugIns] RE: 
 Problems getting 
 Oracle Connection
 Date: Wed, 03 Dec 2008 13:45:08 +
 From: SourceForge.net [EMAIL PROTECTED]
 To:   [EMAIL PROTECTED]
 
 
 
 Read and respond to this message at: 
 https://sourceforge.net/forum/message.php?msg_id=5752065
 By: simonecampora
 
 Hi! Well, I hope to be more helpful for the development of 
 this plugin!
 
 I tried to look at the source but I don't know how to solve 
 it, however I know
 where the problem is.
 
 I tried to run the same query on Oracle 10g and obviously it 
 didn't work.
 
 the query is something like:
 
 select SDO_TUNE.EXTENT_OF('SCHEMA.MYTABLE','MYUSERNAME') from dual t;
 
 the problem is that on Oracle the same query is working when 
 i use the synthax
 
 select SDO_TUNE.EXTENT_OF('MYTABLE','MYUSERNAME') from dual t;
 
 do you know how to modify that query on your plugin code? 
 I've just seen something
 like
 
 ---SISDBSMetadata.java-
   public Envelope getExtents( String datasetName, String 
 attributeName )
   {
   //use geometry(extent()) to make sure a 
 geometry is returned, not a BOX
   CommandBuilder builder = new 
 CommandBuilder(conn.getData());
   //builder.appendLine(SELECT 
 geometry(extent(${specifiedgeom})));
   
   //to support all different adapters, let them 
 specify the table to act upon,
   //because some of them will want to use 
 something like SELECT xxx FROM DUAL
   //instead of SELECT xxx FROM some_table
   //builder.appendLine(SELECT ${EXTENT} FROM ${st} t);
   builder.appendLine(SELECT ${EXTENT} FROM 
 ${EXTENT_TABLE} t);
 
 and I imagine I should modify the ${EXTENT} string but I 
 don't know how.
 
 thanks for the help
 
 __
 You are receiving this email because you elected to monitor 
 this forum.
 To stop monitoring this forum, login to SourceForge.net and visit: 
 https://sourceforge.net/forum/unmonitor.php?forum_id=729480
 
 
 
 --
 ---
 This SF.Net email is sponsored by the Moblin Your Move 
 Developer's challenge
 Build the coolest Linux based applications with Moblin SDK  
 win great prizes
 Grand prize is a trip for two to an Open Source event 
 anywhere in the world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 Jump-pilot-devel mailing list
 Jump-pilot-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
 

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a 

[JPP-Devel] R: R: [Fwd: [jump-pilot - Problems with PlugIns] RE: Problems getting Oracle Connection]

2008-12-03 Thread Stefan Steiniger

 Original Message 
Subject:[jump-pilot - Problems with PlugIns] RE: Problems getting 
Oracle Connection
Date:   Wed, 03 Dec 2008 19:02:18 +
From:   SourceForge.net [EMAIL PROTECTED]
To: [EMAIL PROTECTED]



Read and respond to this message at: 
https://sourceforge.net/forum/message.php?msg_id=5753244
By: simonecampora

Oh I'm really sorry! 

I was citing the code by heart... actually my synthax is exactly like yours
the second parameter is the geometry column ( incidently it's the same as the
schema name in my case)

anyway I still don't know why in my case it is not working while I'm specifying
the SCHEMA.TABLE but it works when I use just the TABLE.

are you using the - or   in the schema parameter?

how many shcemas do you have in your database?

are you using which version of Oracle?

mine is Oracle 10g Entreprise Edition

I will try doing that small modification on the code just to see if it's really
the problem raised or if there's something more behind...

thanks you so much for your precisations :) they are really precious!

Simone

__
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit: 
https://sourceforge.net/forum/unmonitor.php?forum_id=729480



-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


Re: [JPP-Devel] question...

2008-12-03 Thread Larry Becker
Hi Nils,

  To get the toolbox you can do:

ToolboxDialog toolbox = ((EditingPlugIn)
context.getWorkbenchContext().getBlackboard().get(EditingPlugIn.KEY)).getToolbox(context.getWorkbenchContext());

I'm not sure what you are going to do after that. It is pretty unusual to
change the selected tool.

Perhaps: (where CursorToolClass is the class of the tool you want to
select).

toolbox.getButton(CursorToolClass).setSelected();


regards,
Larry


On Wed, Dec 3, 2008 at 11:56 AM, Stefan Steiniger [EMAIL PROTECTED] wrote:

 Hei Nils,

 this is the right list to ask these questions.

 Unfortunately, for me, it is not clear what you are trying to do - so no
 simple question... can you specify?

 However, we have methods to add tools/plugins to the toolbox (see class
 OpenJumpConfiguration.java for examples) and to the main toolbar (see
 JumpConfiguration.java). In general plugins add themselves to the menus,
 toolbar, toolbox - depending on the order of call.

 Adding a new toolbox for your own functions is possible too (I do that
 for my work, the only problem is that one can not add threaded plugins)
 - I could send some code on that on request.

 in general a few hints can be found on the OJ wiki too:
 http://openjump.org/wiki/show/Documentation
 (scroll down to documentation for developers)

 hope some of these infos help

 cheers,
 Stefan

 Nils Kuhn wrote:
  Hello,
  I don't know whether this the right place to get some answers but I have
  a question on the source of openJUMP and didn't found a clear, well
  arranged developer-forum.
 
  I am developing a small information system based on openJUMP. I do some
  manipulations on the core-source of openJUMP and the main functionality
  of the system is implemented as an Extension with ToolboxPlugIns,
  PlugIns and CursorTools.
 
  My simple question:
  Could you give me a code-example for changing the activated cursor tool
  (e.g. activating the Pan-CursorTool) and for executing a PlugIn from the
  openJUMP-main menu or from the toolbar. My starting ppoint is just a
  WorkbenchContext.
 
  Please give me a hint, thanks a lot,
  Nils
 
  -
  This SF.Net email is sponsored by the Moblin Your Move Developer's
 challenge
  Build the coolest Linux based applications with Moblin SDK  win great
 prizes
  Grand prize is a trip for two to an Open Source event anywhere in the
 world
  http://moblin-contest.org/redirect.php?banner_id=100url=/
  ___
  Jump-pilot-devel mailing list
  Jump-pilot-devel@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
 
 

 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's
 challenge
 Build the coolest Linux based applications with Moblin SDK  win great
 prizes
 Grand prize is a trip for two to an Open Source event anywhere in the world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 Jump-pilot-devel mailing list
 Jump-pilot-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel




-- 
http://amusingprogrammer.blogspot.com/
-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


[JPP-Devel] R: R: R: [Fwd: [jump-pilot - Problems with PlugIns] RE: Problems getting Oracle Connection]

2008-12-03 Thread P . Rizzi Ag . Mobilità Ambiente
I tryies using the '-' so I got access to the default schema for the 
logged-in user.
Maybe it's this the culprit, something in how your server/database/schena/user, 
etc. are configured...???
Try with this SQL from any Oracle client:
   select sys_context( 'userenv', 'current_schema' ) from dual
 
It should return the current default schema for the logged-in user.
If it's different from the one you see in the EXTENT_OF() call, then that may 
be the problem.
Then you can manually try the EXTENT_OF() using 'SCHEMA.TABLE' with this 
schema, if it's different.
 
I don't know if the EXTENT_OF() needs an entry for the table you want the 
extent of inside the
user_sdo_geom_metadata table, but check it's presence.
And also check if it's listed there with just the TABLE_NAME or the SCHEMA_NAME 
also.
 
I'm not the owner of the Oracles I connect to, so I'm sure about the version, 
but I think it's
the same of yours 10g and it contains a few schemas (one for each user, that's 
the way Oracle works, I think)...
 
Now, and up to Friday, I have no access to the server, so I can't make any 
other check.
 
Bye
Paolo Rizzi



Da: Stefan Steiniger [mailto:[EMAIL PROTECTED]
Inviato: mer 03/12/2008 20.22
A: List for discussion of JPP development and use.
Oggetto: [JPP-Devel] R: R: [Fwd: [jump-pilot - Problems with PlugIns] RE: 
Problems getting Oracle Connection]




 Original Message 
Subject:[jump-pilot - Problems with PlugIns] RE: Problems getting
Oracle Connection
Date:   Wed, 03 Dec 2008 19:02:18 +
From:   SourceForge.net [EMAIL PROTECTED]
To: [EMAIL PROTECTED]



Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=5753244
By: simonecampora

Oh I'm really sorry!

I was citing the code by heart... actually my synthax is exactly like yours
the second parameter is the geometry column ( incidently it's the same as the
schema name in my case)

anyway I still don't know why in my case it is not working while I'm specifying
the SCHEMA.TABLE but it works when I use just the TABLE.

are you using the - or   in the schema parameter?

how many shcemas do you have in your database?

are you using which version of Oracle?

mine is Oracle 10g Entreprise Edition

I will try doing that small modification on the code just to see if it's really
the problem raised or if there's something more behind...

thanks you so much for your precisations :) they are really precious!

Simone

__
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=729480



-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel