Changeset 29380 in osm for applications/editors/josm/plugins/imagery_offset_db/src/iodb/OffsetDialogButton.java
- Timestamp:
- 2013-03-21T07:28:34+01:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/imagery_offset_db/src/iodb/OffsetDialogButton.java
r29379 r29380 24 24 public OffsetDialogButton( ImageryOffsetBase offset ) { 25 25 super(); 26 this.offset = offset; 26 27 setMinimumSize(new Dimension(500, 10)); 27 28 setMaximumSize(new Dimension(500, 150)); 28 setText("<html>" 29 + Math.round(offset.getPosition().greatCircleDistance(ImageryOffsetTools.getMapCenter())) + " m: " 30 + offset.getDescription() + "</html>"); 29 setRelevantText(); 31 30 setIcon(new OffsetIcon(offset)); 32 this.offset = offset;33 31 34 32 offsetLength = offset instanceof ImageryOffset ? getLengthAndDirection((ImageryOffset)offset)[0] : 0.0; 35 33 // todo: layout, info, map distance and direction 34 } 35 36 /** 37 * Update text on the button. This method is to be deleted by release. 38 */ 39 public void setRelevantText() { 40 setText("<html>" 41 + ImageryOffsetTools.formatDistance(offset.getPosition().greatCircleDistance(ImageryOffsetTools.getMapCenter())) 42 + ": " + offset.getDescription() + "</html>"); 36 43 } 37 44 … … 46 53 size.height = 70; 47 54 return size; 55 } 56 57 /** 58 * Update arrow for the offset location. 59 */ 60 public void updateLocation() { 61 // map was moved, update arrow. 62 setRelevantText(); 48 63 } 49 64
Note:
See TracChangeset
for help on using the changeset viewer.