I have a basic reverse linestring beanshell script. It works on one
selected linstring. No error checking is implemented yet.
{
import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.GeometryFactory;
import com.vividsolutions.jump.util.CoordinateArrays;
firstLayer =
wc.layerViewPanel.selectionManager.layersWithSelectedItems.iterator
().next();
firstFeature =
wc.layerViewPanel.selectionManager.getFeaturesWithSelectedItems
(firstLayer).iterator().next();
Coordinate[] a = firstFeature.getGeometry().getCoordinates();
CoordinateArrays.reverse(a);
firstFeature.setGeometry(CoordinateArrays.toLineOrPoint(a, new
GeometryFactory()));
wc.layerViewPanel.repaint();
}
regards,
Larry
On 1/29/07, Larry Becker <[EMAIL PROTECTED]> wrote:
Hi Michaël,
That's interesting. I didn't know the arrow navigation trick. Is that
an OpenJUMP PlugIn? It doesn't seem to work in JUMP or SkyJUMP.
I knew about the Delete key shortcut. What I haven't found is any
shortcuts for menu items. I wonder why?
thanks,
Larry
On 1/29/07, Michaël Michaud <[EMAIL PROTECTED]> wrote:
>
> Hi Larry,
>
> There are some shortcuts defined in JUMP menu just above the help
> command (OpenJUMP).
> There are probably also other default shortcuts (typing on arrows makes
> the map moving for example).
>
> I thought about shortcuts, because I just discovered that in jEdit,
> where you can define macros (ie beanshell scripts) exactly as you did in
> jump, you can also define shortcuts, in a uniform way, for every jEdit
> commands, including user-defined macro.
>
> Michaël
>
> Larry Becker a écrit :
>
> > Thanks Michaël,
> >
> > I like your idea about the keyboard shortcuts. Come to think of it,
> > I don't recall ever seeing any JUMP standard Control-key shortcuts at
> > all. I wonder if there is some kind of issue there?
> >
> > Oh well, I suppose you can always fall back on typing Alt-T B
> whatever.
> >
> > regards,
> > Larry
> >
> > On 1/29/07, *Michaël Michaud* < [EMAIL PROTECTED]
> > <mailto:[EMAIL PROTECTED]>> wrote:
> >
> > Great tool Larry !
> >
> > Beanshell is my favorite tool and I can appreciate how you
> > transformed
> > it into a production tool for jump with a single 150 lines java
> > plugin !
> > As you say, beanshell has the capabilities of full java, and
> > that's what
> > makes it even more powerfull than MapBasic or Avenue !
> > Every body like powerfull tools and hate too complex ones.
> > BeanTool is
> > really as simple as powerfull.
> >
> > For a script like "reverse linestring", it should be even easier
> > to use
> > if one could associate a keyboard shortcut to the bsh-command,
> what
> > could be developped as a separate plugin if anyone is interested.
> >
> > Thanx
> >
> > Michaël
> >
> > Larry Becker a écrit :
> >
> > > Hey Pedro,
> > >
> > > A BeanTool is not some kind of kludgey script. It has the
> same
> > > capabilities as full Java. A BeanTool is just a simple way of
> > giving
> > > the user control of their extensible tool set. In the case of
> > > reversing linestinrgs, there doesn't seem to be much of a need
> for a
> > > complicated interface so it is a particularly good fit. I'm
> > sure that
> > > everyone thinks their favorite tool should be at the top of the
> menu
> > > or toolbox, but the reality is that everyone used GIS and CAD
> tools
> > > differently. I'm advocating BeanTools as a simple way to add
> the
> > > tools you need without wading though the ones you don't
> > >
> > > regards,
> > > Larry
> > >
> > > On 1/29/07, *Pedro Doria Meunier* < [EMAIL PROTECTED]
> > <mailto:[EMAIL PROTECTED]>
> > > <mailto:[EMAIL PROTECTED] <mailto: [EMAIL PROTECTED]>>>
> > wrote:
> > >
> > > Hey Larry,
> > >
> > >
> > >
> > > Appending a bit to the last email...
> > >
> > > You mean 'an ideal candidate for a Beanshell tool' on a
> > debugging
> > > phase or permanently?
> > >
> > > I say this because this is, I suppose, a much sought for
> > tool… ;-)
> > >
> > > IMHO its ideal place should be under the 'Edit' menu.
> > >
> > >
> > >
> > > BR,
> > >
> > > Pedro
> > >
> > >
> > >
> > > *From:* [EMAIL PROTECTED]
> > <mailto: [EMAIL PROTECTED]>
> > > <mailto: [EMAIL PROTECTED]
> > <mailto: [EMAIL PROTECTED]>>
> > > [mailto:[EMAIL PROTECTED]
> > <mailto:[EMAIL PROTECTED]>
> > > <mailto: [EMAIL PROTECTED]
> > <mailto:[EMAIL PROTECTED]>>] *On
> > > Behalf Of *Larry Becker
> > > *Sent:* segunda-feira, 29 de Janeiro de 2007 15:12
> > > *To:* List for discussion of JPP development and use.
> > > *Subject:* Re: [JPP-Devel] Direction of line segments
> > >
> > >
> > >
> > > Hi Pedro,
> > >
> > > To me, a simple specialized tool like "Reverse Linestring"
> > is an
> > > ideal candidate for a Beanshell tool. Unfortunately,
> > pasting the
> > > Beanshell code into the console gets old fast when you are
> doing
> > > it a lot. SkyJUMP has a small innovation that other
> developers
> > > might want to consider adopting. It is a BeanTools folder
> in
> > > lib/ext. The BeanToolsPlugIn takes care of reading the
> > directory
> > > of the BeanTools folder and putting a entry on the
> heirarchical
> > > Tools->Bean Tools menu for each .bsh file found.
> > >
> > > regards,
> > > Larry
> > >
> > >
> > > On 1/28/07, *Pedro Doria Meunier* <[EMAIL PROTECTED]
> > <mailto:[EMAIL PROTECTED]>
> > > <mailto:[EMAIL PROTECTED]
> > <mailto: [EMAIL PROTECTED]>>> wrote:
> > >
> > > Hi guys,
> > >
> > >
> > >
> > > Back to some old topic, already discussed but never fully
> > answered…
> > >
> > >
> > >
> > > Changing direction of the line segments in Jump/OpenJump.
> > >
> > > Most of the time line segments are digitized regardless of
> their
> > > 'true' direction in the real word…
> > >
> > > It'd be extremely useful if a plugin were to be developed
> that
> > > allowed to change the line segment direction…
> > >
> > > I know that there's already 'Edit Select Side' but that
> doesn't
> > > quite cut it…
> > >
> > >
> > >
> > > There real question here is:
> > >
> > > Is there someone doing something on the matter?
> > >
> > >
> > >
> > > BR,
> > >
> > > Pedro Doria Meunier
> > >
> > >
> > >
> >
> -------------------------------------------------------------------------
> > > Take Surveys. Earn Cash. Influence the Future of IT
> > > Join SourceForge.net's Techsay panel and you'll get the
> > chance to
> > > share your
> > > opinions on IT & business topics through brief surveys - and
> > earn cash
> > >
> >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> >
<http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> >
> > >
> >
<http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
> > <
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> >>
> > >
> > > _______________________________________________
> > > Jump-pilot-devel mailing list
> > > Jump-pilot-devel@lists.sourceforge.net
> > <mailto:Jump-pilot-devel@lists.sourceforge.net>
> > > <mailto: Jump-pilot-devel@lists.sourceforge.net
> > <mailto:Jump-pilot-devel@lists.sourceforge.net>>
> > >
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
> > > < https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
> >
> > >
> > >
> > >
> > >
> > >
> >
> -------------------------------------------------------------------------
> > > Take Surveys. Earn Cash. Influence the Future of IT
> > > Join SourceForge.net's Techsay panel and you'll get the
> > chance to
> > > share your
> > > opinions on IT & business topics through brief surveys - and
>
> > earn cash
> > >
> >
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
> > <
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> >
> > >
> > <
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> >
<http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> >>
> > >
> > > _______________________________________________
> > > Jump-pilot-devel mailing list
> > > Jump-pilot-devel@lists.sourceforge.net
> > <mailto:Jump-pilot-devel@lists.sourceforge.net >
> > > <mailto:Jump-pilot-devel@lists.sourceforge.net
> > <mailto:Jump-pilot-devel@lists.sourceforge.net >>
> > >
> > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
> > < https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel>
> > > <https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
> >
> > >
> > >
> > >
> >
> >------------------------------------------------------------------------
> >
> > >
> >
> >-------------------------------------------------------------------------
> > >Take Surveys. Earn Cash. Influence the Future of IT
> > >Join SourceForge.net's Techsay panel and you'll get the chance to
> > share your
> > >opinions on IT & business topics through brief surveys - and earn
>
> > cash
> > >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > <
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> >
> > >
> >
> >------------------------------------------------------------------------
> > >
> > >_______________________________________________
> > >Jump-pilot-devel mailing list
> > > Jump-pilot-devel@lists.sourceforge.net
> > <mailto:Jump-pilot-devel@lists.sourceforge.net>
> > >https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
> > >
> > >
> >
> >
> >
> -------------------------------------------------------------------------
> >
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to
> > share your
> > opinions on IT & business topics through brief surveys - and earn
> > cash
> >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> >
<http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> >
> > _______________________________________________
> > Jump-pilot-devel mailing list
> > Jump-pilot-devel@lists.sourceforge.net
> > <mailto:Jump-pilot-devel@lists.sourceforge.net>
> > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
> > <https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel>
> >
> >
> >------------------------------------------------------------------------
>
> >
>
> >-------------------------------------------------------------------------
> >Take Surveys. Earn Cash. Influence the Future of IT
> >Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> >opinions on IT & business topics through brief surveys - and earn cash
> >http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
> >
>
> >------------------------------------------------------------------------
> >
> >_______________________________________________
> >Jump-pilot-devel mailing list
> > Jump-pilot-devel@lists.sourceforge.net
> >https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
> >
> >
>
>
> -------------------------------------------------------------------------
>
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys - and earn cash
>
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel