Revision 20100 branches/v10/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/view/toolListeners/MapOverviewListener.java
MapOverviewListener.java | ||
---|---|---|
60 | 60 |
|
61 | 61 |
|
62 | 62 |
/** |
63 |
* DOCUMENT ME! |
|
63 |
* <p>Listener for changes of the zoom caused by selecting a point on the associated {@link MapOverview MapOverview} object |
|
64 |
* by a single click of the button 1 of the mouse.</p> |
|
65 |
* |
|
66 |
* <p>Updates the extent of its <code>ViewPort</code> with a <i>zoom out</i> operation, and enables/disables controls for |
|
67 |
* managing the data.</p> |
|
64 | 68 |
* |
69 |
* @see ViewPort |
|
70 |
* |
|
65 | 71 |
* @author Vicente Caballero Navarro |
66 | 72 |
*/ |
67 | 73 |
public class MapOverviewListener implements PointListener { |
74 |
/** |
|
75 |
* The image to display when the cursor is active. |
|
76 |
*/ |
|
68 | 77 |
private final Image izoomout = new ImageIcon(MapControl.class.getResource( |
69 | 78 |
"images/CruxCursor.png")).getImage(); |
79 |
|
|
80 |
/** |
|
81 |
* The cursor used to work with this tool listener. |
|
82 |
* |
|
83 |
* @see #getCursor() |
|
84 |
*/ |
|
70 | 85 |
private Cursor cur = Toolkit.getDefaultToolkit().createCustomCursor(izoomout, |
71 | 86 |
new Point(16, 16), ""); |
87 |
|
|
88 |
/** |
|
89 |
* Reference to the <code>MapControl</code> object that uses. |
|
90 |
*/ |
|
72 | 91 |
protected MapOverview mapControl; |
73 | 92 |
|
74 | 93 |
/** |
75 |
* Crea un nuevo ZoomOutListenerImpl.
|
|
94 |
* <p>Creates a new listener for zooming out the extent of the associated {@link MapOverview MapOverview} object.</p>
|
|
76 | 95 |
* |
77 |
* @param mapControl DOCUMENT ME!
|
|
96 |
* @param mapControl the <code>MapControl</code> object which represents the <code>MapOverview</code>
|
|
78 | 97 |
*/ |
79 | 98 |
public MapOverviewListener(MapOverview mapControl) { |
80 | 99 |
this.mapControl = mapControl; |
81 | 100 |
} |
82 | 101 |
|
83 |
/** |
|
84 |
* @see com.iver.cit.gvsig.fmap.tools.Listeners.PointListener#point(com.iver.cit.gvsig.fmap.tools.PointEvent) |
|
102 |
/* |
|
103 |
* (non-Javadoc) |
|
104 |
* @see com.iver.cit.gvsig.fmap.tools.Listeners.PointListener#point(com.iver.cit.gvsig.fmap.tools.Events.PointEvent) |
|
85 | 105 |
*/ |
86 | 106 |
public void point(PointEvent event) { |
87 | 107 |
ViewPort vp = mapControl.getMapContext().getViewPort(); |
... | ... | |
101 | 121 |
} |
102 | 122 |
} |
103 | 123 |
|
104 |
/** |
|
124 |
/* |
|
125 |
* (non-Javadoc) |
|
105 | 126 |
* @see com.iver.cit.gvsig.fmap.tools.Listeners.ToolListener#getCursor() |
106 | 127 |
*/ |
107 | 128 |
public Cursor getCursor() { |
108 | 129 |
return cur; |
109 | 130 |
} |
110 | 131 |
|
111 |
/** |
|
132 |
/* |
|
133 |
* (non-Javadoc) |
|
112 | 134 |
* @see com.iver.cit.gvsig.fmap.tools.Listeners.ToolListener#cancelDrawing() |
113 | 135 |
*/ |
114 | 136 |
public boolean cancelDrawing() { |
115 | 137 |
return true; |
116 | 138 |
} |
117 | 139 |
|
140 |
/* |
|
141 |
* (non-Javadoc) |
|
142 |
* @see com.iver.cit.gvsig.fmap.tools.Listeners.PointListener#pointDoubleClick(com.iver.cit.gvsig.fmap.tools.Events.PointEvent) |
|
143 |
*/ |
|
118 | 144 |
public void pointDoubleClick(PointEvent event) throws BehaviorException { |
119 | 145 |
// TODO Auto-generated method stub |
120 | 146 |
|
Also available in: Unified diff