Package com.ms.ui Previous
Previous
Contents
Contents
Index
Index
Next
Next

Class UIProgress

Constructors , Methods

public class UIProgress extends UIStatus
{
  // Constructors
  public UIProgress();
  public UIProgress(int range);
  public UIProgress(int range, int pos);

  // Methods
  public int getPos();
  public int getRange();
  public int getRoleCode();

  public void setPos(int pos);
  public void setRange(int range);

  public void paint(Graphics g);
  public void update(Graphics g);

}

A class that implements a progress monitoring control.


Constructors


UIProgress

public UIProgress();

Creates a progress control with a range of 100 and an initial position of 0.


UIProgress

public UIProgress(int range);

Creates a progress bar with the specified range and an initial position of 0.

ParameterDescription
range The range for the progress control.


UIProgress

public UIProgress(int range, int pos);

Creates a progress control with the specified range and the specified initial position.

ParameterDescription
range The range for the progress control.
pos The initial position for the progress control.


Methods


getPos

public int getPos();

Retrieves the current position of the progress control, relative to its range.

Return Value:

Returns the control's position.


getRange

public int getRange();

Retrieves the range of the progress control.

Return Value:

Returns the control's range.


getRoleCode

 public int getRoleCode();

Retrieves the role of the progress control.

Return Value:

Returns the ROLE_SYSTEM code that best describes the role of the control.

Remarks:

This method returns the ROLE_SYSTEM_PROGRESSBAR code.


paint

public void paint(Graphics g);

Draws the progress control.

Return Value:

No return value.

ParameterDescription
g The graphics context.


setPos

public void setPos(int pos);

Sets the position of the progress control, relative to its range.

Return Value:

No return value.

ParameterDescription
pos The new position for the progress control.


setRange

public void setRange(int range);

Sets the range of the progress control.

ParameterDescription
range The range for the progress control.


update

public void update(Graphics g);

Calls paint to draw the progress control.

Return Value:

No return value.

ParameterDescription
g The graphics context.



Top© 1997 Microsoft Corporation. All rights reserved. Legal Notices.