Changeset 29171 in osm for applications/viewer
- Timestamp:
- 2013-01-05T13:56:17+01:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JMapViewer.java
r29170 r29171 81 81 protected JButton zoomInButton; 82 82 protected JButton zoomOutButton; 83 84 public static enum ZOOM_BUTTON_STYLE { 85 HORIZONTAL, 86 VERTICAL 87 } 88 protected ZOOM_BUTTON_STYLE zoomButtonStyle; 83 89 84 90 private TileSource tileSource; … … 967 973 repaint(); 968 974 } 975 976 public ZOOM_BUTTON_STYLE getZoomButtonStyle() { 977 return zoomButtonStyle; 978 } 979 980 public void setZoomButtonStyle(ZOOM_BUTTON_STYLE style) { 981 zoomButtonStyle = style; 982 if (zoomSlider == null || zoomInButton == null || zoomOutButton == null) { 983 return; 984 } 985 switch (style) { 986 case HORIZONTAL: 987 zoomSlider.setBounds(10, 10, 30, 150); 988 zoomInButton.setBounds(4, 155, 18, 18); 989 zoomOutButton.setBounds(26, 155, 18, 18); 990 break; 991 case VERTICAL: 992 zoomSlider.setBounds(10, 27, 30, 150); 993 zoomInButton.setBounds(14, 8, 20, 20); 994 zoomOutButton.setBounds(14, 176, 20, 20); 995 break; 996 default: 997 zoomSlider.setBounds(10, 10, 30, 150); 998 zoomInButton.setBounds(4, 155, 18, 18); 999 zoomOutButton.setBounds(26, 155, 18, 18); 1000 break; 1001 } 1002 repaint(); 1003 } 969 1004 970 1005 /**
Note:
See TracChangeset
for help on using the changeset viewer.