- Timestamp:
- 2017-06-11T13:57:28+02:00 (7 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java
r10791 r12391 33 33 import org.openstreetmap.josm.tools.WindowGeometry; 34 34 35 /** 36 * Utility methods that display an option dialog with an additional help button that links to the JOSM help 37 */ 35 38 public final class HelpAwareOptionPane { 36 39 … … 39 42 } 40 43 44 /** 45 * A specification of a button that should be added to the options dialog 46 */ 41 47 public static class ButtonSpec { 48 /** 49 * the button text 50 */ 42 51 public final String text; 52 /** 53 * the icon to display. Can be <code>null</code> 54 */ 43 55 public final Icon icon; 56 /** 57 * The tooltip to display when hovering the button 58 */ 44 59 public final String tooltipText; 60 /** 61 * The help topic to link 62 */ 45 63 public final String helpTopic; 46 64 private boolean enabled; -
trunk/src/org/openstreetmap/josm/gui/MapFrame.java
r12368 r12391 131 131 private final List<ToggleDialog> allDialogs = new ArrayList<>(); 132 132 private final List<IconToggleButton> allDialogButtons = new ArrayList<>(); 133 /** 134 * All map mode buttons. Should only be read form the outside 135 */ 133 136 public final List<IconToggleButton> allMapModeButtons = new ArrayList<>(); 134 137 … … 294 297 } 295 298 299 /** 300 * Enables the select tool 301 * @param onlyIfModeless Only enable if modeless mode is active 302 * @return <code>true</code> if it is selected 303 */ 296 304 public boolean selectSelectTool(boolean onlyIfModeless) { 297 305 if (onlyIfModeless && !MODELESS.get()) … … 301 309 } 302 310 311 /** 312 * Enables the draw tool 313 * @param onlyIfModeless Only enable if modeless mode is active 314 * @return <code>true</code> if it is selected 315 */ 303 316 public boolean selectDrawTool(boolean onlyIfModeless) { 304 317 if (onlyIfModeless && !MODELESS.get()) … … 308 321 } 309 322 323 /** 324 * Enables the zoom tool 325 * @param onlyIfModeless Only enable if modeless mode is active 326 * @return <code>true</code> if it is selected 327 */ 310 328 public boolean selectZoomTool(boolean onlyIfModeless) { 311 329 if (onlyIfModeless && !MODELESS.get()) … … 401 419 } 402 420 421 /** 422 * Adds a new map mode button 423 * @param b The map mode button with a {@link MapMode} action. 424 */ 403 425 public void addMapMode(IconToggleButton b) { 404 426 if (!(b.getAction() instanceof MapMode)) … … 654 676 } 655 677 678 /** 679 * Validate the visibility of all tool bars and hide the ones that should be hidden 680 */ 656 681 public void validateToolBarsVisibility() { 657 682 for (IconToggleButton b : allDialogButtons) { -
trunk/src/org/openstreetmap/josm/gui/MapSlider.java
r10078 r12391 15 15 import org.openstreetmap.josm.gui.help.Helpful; 16 16 17 /** 18 * This is the slider used in the top left corner of the map view. It allows the user to select the scale 19 */ 17 20 class MapSlider extends JSlider implements PropertyChangeListener, ChangeListener, Helpful { 18 21 -
trunk/src/org/openstreetmap/josm/gui/MapStatus.java
r12065 r12391 154 154 } 155 155 156 /** 157 * The progress monitor that is used to display the progress if the user selects to run in background 158 */ 156 159 public class BackgroundProgressMonitor implements ProgressMonitorDialog { 157 160 … … 225 228 private final JProgressBar progressBar = new JProgressBar(); 226 229 private final transient ComponentAdapter mvComponentAdapter; 230 /** 231 * The progress monitor for displaying a background progress 232 */ 227 233 public final transient BackgroundProgressMonitor progressMonitor = new BackgroundProgressMonitor(); 228 234 … … 971 977 } 972 978 979 /** 980 * Gets the panel that displays the angle 981 * @return The angle panel 982 */ 973 983 public JPanel getAnglePanel() { 974 984 return angleText; … … 986 996 } 987 997 988 public void setHelpText(String t) { 989 setHelpText(null, t); 990 } 991 998 /** 999 * Sets the help text in the status panel 1000 * @param text The text 1001 */ 1002 public void setHelpText(String text) { 1003 setHelpText(null, text); 1004 } 1005 1006 /** 1007 * Sets the help status text to display 1008 * @param id The object that caused the status update (or a id object it selects). May be <code>null</code> 1009 * @param text The text 1010 */ 992 1011 public void setHelpText(Object id, final String text) { 993 994 1012 StatusTextHistory entry = new StatusTextHistory(id, text); 995 1013 … … 1003 1021 } 1004 1022 1023 /** 1024 * Removes a help text and restores the previous one 1025 * @param id The id passed to {@link #setHelpText(Object, String)} 1026 */ 1005 1027 public void resetHelpText(Object id) { 1006 1028 if (statusText.isEmpty()) … … 1019 1041 } 1020 1042 1043 /** 1044 * Sets the angle to display in the angle panel 1045 * @param a The angle 1046 */ 1021 1047 public void setAngle(double a) { 1022 1048 angleText.setText(a < 0 ? "--" : DECIMAL_FORMAT.format(a) + " \u00B0"); 1023 1049 } 1024 1050 1051 /** 1052 * Sets the heading to display in the heading panel 1053 * @param h The heading 1054 */ 1025 1055 public void setHeading(double h) { 1026 1056 headingText.setText(h < 0 ? "--" : DECIMAL_FORMAT.format(h) + " \u00B0"); -
trunk/src/org/openstreetmap/josm/gui/MapView.java
r12380 r12391 396 396 private boolean virtualNodesEnabled; 397 397 398 /** 399 * Enables or disables drawing of the virtual nodes. 400 * @param enabled if virtual nodes are enabled 401 */ 398 402 public void setVirtualNodesEnabled(boolean enabled) { 399 403 if (virtualNodesEnabled != enabled) { -
trunk/src/org/openstreetmap/josm/gui/NameFormatterHook.java
r8512 r12391 6 6 import org.openstreetmap.josm.data.osm.IWay; 7 7 8 /** 9 * Hooks that allow correcting the name of a OSM primitive 10 * @see DefaultNameFormatter 11 */ 8 12 public interface NameFormatterHook { 9 13 -
trunk/src/org/openstreetmap/josm/gui/ScrollViewport.java
r12079 r12391 31 31 private static final int NO_SCROLL = 0; 32 32 33 /** 34 * Direction flag for upwards 35 */ 33 36 public static final int UP_DIRECTION = 1; 37 /** 38 * Direction flag for downwards 39 */ 34 40 public static final int DOWN_DIRECTION = 2; 41 /** 42 * Direction flag for left 43 */ 35 44 public static final int LEFT_DIRECTION = 4; 45 /** 46 * Direction flag for right 47 */ 36 48 public static final int RIGHT_DIRECTION = 8; 37 49 /** … … 240 252 } 241 253 254 /** 255 * Gets the current visible part of the view 256 * @return The current view rect 257 */ 242 258 public Rectangle getViewRect() { 243 259 return vp.getViewRect(); 244 260 } 245 261 262 /** 263 * Gets the size of the view 264 * @return The size 265 */ 246 266 public Dimension getViewSize() { 247 267 return vp.getViewSize(); 248 268 } 249 269 270 /** 271 * Gets the position (offset) of the view area 272 * @return The offset 273 */ 250 274 public Point getViewPosition() { 251 275 return vp.getViewPosition(); -
trunk/src/org/openstreetmap/josm/gui/ShowHideButtonListener.java
r8512 r12391 8 8 */ 9 9 public interface ShowHideButtonListener { 10 /** 11 * Called when the button is shown 12 */ 10 13 void buttonShown(); 11 14 15 /** 16 * Called when the button is hidden 17 */ 12 18 void buttonHidden(); 13 19 }
Note:
See TracChangeset
for help on using the changeset viewer.