source: josm/trunk/src/org/openstreetmap/josm/gui/progress/ChildProgress.java@ 10755

Last change on this file since 10755 was 10173, checked in by Don-vip, 8 years ago

sonar - squid:S1186 - Methods should not be empty

  • Property svn:eol-style set to native
File size: 1.7 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.gui.progress;
3
4import java.awt.Component;
5
6public class ChildProgress extends AbstractProgressMonitor {
7
8 private final AbstractProgressMonitor parent;
9 private final boolean internal;
10
11 public ChildProgress(AbstractProgressMonitor parent, CancelHandler cancelHandler, boolean internal) {
12 super(cancelHandler);
13 this.parent = parent;
14 this.internal = internal;
15 }
16
17 public final AbstractProgressMonitor getParent() {
18 return parent;
19 }
20
21 public final boolean isInternal() {
22 return internal;
23 }
24
25 @Override
26 protected void updateProgress(double value) {
27 parent.childSetProgress(this, value);
28 }
29
30 @Override
31 protected void doBeginTask() {
32 // Do nothing
33 }
34
35 @Override
36 protected void doSetCustomText(String title) {
37 if (!internal) {
38 parent.childSetCustomText(this, title);
39 }
40 }
41
42 @Override
43 protected void doSetTitle(String title) {
44 if (!internal) {
45 parent.childSetTitle(this, title);
46 }
47 }
48
49 @Override
50 protected void doSetIntermediate(boolean value) {
51 if (!internal) {
52 parent.childSetIntermediate(this, value);
53 }
54 }
55
56 @Override
57 protected void doFinishTask() {
58 parent.childFinished(this);
59 }
60
61 @Override
62 public void setProgressTaskId(ProgressTaskId taskId) {
63 parent.setProgressTaskId(taskId);
64 }
65
66 @Override
67 public ProgressTaskId getProgressTaskId() {
68 return parent.getProgressTaskId();
69 }
70
71 @Override
72 public Component getWindowParent() {
73 return parent.getWindowParent();
74 }
75}
Note: See TracBrowser for help on using the repository browser.