EchoPoint
1.0

echopoint
Class ProgressBar

java.lang.Object
  extended bynextapp.echo.Component
      extended bynextapp.echo.Container
          extended byechopoint.EchoPointComponent
              extended byechopoint.ProgressBar
All Implemented Interfaces:
MouseCursorable, ReflectionSetter, java.io.Serializable, ToolTipPopUpSupport, nextapp.echo.ToolTipSupport

public class ProgressBar
extends EchoPointComponent

The ProgressBar> component provides a visual display for an integer value within a bounded interval.

A ProgressBar typically communicates the progress of an event by displaying its percentage of completion and possibly a textual display of this percentage.

The ProgressBar comes with a standard width and height that is optimised for HORIZONATL orientation. If you change the orientation, be sure to flip the height and width otherwise it will look strange. This is done by default on the basic setOrientation() method.

The width and height of the ProgressBar can be adjusted slightly by the ProgressBarRenderer, so it can fit the block size exactly. So dont assume its size is always exact.

See Also:
Serialized Form

Nested Class Summary
static class ProgressBar.NestedStyleInfo
          Nested public static StyleInfo class.
 
Field Summary
static java.lang.String BLOCKS_CHANGED_PROPERTY
           
static java.lang.String BORDER_COLOR_CHANGED_PROPERTY
           
static java.lang.String BORDER_SIZE_CHANGED_PROPERTY
           
protected  nextapp.echo.Color borderColor
          The border color of the ProgressBar
protected  int borderSize
          The border size of the ProgressBar
protected  nextapp.echo.event.ChangeEvent changeEvent
          Only one ChangeEvent is needed per instance since the event's only interesting property is the immutable source, which is the progress bar.
protected  nextapp.echo.event.ChangeListener changeListener
           
static java.lang.String COLORS_CHANGED_PROPERTY
           
protected  nextapp.echo.Color completedColor
          The completed color of the ProgressBar
static int defaultHeight
          The default height for a progress bar is 30 pixels .
static int defaultMaximum
          The default maximum for a progress bar is 100.
static int defaultMinimum
          The default minimum for a progress bar is 0.
static int defaultOrientation
          The default orientation for a progress bar is HORIZONTAL.
static int defaultWidth
          The default width for a progress bar is 146 pixels.
protected  int height
          The height of the ProgressBar
static java.lang.String IMAGE_CHANGED_PROPERTY
           
protected  BoundedRangeModel model
          The data structure that holds the various values for the progress bar.
static java.lang.String MODEL_CHANGED_PROPERTY
           
protected  boolean needsRedraw
          An internal flag to control whether the component needs redrawing
protected  int numberOfBlocks
          The number of blocks shown in the progress bar
protected  int orientation
          The orientation to display the progress bar.
static java.lang.String ORIENTATION_CHANGED_PROPERTY
          Public property change names
static int ORIENTATION_HORIZONTAL
          The orientation values for the the progress bar.
static int ORIENTATION_VERTICAL
           
protected  boolean paintString
          Whether to textually display a String on the progress bar.
static java.lang.String PROGRESS_STRING_CHANGED_PROPERTY
           
static java.lang.String PROGRESS_STRING_PAINTED_CHANGED_PROPERTY
           
protected  nextapp.echo.ImageReference progressBarImage
          This is our progress bar imaegt hat changes when ever the model changes.
protected  java.lang.String progressString
          A optional Progress String that can be displayed on the progress bar.
static java.lang.String RENDER_CHANGED_PROPERTY
           
protected  ProgressBarRenderer renderer
          The progress bar renderer
static java.lang.String STYLE_BORDER_COLOR
          A style constant for the Border Color property.
static java.lang.String STYLE_BORDER_SIZE
          A style constant for the Border Size property.
static java.lang.String STYLE_COMPLETED_COLOR
          A style constant for the Completed Color property.
static java.lang.String STYLE_HEIGHT
          A style constant for the Height property.
static java.lang.String STYLE_MAXIMUM
          A style constant for the Maximum property.
static java.lang.String STYLE_MINIMUM
          A style constant for the Minimum property.
static java.lang.String STYLE_NUMBER_OF_BLOCKS
          A style constant for the Number Of Blocks property.
static java.lang.String STYLE_ORIENTATION
          A style constant for the Orientation property.
static java.lang.String STYLE_PROGRESS_STRING
          A style constant for the Progress String property.
static java.lang.String STYLE_PROGRESS_STRING_PAINTED
          A style constant for the Progress String Painted property.
static java.lang.String STYLE_UNCOMPLETED_COLOR
          A style constant for the UnCompleted Color property.
static java.lang.String STYLE_VALUE
          A style constant for the Value property.
static java.lang.String STYLE_WIDTH
          A style constant for the Width property.
protected  nextapp.echo.Color uncompletedColor
          The uncompleted color of the ProgressBar
protected  int width
          The width of the ProgressBar
static java.lang.String WIDTH_HEIGHT_CHANGED_PROPERTY
           
 
Fields inherited from class echopoint.EchoPointComponent
STYLE_TOOL_TIP_TEXT, TOOL_TIP_TEXT_CHANGED_PROPERTY, toolTipPopUp
 
Fields inherited from class nextapp.echo.Component
BACKGROUND_CHANGED_PROPERTY, CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FONT_CHANGED_PROPERTY, FOREGROUND_CHANGED_PROPERTY, IDENTIFIER_CHANGED_PROPERTY, listenerList, LOCALE_CHANGED_PROPERTY, STYLE_BACKGROUND, STYLE_FONT, STYLE_FOREGROUND, UPDATE_PROPERTY, VISIBLE_CHANGED_PROPERTY
 
Fields inherited from interface echopoint.positionable.MouseCursorable
borderStyleSymbolics, CURSOR_AUTO, CURSOR_CROSSHAIR, CURSOR_CUSTOM_URI, CURSOR_DEFAULT, CURSOR_E_RESIZE, CURSOR_HELP, CURSOR_MOVE, CURSOR_N_RESIZE, CURSOR_NE_RESIZE, CURSOR_NW_RESIZE, CURSOR_POINTER, CURSOR_S_RESIZE, CURSOR_SE_RESIZE, CURSOR_SW_RESIZE, CURSOR_TEXT, CURSOR_W_RESIZE, CURSOR_WAIT, STYLE_MOUSE_CURSOR, STYLE_MOUSE_CURSOR_URI
 
Constructor Summary
ProgressBar()
          Creates a horizontal progress bar. * The default orientation for progress bars is ProgressBar.HORIZONTAL.
ProgressBar(BoundedRangeModel newModel)
          Creates a horizontal progress bar, the default orientation.
ProgressBar(int orient)
          Creates a progress bar with the specified orientation, which can be either ProgressBar.VERTICAL or ProgressBar.HORIZONTAL.
ProgressBar(int min, int max)
          Creates a horizontal progress bar, which is the default.
ProgressBar(int orient, int min, int max)
          Creates a progress bar using the specified orientation, minimum, and maximum.
 
Method Summary
 void addChangeListener(nextapp.echo.event.ChangeListener l)
          Adds a ChangeListener to the ProgressBar.
 void applyStyle(nextapp.echo.Style style)
          Applies the provided style to the component.
protected  nextapp.echo.event.ChangeListener createChangeListener()
          Subclasses that want to handle ChangeEvents differently can override this to return a subclass of ModelListener or another ChangeListener implementation.
protected  void fireStateChanged()
          Notify all listeners that have registered interest for notification on this event type.
 nextapp.echo.Color getBorderColor()
           
 int getBorderSize()
           
 nextapp.echo.Color getCompletedColor()
           
 int getHeight()
          Returns height of the ProgressBar
 int getMaximum()
          Returns the model's maximum value.
 int getMinimum()
          Returns the model's minimum value.
 BoundedRangeModel getModel()
          Returns the data model used by the ProgressBar.
 int getNumberOfBlocks()
           
 int getOrientation()
          Returns ProgressBar.ORIENTATION_VERTICAL or ProgressBar.ORIENTATION_HORIZONTAL, depending on the orientation of the progress bar.
 double getPercentComplete()
          Returns the percentage/percent complete for the progress bar.
 nextapp.echo.ImageReference getProgressBarImage()
          This returns the image used to represent the ProgressBar.
 java.lang.String getProgressString()
          Returns the current value of the Progress String.
 ProgressBarRenderer getRenderer()
          Returns the renderer used by the ProgressBar.
 nextapp.echo.Color getUncompletedColor()
           
 int getValue()
          Returns the model's current value.
 int getWidth()
          Returns width of the ProgressBar
 void invalidate()
          Can be called to invalidate the ProgressBar so that it will redraw its internals when next rendered.
 boolean isProgressStringPainted()
          Returns true if the progress bar will render a string onto the representation of the progress bar.
 void removeChangeListener(nextapp.echo.event.ChangeListener l)
          Removes a ChangeListener from the ProgressBar.
 java.lang.Object set(java.lang.reflect.Field field, java.lang.Object newValue)
          Called to save the old value of a field, set in a new value and return the old value of a field.
 void setBorderColor(nextapp.echo.Color newBorderColor)
          Sets the border Color of the ProgressBar.
 void setBorderSize(int newBorderSize)
          Sets the border size of the ProgressBar.
 void setCompletedColor(nextapp.echo.Color newColor)
          Sets the completed Color of the ProgressBar.
 void setHeight(int newValue)
          Sets the height of the ProgressBar<
 void setMaximum(int n)
          Sets the model's maximum to n.
 void setMinimum(int n)
          Sets the model's minimum to n.
 void setModel(BoundedRangeModel newModel)
          Sets the data model used by the ProgressBar.
 void setNumberOfBlocks(int newValue)
          Sets the number of blocks used when displaying the ProgressBar<
 void setOrientation(int newOrientation)
          Sets the progress bar's orientation to newOrientation, which must be ProgressBar.ORIENTATION_VERTICAL or ProgressBar.ORIENTATION_HORIZONTAL.
 void setOrientation(int newOrientation, boolean flipWidthAndHeight)
          Sets the progress bar's orientation to newOrientation, which must be ProgressBar.ORIENTATION_VERTICAL or ProgressBar.ORIENTATION_HORIZONTAL.
 void setProgressString(java.lang.String s)
          Sets the value of the Progress String.
 void setProgressStringPainted(boolean b)
          Sets whether the progress bar will render a string.
 void setRenderer(ProgressBarRenderer newRenderer)
          Sets the renderer used by the ProgressBar.
 void setUncompletedColor(nextapp.echo.Color newColor)
          Sets the uncompleted Color of the ProgressBar.
 void setValue(int n)
          Sets the model's value to n.
 void setWidth(int newValue)
          Sets the width of the ProgressBar<
 java.lang.String toString()
           
 void validate()
          Validates this component.
 
Methods inherited from class echopoint.EchoPointComponent
getMouseCursor, getMouseCursorURI, getToolTipPopUp, getToolTipText, set, set, set, set, set, set, set, set, set, setEnabledAllChildren, setMouseCursor, setMouseCursorURI, setToolTipText
 
Methods inherited from class nextapp.echo.Component
add, add, addHierarchyListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getComponent, getComponentCount, getComponents, getEchoInstance, getFont, getForeground, getIdentifier, getLocale, getParent, indexOf, init, isAncestorOf, isEnabled, isRegistered, isShowing, isVisible, remove, remove, removeAll, removeHierarchyListener, removePropertyChangeListener, setBackground, setEnabled, setFont, setForeground, setIdentifier, setLocale, setVisible, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ORIENTATION_HORIZONTAL

public static final int ORIENTATION_HORIZONTAL
The orientation values for the the progress bar.

See Also:
Constant Field Values

ORIENTATION_VERTICAL

public static final int ORIENTATION_VERTICAL
See Also:
Constant Field Values

STYLE_BORDER_COLOR

public static final java.lang.String STYLE_BORDER_COLOR
A style constant for the Border Color property. Values of this key must be of type nextapp.echo.Color.

See Also:
Constant Field Values

STYLE_BORDER_SIZE

public static final java.lang.String STYLE_BORDER_SIZE
A style constant for the Border Size property. Values of this key must be of type Integer.

See Also:
Constant Field Values

STYLE_COMPLETED_COLOR

public static final java.lang.String STYLE_COMPLETED_COLOR
A style constant for the Completed Color property. Values of this key must be of type nextapp.echo.Color.

See Also:
Constant Field Values

STYLE_HEIGHT

public static final java.lang.String STYLE_HEIGHT
A style constant for the Height property. Values of this key must be of type int

See Also:
Constant Field Values

STYLE_MINIMUM

public static final java.lang.String STYLE_MINIMUM
A style constant for the Minimum property. Values of this key must be of type int

See Also:
Constant Field Values

STYLE_MAXIMUM

public static final java.lang.String STYLE_MAXIMUM
A style constant for the Maximum property. Values of this key must be of type int

See Also:
Constant Field Values

STYLE_NUMBER_OF_BLOCKS

public static final java.lang.String STYLE_NUMBER_OF_BLOCKS
A style constant for the Number Of Blocks property. Values of this key must be of type int

See Also:
Constant Field Values

STYLE_ORIENTATION

public static final java.lang.String STYLE_ORIENTATION
A style constant for the Orientation property. Values of this key must be of type int

See Also:
Constant Field Values

STYLE_PROGRESS_STRING

public static final java.lang.String STYLE_PROGRESS_STRING
A style constant for the Progress String property. Values of this key must be of type String

See Also:
Constant Field Values

STYLE_PROGRESS_STRING_PAINTED

public static final java.lang.String STYLE_PROGRESS_STRING_PAINTED
A style constant for the Progress String Painted property. Values of this key must be of type boolean

See Also:
Constant Field Values

STYLE_UNCOMPLETED_COLOR

public static final java.lang.String STYLE_UNCOMPLETED_COLOR
A style constant for the UnCompleted Color property. Values of this key must be of type nextapp.echo.Color.

See Also:
Constant Field Values

STYLE_VALUE

public static final java.lang.String STYLE_VALUE
A style constant for the Value property. Values of this key must be of type int

See Also:
Constant Field Values

STYLE_WIDTH

public static final java.lang.String STYLE_WIDTH
A style constant for the Width property. Values of this key must be of type int

See Also:
Constant Field Values

ORIENTATION_CHANGED_PROPERTY

public static final java.lang.String ORIENTATION_CHANGED_PROPERTY
Public property change names

See Also:
Constant Field Values

MODEL_CHANGED_PROPERTY

public static final java.lang.String MODEL_CHANGED_PROPERTY
See Also:
Constant Field Values

IMAGE_CHANGED_PROPERTY

public static final java.lang.String IMAGE_CHANGED_PROPERTY
See Also:
Constant Field Values

PROGRESS_STRING_CHANGED_PROPERTY

public static final java.lang.String PROGRESS_STRING_CHANGED_PROPERTY
See Also:
Constant Field Values

PROGRESS_STRING_PAINTED_CHANGED_PROPERTY

public static final java.lang.String PROGRESS_STRING_PAINTED_CHANGED_PROPERTY
See Also:
Constant Field Values

WIDTH_HEIGHT_CHANGED_PROPERTY

public static final java.lang.String WIDTH_HEIGHT_CHANGED_PROPERTY
See Also:
Constant Field Values

BORDER_COLOR_CHANGED_PROPERTY

public static final java.lang.String BORDER_COLOR_CHANGED_PROPERTY
See Also:
Constant Field Values

BORDER_SIZE_CHANGED_PROPERTY

public static final java.lang.String BORDER_SIZE_CHANGED_PROPERTY
See Also:
Constant Field Values

RENDER_CHANGED_PROPERTY

public static final java.lang.String RENDER_CHANGED_PROPERTY
See Also:
Constant Field Values

BLOCKS_CHANGED_PROPERTY

public static final java.lang.String BLOCKS_CHANGED_PROPERTY
See Also:
Constant Field Values

COLORS_CHANGED_PROPERTY

public static final java.lang.String COLORS_CHANGED_PROPERTY
See Also:
Constant Field Values

defaultMinimum

public static final int defaultMinimum
The default minimum for a progress bar is 0.

See Also:
Constant Field Values

defaultMaximum

public static final int defaultMaximum
The default maximum for a progress bar is 100.

See Also:
Constant Field Values

defaultOrientation

public static final int defaultOrientation
The default orientation for a progress bar is HORIZONTAL.

See Also:
Constant Field Values

defaultWidth

public static final int defaultWidth
The default width for a progress bar is 146 pixels.

See Also:
Constant Field Values

defaultHeight

public static final int defaultHeight
The default height for a progress bar is 30 pixels .

See Also:
Constant Field Values

orientation

protected int orientation
The orientation to display the progress bar. The default is HORIZONTAL.


model

protected BoundedRangeModel model
The data structure that holds the various values for the progress bar.


progressString

protected java.lang.String progressString
A optional Progress String that can be displayed on the progress bar. The default is null. Setting this to a non-null value does not imply that the String will be displayed.


paintString

protected boolean paintString
Whether to textually display a String on the progress bar. The default is false. Setting this to true will cause a textual display of the progress to de rendered on the progress bar. If the progressString is null, the percentage done to be displayed on the progress bar. If the progressString is non-null, it is rendered on the progress bar.


progressBarImage

protected nextapp.echo.ImageReference progressBarImage
This is our progress bar imaegt hat changes when ever the model changes.


width

protected int width
The width of the ProgressBar


height

protected int height
The height of the ProgressBar


borderSize

protected int borderSize
The border size of the ProgressBar


borderColor

protected nextapp.echo.Color borderColor
The border color of the ProgressBar


completedColor

protected nextapp.echo.Color completedColor
The completed color of the ProgressBar


uncompletedColor

protected nextapp.echo.Color uncompletedColor
The uncompleted color of the ProgressBar


renderer

protected ProgressBarRenderer renderer
The progress bar renderer


numberOfBlocks

protected int numberOfBlocks
The number of blocks shown in the progress bar


needsRedraw

protected boolean needsRedraw
An internal flag to control whether the component needs redrawing


changeEvent

protected transient nextapp.echo.event.ChangeEvent changeEvent
Only one ChangeEvent is needed per instance since the event's only interesting property is the immutable source, which is the progress bar.


changeListener

protected nextapp.echo.event.ChangeListener changeListener
Constructor Detail

ProgressBar

public ProgressBar()
Creates a horizontal progress bar. * The default orientation for progress bars is ProgressBar.HORIZONTAL.

By default, the ProgressString is set to null and the ProgressStringPainted is not painted.

Uses the defaultMinimum (0) and defaultMaximum (100). Uses the defaultMinimum for the initial value of the progress bar.


ProgressBar

public ProgressBar(int orient)
Creates a progress bar with the specified orientation, which can be either ProgressBar.VERTICAL or ProgressBar.HORIZONTAL.

By default, the ProgressString is set to null and the ProgressStringPainted is not painted.

Uses the defaultMinimum (0) and defaultMaximum (100). Uses the defaultMinimum for the initial value of the progress bar.


ProgressBar

public ProgressBar(int min,
                   int max)
Creates a horizontal progress bar, which is the default.

By default, the ProgressString is set to null and the ProgressStringPainted is not painted.

Uses the specified minimum and maximum. Uses the specified minimum for the initial value of the progress bar.


ProgressBar

public ProgressBar(int orient,
                   int min,
                   int max)
Creates a progress bar using the specified orientation, minimum, and maximum.

By default, the ProgressString is set to null and the ProgressStringPainted is not painted.

Sets the inital value of the progress bar to the specified minimum. The BoundedRangeModel that sits underneath the progress bar handles any issues that may arrise from improperly setting the minimum, value, and maximum on the progress bar.


ProgressBar

public ProgressBar(BoundedRangeModel newModel)
Creates a horizontal progress bar, the default orientation.

By default, the ProgressString is set to null and the ProgressStringPainted is not painted.

Uses the specified BoundedRangeModel which holds the minimum, value, and maximum.

Method Detail

addChangeListener

public void addChangeListener(nextapp.echo.event.ChangeListener l)
Adds a ChangeListener to the ProgressBar.

Parameters:
l - the ChangeListener to add

applyStyle

public void applyStyle(nextapp.echo.Style style)
Applies the provided style to the component. The base nextapp.echo.Component style names can be used as well.

Specified by:
applyStyle in interface MouseCursorable
Overrides:
applyStyle in class EchoPointComponent
See Also:
Component.applyStyle(nextapp.echo.Style)

createChangeListener

protected nextapp.echo.event.ChangeListener createChangeListener()
Subclasses that want to handle ChangeEvents differently can override this to return a subclass of ModelListener or another ChangeListener implementation.


fireStateChanged

protected void fireStateChanged()
Notify all listeners that have registered interest for notification on this event type.


getBorderColor

public nextapp.echo.Color getBorderColor()
Returns:
The Color of the ProgressBar's border.

getBorderSize

public int getBorderSize()
Returns:
The size of the ProgressBar's border.

getCompletedColor

public nextapp.echo.Color getCompletedColor()
Returns:
The Color of the ProgressBar's completed blocks.

getHeight

public int getHeight()
Returns height of the ProgressBar


getMaximum

public int getMaximum()
Returns the model's maximum value. By default, this is 100.

Returns:
an int -- the model's maximum

getMinimum

public int getMinimum()
Returns the model's minimum value. By default, this is 0.


getModel

public BoundedRangeModel getModel()
Returns the data model used by the ProgressBar.


getNumberOfBlocks

public int getNumberOfBlocks()
Returns:
The number of blocks used when displaying the ProgressBar.

getOrientation

public int getOrientation()
Returns ProgressBar.ORIENTATION_VERTICAL or ProgressBar.ORIENTATION_HORIZONTAL, depending on the orientation of the progress bar. The default orientation is ORIENTATION_HORIZONTAL.


getPercentComplete

public double getPercentComplete()
Returns the percentage/percent complete for the progress bar. Note that, as a double, this number is between 0.00 and 1.00.

Returns:
the percent complete for this progress bar.

getProgressBarImage

public nextapp.echo.ImageReference getProgressBarImage()
This returns the image used to represent the ProgressBar.

Notice that their is no setProgressBarImage() method. The internal image is updated whenever the model is changed.

This is done by making a call to the ProgressBarRenderer.drawProgressBar method, which subclasses can override to customise how the progress bar is drawn.


getProgressString

public java.lang.String getProgressString()
Returns the current value of the Progress String.


getRenderer

public ProgressBarRenderer getRenderer()
Returns the renderer used by the ProgressBar.


getUncompletedColor

public nextapp.echo.Color getUncompletedColor()
Returns:
The Color of the ProgressBar's uncompleted blocks.

getValue

public int getValue()
Returns the model's current value. The value is always between the model's minimum and maximum values, inclusive. By default, the value equals the minimum.


getWidth

public int getWidth()
Returns width of the ProgressBar


invalidate

public void invalidate()
Can be called to invalidate the ProgressBar so that it will redraw its internals when next rendered.


isProgressStringPainted

public boolean isProgressStringPainted()
Returns true if the progress bar will render a string onto the representation of the progress bar. Returns false if it will not do this rendering. The default is false - the progress bar does not draw the string by default.


removeChangeListener

public void removeChangeListener(nextapp.echo.event.ChangeListener l)
Removes a ChangeListener from the ProgressBar.

Parameters:
l - the ChangeListener to remove

setBorderColor

public void setBorderColor(nextapp.echo.Color newBorderColor)
Sets the border Color of the ProgressBar.
This methods fires a PropertyChangeEvent with a getPropertyName() value of ProgressBar.BORDER_COLOR_CHANGED_PROPERTY


setBorderSize

public void setBorderSize(int newBorderSize)
Sets the border size of the ProgressBar.
This methods fires a PropertyChangeEvent with a getPropertyName() value of ProgressBar.BORDER_SIZE_CHANGED_PROPERTY


setCompletedColor

public void setCompletedColor(nextapp.echo.Color newColor)
Sets the completed Color of the ProgressBar.
This methods fires a PropertyChangeEvent with a getPropertyName() value of ProgressBar.COLORS_CHANGED_PROPERTY


setHeight

public void setHeight(int newValue)
Sets the height of the ProgressBar<


setMaximum

public void setMaximum(int n)
Sets the model's maximum to n. The underlying BoundedRangeModel will handle any mathematical issues arrising from assigning faulty values.

Notifies any listeners if the data changes.


setMinimum

public void setMinimum(int n)
Sets the model's minimum to n.

The underlying BoundedRangeModel will handle any mathematical issues arrising from assigning faulty values.

Notifies any listeners if the data changes.


setModel

public void setModel(BoundedRangeModel newModel)
Sets the data model used by the ProgressBar.


setNumberOfBlocks

public void setNumberOfBlocks(int newValue)
Sets the number of blocks used when displaying the ProgressBar<


setOrientation

public void setOrientation(int newOrientation)
Sets the progress bar's orientation to newOrientation, which must be ProgressBar.ORIENTATION_VERTICAL or ProgressBar.ORIENTATION_HORIZONTAL. The default orientation is ORIENTATION_HORIZONTAL.


setOrientation

public void setOrientation(int newOrientation,
                           boolean flipWidthAndHeight)
Sets the progress bar's orientation to newOrientation, which must be ProgressBar.ORIENTATION_VERTICAL or ProgressBar.ORIENTATION_HORIZONTAL. The default orientation is ORIENTATION_HORIZONTAL.

If the flipWidthAndHeight parameter is true, then the width and height properties will be flipped around.


setProgressString

public void setProgressString(java.lang.String s)
Sets the value of the Progress String. By default, this String is set to null.


setProgressStringPainted

public void setProgressStringPainted(boolean b)
Sets whether the progress bar will render a string.


setRenderer

public void setRenderer(ProgressBarRenderer newRenderer)
Sets the renderer used by the ProgressBar.


setUncompletedColor

public void setUncompletedColor(nextapp.echo.Color newColor)
Sets the uncompleted Color of the ProgressBar.
This methods fires a PropertyChangeEvent with a getPropertyName() value of ProgressBar.COLORS_CHANGED_PROPERTY


setValue

public void setValue(int n)
Sets the model's value to n.

The underlying BoundedRangeModel will handle any mathematical issues arrising from assigning faulty values.

Notifies any listeners if the data changes.


setWidth

public void setWidth(int newValue)
Sets the width of the ProgressBar<


toString

public java.lang.String toString()

validate

public void validate()
Validates this component. This method will be called by the application container before the component is rendered. This method be overridden if the component needs to be updated before being rendered. Validation occurs from the top of the component hierarchy down.

Overrides:
validate in class EchoPointComponent
See Also:
Component.validate()

set

public java.lang.Object set(java.lang.reflect.Field field,
                            java.lang.Object newValue)
                     throws java.lang.Exception
Description copied from interface: ReflectionSetter
Called to save the old value of a field, set in a new value and return the old value of a field. This interface allows a field set operation to be "delegated" back into the class that has permission to perform the field set.

 public Object set(Field f, Object newValue) throws Exception {
      Object oldValue = f.get(this);
      f.set(this,newValue);
      return oldValue;
 }
 

Parameters:
field - - the field to be set
newValue - - the new value to be set
Returns:
the oldValue of the field
Throws:
java.lang.Exception
See Also:
ReflectionSetter.set(Field, Object)

EchoPoint
1.0