Просмотр исходного кода

Fixes issue 3426: Javadoc installer ui sensibly

Change-Id: Ie0d2197f00b47f2ebebcb65f38d8b14a294b3fce
Reviewed-on: http://gerrit.dmdirc.com/720
Automatic-Compile: DMDirc Local Commits <dmdirc@googlemail.com>
Reviewed-by: Chris Smith <chris@dmdirc.com>
tags/0.6.3b1
Gregory Holmes 14 лет назад
Родитель
Сommit
2635a6bec0
1 измененных файлов: 33 добавлений и 25 удалений
  1. 33
    25
      src/com/dmdirc/installer/ui/InstallerDialog.java

+ 33
- 25
src/com/dmdirc/installer/ui/InstallerDialog.java Просмотреть файл

46
 import javax.swing.UnsupportedLookAndFeelException;
46
 import javax.swing.UnsupportedLookAndFeelException;
47
 
47
 
48
 /**
48
 /**
49
- *
49
+ * Installer dialog, showing the steps required to install DMDirc.
50
  */
50
  */
51
 public class InstallerDialog extends JFrame implements ActionListener {
51
 public class InstallerDialog extends JFrame implements ActionListener {
52
 
52
 
178
     }
178
     }
179
 
179
 
180
     /**
180
     /**
181
+     * Gets the specified step for the installer.
181
      *
182
      *
183
+     * @param step Index of the step
182
      *
184
      *
183
-     * @param step
184
-     * @return
185
+     * @return Requested step
185
      */
186
      */
186
     public Step getStep(final int step) {
187
     public Step getStep(final int step) {
187
         return wizard.getStep(step);
188
         return wizard.getStep(step);
188
     }
189
     }
189
 
190
 
190
     /**
191
     /**
192
+     * Gets the specified step for the installer.
191
      *
193
      *
192
-     * @param name
193
-     * @return
194
+     * @param name Name of the step
195
+     *
196
+     * @return Requested step
194
      */
197
      */
195
     public Step getStep(final String name) {
198
     public Step getStep(final String name) {
196
         return wizard.getStep(name);
199
         return wizard.getStep(name);
197
     }
200
     }
198
 
201
 
199
     /**
202
     /**
203
+     * Returns the current step.
200
      *
204
      *
201
-     *
202
-     * @return
205
+     * @return Current step
203
      */
206
      */
204
     public Step getCurrentStep() {
207
     public Step getCurrentStep() {
205
         return wizard.getCurrentStep();
208
         return wizard.getCurrentStep();
206
     }
209
     }
207
 
210
 
208
     /**
211
     /**
212
+     * Returns the index of the current step.
209
      *
213
      *
210
-     *
211
-     * @return
214
+     * @return Current step's index
212
      */
215
      */
213
     public int getCurrentStepIndex() {
216
     public int getCurrentStepIndex() {
214
         return wizard.getCurrentStepIndex();
217
         return wizard.getCurrentStepIndex();
215
     }
218
     }
216
 
219
 
217
     /**
220
     /**
221
+     * Returns the name of the current step.
218
      *
222
      *
219
-     *
220
-     * @return
223
+     * @return Current step's name
221
      */
224
      */
222
     public String getCurrentStepName() {
225
     public String getCurrentStepName() {
223
         return wizard.getCurrentStepName();
226
         return wizard.getCurrentStepName();
224
     }
227
     }
225
 
228
 
226
     /**
229
     /**
230
+     * Informs listeners a step is about to be displayed.
227
      *
231
      *
228
-     *
229
-     * @param step
232
+     * @param step Step to be displayed
230
      */
233
      */
231
     void fireStepAboutToBeDisplayed(final Step step) {
234
     void fireStepAboutToBeDisplayed(final Step step) {
232
         for (StepListener listener : listeners.get(StepListener.class)) {
235
         for (StepListener listener : listeners.get(StepListener.class)) {
235
     }
238
     }
236
 
239
 
237
     /**
240
     /**
238
-     *
241
+     * Informs listeners a step is about to be hidden.
239
      * 
242
      * 
240
-     * @param step
243
+     * @param step Step to be hidden
241
      */
244
      */
242
     void fireStepHidden(final Step step) {
245
     void fireStepHidden(final Step step) {
243
         for (StepListener listener : listeners.get(StepListener.class)) {
246
         for (StepListener listener : listeners.get(StepListener.class)) {
246
     }
249
     }
247
 
250
 
248
     /**
251
     /**
249
-     *
252
+     * Adds a step listener to this installer.
250
      * 
253
      * 
251
-     * @param listener
254
+     * @param listener Listener to add
252
      */
255
      */
253
     public void addStepListener(final StepListener listener) {
256
     public void addStepListener(final StepListener listener) {
254
         listeners.add(StepListener.class, listener);
257
         listeners.add(StepListener.class, listener);
255
     }
258
     }
256
 
259
 
257
     /**
260
     /**
261
+     * Removes a step listener from this installer.
258
      *
262
      *
259
-     *
260
-     * @param listener
263
+     * @param listener Listener to remove
261
      */
264
      */
262
     public void removeStepListener(final StepListener listener) {
265
     public void removeStepListener(final StepListener listener) {
263
         listeners.remove(StepListener.class, listener);
266
         listeners.remove(StepListener.class, listener);
265
     }
268
     }
266
 
269
 
267
     /**
270
     /**
268
-     *
271
+     * Informs listeners this installer has been cancelled.
269
      */
272
      */
270
     void fireWizardCancelled() {
273
     void fireWizardCancelled() {
271
         for (WizardListener listener : listeners.get(WizardListener.class)) {
274
         for (WizardListener listener : listeners.get(WizardListener.class)) {
274
     }
277
     }
275
 
278
 
276
     /**
279
     /**
277
-     * 
280
+     * Informs listeners this installer has been completed.
278
      */
281
      */
279
     void fireWizardFinished() {
282
     void fireWizardFinished() {
280
         for (WizardListener listener : listeners.get(WizardListener.class)) {
283
         for (WizardListener listener : listeners.get(WizardListener.class)) {
283
     }
286
     }
284
 
287
 
285
     /**
288
     /**
289
+     * Adds a wizard listeners to this installer.
286
      *
290
      *
287
-     *
288
-     * @param listener
291
+     * @param listener Listener to add
289
      */
292
      */
290
     public void addWizardListener(final WizardListener listener) {
293
     public void addWizardListener(final WizardListener listener) {
291
         listeners.add(WizardListener.class, listener);
294
         listeners.add(WizardListener.class, listener);
292
     }
295
     }
293
 
296
 
294
     /**
297
     /**
295
-     *
298
+     * Removes  a wizard listener from this installer
296
      * 
299
      * 
297
-     * @param listener
300
+     * @param listener Listener to remove
298
      */
301
      */
299
     public void removeWizardListener(final WizardListener listener) {
302
     public void removeWizardListener(final WizardListener listener) {
300
         listeners.remove(WizardListener.class, listener);
303
         listeners.remove(WizardListener.class, listener);
329
         UIManager.put("swing.boldMetal", false);
332
         UIManager.put("swing.boldMetal", false);
330
     }
333
     }
331
 
334
 
335
+    /**
336
+     * {@inheritDoc}
337
+     *
338
+     * @param e Action performed
339
+     */
332
     @Override
340
     @Override
333
     public void actionPerformed(ActionEvent e) {
341
     public void actionPerformed(ActionEvent e) {
334
         final int currentStep = wizard.getCurrentStepIndex();
342
         final int currentStep = wizard.getCurrentStepIndex();

Загрузка…
Отмена
Сохранить