Additional mouse interaction on Maneuver in Neptus

22 views
Skip to first unread message

Kristian Klausen

unread,
Nov 20, 2015, 5:53:10 AM11/20/15
to LSTS Toolchain
Hi,

We're developing a new neptus manuever, which we would really like to be able to have two mouse interaction points. Afaik, having two movable points requires a bit of work, but is it possible to subscribe to mouse events with modifiers?

I was so sure I saw a demo once were the you could manipulate the angle of the Rows maneuver by shift-clicking and dragging the point, but when I try this now this rotates the entire plan. (And, the code suggests it to do so? https://github.com/LSTS/neptus/blob/develop/src/pt/lsts/neptus/mp/maneuvers/RowsManeuver.java#L347). Am I missing something?

Regards,
Kristian

Kristian Klausen

unread,
Nov 20, 2015, 6:05:11 AM11/20/15
to LSTS Toolchain
Aha!

The solution was as simple as double-clicking on the maneuver point. Then, the maneuver could be altered. We'll see if we can adopt this to our maneuver as well.

Regards,
Kristian

Paulo Dias

unread,
Nov 20, 2015, 6:05:40 AM11/20/15
to Kristian Klausen, LSTS Toolchain
Hi Kristian,

  You are right. Check the PlanEditor line 892:

                if (man instanceof StateRendererInteraction) {
                    delegate = (StateRendererInteraction) man;
                    ((StateRendererInteraction) man).setActive(true, source);

  This means that you need to double click on the handler of the maneuver. If the maneuver implements StateRendererInteraction, that will "take over" the mouse events. Then is as you pointed at  https://github.com/LSTS/neptus/blob/develop/src/pt/lsts/neptus/mp/maneuvers/RowsManeuver.java#L347.

Regards,
Paulo

--
You received this message because you are subscribed to the Google Groups "LSTS Toolchain" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lsts-toolchai...@googlegroups.com.
Visit this group at http://groups.google.com/group/lsts-toolchain.
To view this discussion on the web visit https://groups.google.com/d/msgid/lsts-toolchain/dee714eb-939e-42a0-95fd-c1d8e6411a18%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Paulo Dias

unread,
Nov 20, 2015, 6:06:32 AM11/20/15
to Kristian Klausen, LSTS Toolchain
I sent the solution at the same time you've found it :-)

--
You received this message because you are subscribed to the Google Groups "LSTS Toolchain" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lsts-toolchai...@googlegroups.com.
Visit this group at http://groups.google.com/group/lsts-toolchain.

Kristian Klausen

unread,
Nov 20, 2015, 6:10:41 AM11/20/15
to LSTS Toolchain, kkn...@gmail.com
Hehe, yes, that was fast :) Thanks for the extra details you provided.

Kristian
Reply all
Reply to author
Forward
0 new messages