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

Last change on this file since 4642 was 4642, checked in by Don-vip, 12 years ago

Accessors on ChildProgress

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