My goal is to implement a SelectMouseMode that will allow me to do the
following:
1) Draw a rectangle around graphics on the map I would like to select.
2) Select individual graphics by double-clicking them.
3) Edit (use grab points) on editable graphics when graphic is selected.
I have made the following progress:
1) Can draw rectangle and select graphics.
2) Can select graphics with double-click.
My problems surround using the grab points. When "pressing" the mouse
button on a grab point and dragging, the mouse does not interact with the
grab point it starts drawing the rectangle again due to the logic
associated with the mouse being clicked once. I am essentially following
the steps from the NavMouseMode to draw the rectangle and sub-classing
SelectMouseMode. See below. Any suggestions?
public void mousePressed(MouseEvent e) {
boolean isMapBean = (e.getSource() instanceof MapBean);
e.getComponent().requestFocus();
if (isMapBean) {
if (isMapBean && e.getClickCount() == 1) {
point1 = e.getPoint();
point2 = null;
} else if (e.getClickCount() == 2) {
mouseSupport.fireMapMousePressed(e);
}
}
}
-- [To unsubscribe to this list send an email to "majdart@bbn.com" with the following text in the BODY of the message "unsubscribe openmap-users"]Received on Fri Dec 19 10:14:46 2008
This archive was generated by hypermail 2.1.8 : Fri Dec 19 2008 - 10:14:47 EST