01: /*
02: * Copyright 2005 Paul Hinds
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.tp23.antinstaller.page;
17:
18: import org.tp23.antinstaller.input.OutputField;
19:
20: public class ProgressPage extends Page {
21:
22: private boolean showTargets = true;
23: private int showProgress = 0;
24:
25: public ProgressPage() {
26: }
27:
28: /**
29: * @return Returns the showTargets.
30: */
31: public boolean isShowTargets() {
32: return showTargets;
33: }
34:
35: /**
36: * @param showTargets indicates that the graphical display of
37: * progress should be used in the Swing renderer
38: */
39: public void setShowTargets(boolean showTargets) {
40: this .showTargets = showTargets;
41: }
42:
43: public void setShowTargets(String strShowTargets) {
44: this .showTargets = OutputField.isTrue(strShowTargets);
45: }
46:
47: /**
48: * @return Returns the showTargets.
49: */
50: public int getShowProgress() {
51: return showProgress;
52: }
53:
54: /**
55: * @param showProgress indicates that the graphical display of
56: * progress bar should be used in the Swing renderer
57: * It is the developers responsibility to call the tick method
58: */
59: public void setShowProgress(int showProgress) {
60: this .showProgress = showProgress;
61: }
62:
63: public void setShowProgress(String strShowProgress) {
64: this.showProgress = Integer.parseInt(strShowProgress);
65: }
66: }
|