Changeset 5891 in josm for trunk/src/org/openstreetmap/josm/gui/progress/ProgressMonitor.java
- Timestamp:
- 2013-04-20T22:41:13+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/progress/ProgressMonitor.java
r5890 r5891 36 36 } 37 37 38 /** Ticks count used, when no other value is supplied */ 38 39 public final int DEFAULT_TICKS = 10000; 39 40 … … 44 45 public final int ALL_TICKS = -1; 45 46 47 /** 48 * Starts this progress monitor. Must be called exactly once 49 * Ticks count is set to default value 50 * @param title title text of the task 51 */ 46 52 void beginTask(String title); 47 53 48 54 /** 49 55 * Starts this progress monitor. Must be called exactly once 50 * @param title 51 * @param ticks 56 * @param title title text of the task 57 * @param ticks number of work units (see {@link #setTicksCount(int ticks)}) 52 58 */ 53 59 void beginTask(String title, int ticks); … … 58 64 * then further calls are ignored) 59 65 */ 66 void finishTask(); 60 67 61 void finishTask();62 68 /** 63 69 * Can be used if method receive ProgressMonitor but it's not interested progress monitoring. … … 71 77 72 78 /** 73 * 79 * Set the total number of work units 74 80 * @param ticks Number of total work units 75 81 */ 76 82 void setTicksCount(int ticks); 83 77 84 /** 78 * 85 * Get the total number of work units 86 * @return Number of total work units 87 */ 88 int getTicksCount(); 89 90 /** 91 * Set the current number of work units 79 92 * @param ticks Number of work units already done 80 93 */ 81 94 void setTicks(int ticks); 82 95 96 /** 97 * Get the current number of work units 98 * @return Number of work units already done 99 */ 83 100 int getTicks(); 84 int getTicksCount();85 101 86 102 /** 87 103 * Increase number of already done work units by ticks 88 * @param ticks 104 * @param ticks number of ticks to add 89 105 */ 90 106 void worked(int ticks); … … 92 108 /** 93 109 * Subtask that will show progress running back and forth 94 * @param title Can be null, in that case task title is not changed110 * @param title Can be {@code null}, in that case task title is not changed 95 111 */ 96 112 void indeterminateSubTask(String title); 113 97 114 /** 98 115 * Normal subtask 99 * @param title Can be null, in that case task title is not changed116 * @param title Can be {@code null}, in that case task title is not changed 100 117 */ 118 101 119 void subTask(String title); 102 120 /** 103 121 * Shows additional text 104 122 */ 123 105 124 void setCustomText(String text); 106 125 /** … … 118 137 ProgressMonitor createSubTaskMonitor(int ticks, boolean internal); 119 138 139 /** 140 * Returns the state of user aborts 141 * @return {@code true} if user aborted operation 142 */ 120 143 boolean isCanceled(); 144 145 /** 146 * Abort current operation, usually called when user somehow requested an abort 147 */ 121 148 void cancel(); 149 150 /** 151 * Add listener for user abort action 152 * @param listener the listener for cancel operation 153 */ 122 154 void addCancelListener(CancelListener listener); 155 156 /** 157 * Remove listener for user abort action 158 * @param listener the listener for cancel operation 159 */ 123 160 void removeCancelListener(CancelListener listener); 124 161 … … 131 168 132 169 /** 133 * Should be used only by PleaseWaitRunnable. If taskId <> null then "In background" button will be shown 134 * @param taskId 170 * Set the task ID of the progress dialog 171 * Should be used only by PleaseWaitRunnable. If taskId {@code <> null} then "In background" button will be shown 172 * @param taskId the task ID 135 173 */ 136 174 void setProgressTaskId(ProgressTaskId taskId); 137 175 138 176 /** 177 * Returns the task ID of the progress dialog 139 178 * Should be used only by PleaseWaitRunnable 140 * @ param taskId179 * @return the task ID 141 180 */ 142 181 ProgressTaskId getProgressTaskId(); 143 182 144 183 /** 145 * 184 * Return the parent windows of progress dialog 146 185 * @return component suitable as parent for dialogs that wants to be shown in front of progress dialog 147 186 */
Note:
See TracChangeset
for help on using the changeset viewer.