View Javadoc

1   /*
2    * Copyright 2006-2016 The JGUIraffe Team.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License")
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
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 net.sf.jguiraffe.gui.builder.components.model;
17  
18  import net.sf.jguiraffe.gui.forms.ComponentHandler;
19  
20  /**
21   * <p>
22   * A specialized component handler that represents a progress bar component.
23   * </p>
24   * <p>
25   * The most important property of a progress bar is its current value. This is
26   * an integer value indicating the progress of the operation that is visualized
27   * by the bar. It is also possible to set a text value, which will be displayed
28   * in front of the progress bar (as far as the used GUI library supports this
29   * feature). A text will only be displayed if support for texts was enabled when
30   * the progress bar component was created.
31   * </p>
32   *
33   * @author Oliver Heger
34   * @version $Id: ProgressBarHandler.java 205 2012-01-29 18:29:57Z oheger $
35   */
36  public interface ProgressBarHandler extends ComponentHandler<Integer>
37  {
38      /**
39       * Returns the current value of the progress bar.
40       *
41       * @return the current value
42       */
43      int getValue();
44  
45      /**
46       * Sets the current value of the progress bar. This value will determine the
47       * length of the bar. It should be between the minimum and the maximum value
48       * defined during creation of the component.
49       *
50       * @param v the current value
51       */
52      void setValue(int v);
53  
54      /**
55       * Returns the text of the progress bar.
56       *
57       * @return the current progress text
58       */
59      String getProgressText();
60  
61      /**
62       * Sets the text of the progress bar. This text will be displayed in front
63       * of the progress bar if this allowed.
64       *
65       * @param s the progress text
66       */
67      void setProgressText(String s);
68  }