Revision 41971 trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/java/org/gvsig/fmap/mapcontrol/tools/Behavior/PolylineBehavior.java

View differences:

PolylineBehavior.java
95 95
	 * @see com.iver.cit.gvsig.fmap.tools.Behavior.Behavior#mousePressed(java.awt.event.MouseEvent)
96 96
	 */
97 97
	public void mousePressed(MouseEvent e) throws BehaviorException {
98
            if( !isMyButton(e) ) {
99
                return;
100
            }
98 101
		if (e.getClickCount() == 2) {
99 102
			listener.polylineFinished(new MeasureEvent((Double[]) arrayX.toArray(new Double[arrayX.size()]), (Double[]) arrayY.toArray(new Double[arrayY.size()]), e));
100 103

  
......
121 124
	 * @see com.iver.cit.gvsig.fmap.tools.Behavior.Behavior#mouseDragged(java.awt.event.MouseEvent)
122 125
	 */
123 126
	public void mouseDragged(MouseEvent e) throws BehaviorException {
127
            if( !isMyButton(e) ) {
128
                return;
129
            }
124 130
		mouseMoved(e);
125 131
	}
126 132

  
......
141 147
	 * @see com.iver.cit.gvsig.fmap.tools.Behavior.Behavior#mouseMoved(java.awt.event.MouseEvent)
142 148
	 */
143 149
	public void mouseMoved(MouseEvent e) throws BehaviorException {
150
            if( !isMyButton(e) ) {
151
                return;
152
            }
144 153
		//System.err.println("moved antes de click");
145 154
		if (isClicked) {
146 155
			//System.err.println("moved despues de click");
......
155 164

  
156 165
	/**
157 166
	 * <p>Draws the polyline in the <code>Graphics2D</code> of the associated <code>MapControl</code>.</p>
158
	 *
159
	 * @param g2 the 2D context that allows draw the polyline
167
         * @param mapControlDrawer
160 168
	 */
161 169
	protected void drawPolyLine(MapControlDrawer mapControlDrawer) {
162 170
		GeneralPathX polyline = new GeneralPathX(GeneralPathX.WIND_EVEN_ODD, arrayX.size());

Also available in: Unified diff