Changeset 29384 in osm for applications/editors/josm/plugins/imagery_offset_db/src/iodb/CalibrationLayer.java
- Timestamp:
- 2013-03-22T22:18:26+01:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/imagery_offset_db/src/iodb/CalibrationLayer.java
r29377 r29384 20 20 * A layer that displays calibration geometry for an offset. 21 21 * 22 * @author zverik 22 * @author Zverik 23 * @license WTFPL 23 24 */ 24 25 public class CalibrationLayer extends Layer { … … 34 35 } 35 36 37 /** 38 * Draw the calibration geometry with thin bright lines (or a crosshair 39 * in case of a point). 40 */ 36 41 @Override 37 42 public void paint( Graphics2D g, MapView mv, Bounds box ) { … … 79 84 } 80 85 86 /** 87 * This is for determining a bounding box for the layer. 88 */ 81 89 @Override 82 90 public void visitBoundingBox( BoundingXYVisitor v ) { … … 85 93 } 86 94 95 /** 96 * A simple tooltip with geometry type, status and author. 97 */ 87 98 @Override 88 99 public String getToolTipText() { 89 return "A " + (obj.isDeprecated() ? "deprecated " : "") + "calibration " + OffsetInfoAction.getGeometryType(obj)90 + " by " + obj.getAuthor(); 100 return "A " + (obj.isDeprecated() ? "deprecated " : "") + "calibration " 101 + OffsetInfoAction.getGeometryType(obj) + " by " + obj.getAuthor(); 91 102 } 92 103 … … 96 107 } 97 108 109 /** 110 * This method returns standard actions plus "zoom to layer" and "change color". 111 */ 98 112 @Override 99 113 public Action[] getMenuEntries() { … … 111 125 } 112 126 127 /** 128 * This method pans to the geometry, preserving zoom. It is used 129 * from {@link GetImageryOffsetAction}, because {@link AutoScaleAction} 130 * doesn't have a relevant method. 131 */ 113 132 public void panToCenter() { 114 133 if( center == null ) { … … 125 144 } 126 145 146 /** 147 * An action to change a color of a geometry. The color 148 * is specified in the constuctor. See {@link #getMenuEntries()} for 149 * the list of enabled colors. 150 */ 127 151 class SelectColorAction extends AbstractAction { 128 152 private Color c; … … 140 164 } 141 165 166 /** 167 * A simple icon with a colored rectangle. 168 */ 142 169 class SingleColorIcon implements Icon { 143 170 private Color color; … … 162 189 } 163 190 191 /** 192 * An action that calls {@link AutoScaleAction} which in turn 193 * uses {@link #visitBoundingBox} to pan and zoom to the calibration geometry. 194 */ 164 195 class ZoomToLayerAction extends AbstractAction { 165 196 public ZoomToLayerAction() { 166 197 super(tr("Zoom to layer")); 198 putValue(SMALL_ICON, ImageProvider.get("dialogs/autoscale/layer")); 167 199 } 168 200
Note:
See TracChangeset
for help on using the changeset viewer.