Revision 13368

View differences:

branches/v10/libraries/libFMap/src/com/iver/cit/gvsig/fmap/core/AbstractHandler.java
44 44

  
45 45

  
46 46
/**
47
 * DOCUMENT ME!
47
 * This class expands the <code>Handler</code> interface adding support for selection, and
48
 *  identifying a handler of a geometry.
49
 * 
50
 * @see Handler
48 51
 *
49 52
 * @author Vicente Caballero Navarro
50 53
 */
51 54
public abstract class AbstractHandler implements Handler {
55
	/**
56
	 * Identifies each handler of a geometry.
57
	 */
52 58
	protected int index;
59

  
60
	/**
61
	 * Position of this handler.
62
	 * 
63
	 * @see #getPoint()
64
	 * @see Handler#set(double, double)
65
	 * @see Handler#move(double, double)
66
	 */
53 67
	protected Point2D point;
54
	private boolean select=false;
55 68

  
56 69
	/**
57
	 * DOCUMENT ME!
58
	 *
59
	 * @return DOCUMENT ME!
70
	 * True when the handler is selected.
71
	 * 
72
	 * @see #select
73
	 * @see #isSelected()
60 74
	 */
75
	private boolean select=false;
76

  
77
	/*
78
	 * (non-Javadoc)
79
	 * @see com.iver.cit.gvsig.fmap.core.Handler#getPoint()
80
	 */
61 81
	public Point2D getPoint() {
62 82
		return point;
63 83
	}
64 84
	
85
	/**
86
	 * Sets the state of the handler. <code>True</code> if is selected, <code>false</code> if it's not.
87
	 * 
88
	 * @param b <code>true</code> if the handler is selected, otherwise <code>false</code>
89
	 */
65 90
	public void select(boolean b) {
66 91
	 select=b;
67 92
	}
93
	
94
	/**
95
	 * Returns the state of the handler. <code>True</code> if is selected, <code>false</code> if it's not.
96
	 * 
97
	 * @return <code>true</code> if the handler is selected, otherwise <code>false</code>
98
	 */
68 99
	public boolean isSelected(){
69 100
		return select;
70 101
	}
102
	
103
	/*
104
	 * (non-Javadoc)
105
	 * @see com.iver.cit.gvsig.fmap.core.Handler#equalsPoint(java.lang.Object)
106
	 */
71 107
	public boolean equalsPoint(Object obj) {
72 108
		Point2D p1=this.getPoint();
73 109
		Point2D p2=((Handler)obj).getPoint();

Also available in: Unified diff