charvax.swing
Class JProgressBar

java.lang.Object
  extended bycharva.awt.Component
      extended bycharvax.swing.JComponent
          extended bycharvax.swing.JProgressBar

public class JProgressBar
extends JComponent

A component that displays an integer value within a bounded interval. A progress bar is typically used to indicate the progress of some task by displaying a percentage of completion and possibly a textual display of this percentage.


Field Summary
protected  boolean _indeterminate
           
protected  java.lang.Thread _indeterminateThread
           
protected  int _maximum
           
protected  int _minimum
           
protected  java.lang.String _string
           
protected  boolean _stringPainted
           
protected  int _value
           
protected  int _width
          The length of this component on the screen.
 
Fields inherited from class charvax.swing.JComponent
_border
 
Fields inherited from class charva.awt.Component
_alignmentX, _alignmentY, _background, _cursesColor, _enabled, _focusListeners, _foreground, _keyListeners, _origin, _parent, _visible, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
JProgressBar()
          Creates a horizontal progress bar that displays a border but no progress string.
JProgressBar(int min_, int max_)
          Creates a progress bar with the specified minimum and maximum values.
 
Method Summary
 void debug(int level_)
           
 void draw()
          Draws the border of the component (if there is one).
 void finalize()
           
 int getHeight()
           
 int getMaximum()
           
 int getMinimum()
           
 Dimension getSize()
          Get the screen size of the progress bar.
 java.lang.String getString()
          Returns the value of the progress string
 int getValue()
           
 int getWidth()
           
 boolean isFocusTraversable()
          This component will not receive focus when Tab or Shift-Tab is pressed.
 boolean isIndeterminate()
           
 boolean isStringPainted()
          Returns the value of the _stringPainted property
 Dimension minimumSize()
           
 void processKeyEvent(KeyEvent ke_)
          The JProgressBar class ignores key events.
 void requestFocus()
          The JProgressBar component never gets the keyboard input focus.
 void setIndeterminate(boolean newval)
           
 void setMaximum(int max_)
          Set the progress bar's maximum value.
 void setMinimum(int min_)
          Set the progress bar's minimum value.
 void setSize(Dimension size_)
          Set the size of the component on the screen.
 void setString(java.lang.String string_)
          Sets the value of the progress string
 void setStringPainted(boolean stringPainted_)
          Set the value of the _stringPainted property
 void setValue(int value_)
          Set the progress bar's value.
 
Methods inherited from class charvax.swing.JComponent
getBorder, getInsets, setBorder
 
Methods inherited from class charva.awt.Component
addFocusListener, addKeyListener, contains, contains, getAlignmentX, getAlignmentY, getAncestorWindow, getBackground, getBounds, getCursesColor, getForeground, getLocation, getLocationOnScreen, getName, getParent, hasFocus, hide, invalidate, isDisplayed, isEnabled, isTotallyObscured, isValid, isVisible, processEvent, processFocusEvent, processMouseEvent, repaint, requestSync, setBackground, setBounds, setBounds, setBounds, setEnabled, setForeground, setLocation, setLocation, setName, setParent, setVisible, show, validate, validateCursesColor
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_minimum

protected int _minimum

_value

protected int _value

_maximum

protected int _maximum

_stringPainted

protected boolean _stringPainted

_string

protected java.lang.String _string

_width

protected int _width
The length of this component on the screen.


_indeterminate

protected boolean _indeterminate

_indeterminateThread

protected java.lang.Thread _indeterminateThread
Constructor Detail

JProgressBar

public JProgressBar()
Creates a horizontal progress bar that displays a border but no progress string.


JProgressBar

public JProgressBar(int min_,
                    int max_)
Creates a progress bar with the specified minimum and maximum values.

Method Detail

setMinimum

public void setMinimum(int min_)
Set the progress bar's minimum value.


setValue

public void setValue(int value_)
Set the progress bar's value.


setMaximum

public void setMaximum(int max_)
Set the progress bar's maximum value.


setSize

public void setSize(Dimension size_)
Set the size of the component on the screen.


getSize

public Dimension getSize()
Get the screen size of the progress bar.

Specified by:
getSize in class Component

getWidth

public int getWidth()
Specified by:
getWidth in class Component

getHeight

public int getHeight()
Specified by:
getHeight in class Component

draw

public void draw()
Description copied from class: JComponent
Draws the border of the component (if there is one).

Overrides:
draw in class JComponent

isFocusTraversable

public boolean isFocusTraversable()
This component will not receive focus when Tab or Shift-Tab is pressed.

Overrides:
isFocusTraversable in class Component

processKeyEvent

public void processKeyEvent(KeyEvent ke_)
The JProgressBar class ignores key events. A JProgressBar should never have input focus anyway.

Overrides:
processKeyEvent in class Component

requestFocus

public void requestFocus()
The JProgressBar component never gets the keyboard input focus.

Overrides:
requestFocus in class Component

debug

public void debug(int level_)
Specified by:
debug in class Component

minimumSize

public Dimension minimumSize()
Specified by:
minimumSize in class Component

getMinimum

public int getMinimum()

getValue

public int getValue()

getMaximum

public int getMaximum()

isStringPainted

public boolean isStringPainted()
Returns the value of the _stringPainted property


setStringPainted

public void setStringPainted(boolean stringPainted_)
Set the value of the _stringPainted property


setString

public void setString(java.lang.String string_)
Sets the value of the progress string


setIndeterminate

public void setIndeterminate(boolean newval)

isIndeterminate

public boolean isIndeterminate()

getString

public java.lang.String getString()
Returns the value of the progress string


finalize

public void finalize()