Revision 20098 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/tools/Behavior/IBehavior.java

View differences:

IBehavior.java
9 9
import com.iver.cit.gvsig.fmap.tools.BehaviorException;
10 10
import com.iver.cit.gvsig.fmap.tools.Listeners.ToolListener;
11 11

  
12
/**
13
 * <p>When a programmer needs to add a way to permit user to interact with the current object where the graphical
14
 *  information is stored and represented, (see {@link MapControl MapControl}), must analyze and decide the basic
15
 *  <i>behavior</i> nature of the interaction.</p>
16
 * 
17
 * <p>That <i>behavior</i> will manage mouse events and generate information and <i>tool</i> events that the
18
 *  associated {@link ToolListener ToolListener} will use to interact with the <code>MapControl</code> object ultimately.</p>
19
 * 
20
 * <p>It will be possible also combine more than one <i>behavior</i> for a tool listener, for having a richness tool.</p>
21
 */
12 22
public interface IBehavior {
13

  
14 23
	/**
15
	 * Devuelve el ToolListener que est? seleccionado.
24
	 * <p>Gets the <code>ToolListener</code> used by this behavior to perform actions on the
25
	 *  associated <code>MapControl</code> object.</p>
16 26
	 *
17
	 * @return ToolListener seleccionado.
27
	 * @return the <code>ToolListener</code> used by this behavior
18 28
	 */
19 29
	public ToolListener getListener();
20 30

  
21 31
	/**
22
	 * @see com.iver.cit.gvsig.fmap.tools.Behavior.Behavior#paintComponent(java.awt.Graphics)
32
	 * <p>Method executed in real-time, when user is working with a tool on the associated <code>MapControl</code>
33
	 *  object, repainting the <code>MapControl</code>'s image.</p>
34
	 *
35
	 * <p>Returns immediately in all cases, even if the complete image has not yet been loaded.</p>
36
	 * 
37
	 * <p>This method will be implemented according to the specific nature of each behavior, and its
38
	 *  extra and particular features.</p>
39
	 * 
40
	 * @see Graphics#drawImage(java.awt.Image, int, int, java.awt.image.ImageObserver)
23 41
	 */
24 42
	public void paintComponent(Graphics g);
25 43

  
26 44
	/**
27
	 * Inserta el MapControl.
45
	 * <p>Associates this behavior to a <code>MapControl</code> object.</p>
28 46
	 *
29
	 * @param mc MapControl a insertar.
47
	 * @param mc the <code>MapControl</code> object to associate
48
	 * 
49
	 * @see #getMapControl()
30 50
	 */
31 51
	public void setMapControl(MapControl mc);
32 52

  
33 53
	/**
34
	 * Devuelve el cursor de la herrameinta.
54
	 * <p>Gets the mouse cursor of the tool listener associated to this behavior.</p>
35 55
	 *
36
	 * @return Cursor de la herramienta.
56
	 * @return the mouse cursor of the tool listener associated
37 57
	 */
38 58
	public Cursor getCursor();
39 59

  
40 60
	/**
41
	 * Devuelve MapControl.
61
	 * <p>Returns the reference to the <code>MapControl</code> object that this behavior uses.</p> 
42 62
	 *
43
	 * @return MapControl.
63
	 * @return the <code>MapControl</code> object used this behavior
64
	 * 
65
	 * @see #setMapControl(MapControl)
44 66
	 */
45 67
	public MapControl getMapControl();
46 68

  
47 69
	/**
48 70
	 * @see java.awt.event.MouseListener#mouseClicked(java.awt.event.MouseEvent)
71
	 * 
72
	 * @throws BehaviorException any exception processing the action associated to a <i>mouse clicked event</i>, by the <code>IBehavior</code> object
49 73
	 */
50 74
	public void mouseClicked(MouseEvent e) throws BehaviorException;
51 75

  
52 76
	/**
53 77
	 * @see java.awt.event.MouseListener#mouseEntered(java.awt.event.MouseEvent)
78
	 * 
79
	 * @throws BehaviorException any exception processing the action associated to a <i>mouse entered event</i>, by the <code>IBehavior</code> object
54 80
	 */
55 81
	public void mouseEntered(MouseEvent e) throws BehaviorException;
56 82

  
57 83
	/**
58 84
	 * @see java.awt.event.MouseListener#mouseExited(java.awt.event.MouseEvent)
85
	 * 
86
	 * @throws BehaviorException any exception processing the action associated to a <i>mouse exited event</i>, by the <code>IBehavior</code> object
59 87
	 */
60 88
	public void mouseExited(MouseEvent e) throws BehaviorException;
61 89

  
62 90
	/**
63 91
	 * @see java.awt.event.MouseListener#mousePressed(java.awt.event.MouseEvent)
92
	 * 
93
	 * @throws BehaviorException any exception processing the action associated to a <i>mouse pressed event</i>, by the <code>IBehavior</code> object
64 94
	 */
65 95
	public void mousePressed(MouseEvent e) throws BehaviorException;
66 96

  
67 97
	/**
68 98
	 * @see java.awt.event.MouseListener#mouseReleased(java.awt.event.MouseEvent)
99
	 * 
100
	 * @throws BehaviorException any exception processing the action associated to a <i>mouse released event</i>, by the <code>IBehavior</code> object
69 101
	 */
70 102
	public void mouseReleased(MouseEvent e) throws BehaviorException;
71 103

  
72 104
	/**
73 105
	 * @see java.awt.event.MouseMotionListener#mouseDragged(java.awt.event.MouseEvent)
106
	 * 
107
	 * @throws BehaviorException any exception processing the action associated to a <i>mouse dragged event</i>, by the <code>IBehavior</code> object
74 108
	 */
75 109
	public void mouseDragged(MouseEvent e) throws BehaviorException;
76 110

  
77 111
	/**
78 112
	 * @see java.awt.event.MouseMotionListener#mouseMoved(java.awt.event.MouseEvent)
113
	 * 
114
	 * @throws BehaviorException any exception processing the action associated to a <i>mouse moved event</i>, by the <code>IBehavior</code> object
79 115
	 */
80 116
	public void mouseMoved(MouseEvent e) throws BehaviorException;
81 117

  
82 118
	/**
83 119
	 * @see java.awt.event.MouseWheelListener#mouseWheelMoved(java.awt.event.MouseWheelEvent)
120
	 * 
121
	 * @throws BehaviorException any exception processing the action associated to a <i>mouse wheel event</i>, by the <code>IBehavior</code> object
84 122
	 */
85 123
	public void mouseWheelMoved(MouseWheelEvent e) throws BehaviorException;
86 124

  

Also available in: Unified diff