The MouseToolManager object in JPEFrame has some more convenient methods.
(sharing) In[129]:=
The getCurrentTool( ) returns currently selected mouse tool.
When the marquee rect is current, the DraggingToolMarqueeRect object is returned.
(sharing) In[130]:=
When the Frame Line tool is selected, the DraggingToolLine object is returned.
(sharing) In[131]:=
The getPoints( ) method returns a trajectory of the mouse when the tool is used by mouse clicks or drag.
(sharing) In[132]:=
The points are received in {{x1,x2,...,xn},{y1,y2,...,yn}} format.
(sharing) In[133]:=
The same result is obtained by GetPointsAsList[ ] function.
(sharing) In[134]:=
Six tools; Frame Rect, Frame Oval, Frame Poly, Fill Rect, Fill Oval, and Fill Poly, can return its shape as a Java object.
(sharing) In[135]:=
In case of Frame Oval tool, the bounding rectangle is returned.
(sharing) In[136]:=
Converted by Mathematica (July 17, 2003)