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

Class UIStateGraphic

Constructors , Methods

public class UIStateGraphic extends UIGraphic
{
  // Constructors
  public UIStateGraphic();			
  public UIStateGraphic(Image image);
  public UIStateGraphic(Image im, int justify);
  public UIStateGraphic(Image im, Image imHot, int justify);
  public UIStateGraphic(Image im, Image imHot, Image imDis, int justify);

  // Methods
  public Image getDisabledImage();
  public Image getHotImage();
  public void setDisabledImage(Image imDis);
  public void setHotImage(Image imHot);

  public void setHot(boolean on);
  public void enable(boolean on);

}

A class that manages a static state graphic object.


Constructors


UIStateGraphic

public UIStateGraphic();

Creates a static graphic control with no image and sets its justification to CENTERED.


UIStateGraphic

public UIStateGraphic(Image image);

Creates a static graphic control containing the specified image and set its justification to CENTERED.

ParameterDescription
image The image to be displayed by control.


UIStateGraphic

public UIStateGraphic(Image im, int justify);

Creates a static graphic control containing the specified image with the specified justification.

ParameterDescription
im The image to be displayed by control.
justify The justification used when arranging image within control.


UIStateGraphic

public UIStateGraphic(Image im, Image imHot, int justify);

Creates a static graphic control containing the specified normal image and hot image with the specified justification.

ParameterDescription
im The image to be displayed by control when not the hot item.
imHot The image to be displayed by control when it is the hot item.
justify The justification used when arranging image within control.


UIStateGraphic

public UIStateGraphic(Image im, Image imHot, Image imDis, int justify);

Creates a static graphic control containing the specified normal image, hot image, and disabled image with the specified justification.

ParameterDescription
im The image to be displayed by control when enabled and not the hot item.
imHot The image to be displayed by control when it is the hot item.
imHot The image to be displayed by control when it is disabled.
justify The justification used when arranging image within control.


Methods


enable

public void enable(boolean on);

Enables or disables the control.

Return Value:

No return value.

ParameterDescription
on If true, the control is enabled; otherwise, the control is disabled.


getDisabledImage

public Image getDisabledImage();

Retrieves the image used when the control is disabled.

Return Value:

Returns the disabled image.


getHotImage

public Image getHotImage();

Retrieves the image used when the control is hot.

Return Value:

Returns the hot image.


setDisabledImage

public void setDisabledImage(Image imDis);

Sets the image used when the control is disabled.

Return Value:

No return value.

ParameterDescription
imDis The image to be displayed by control when it is disabled.


setHot

public void setHot(boolean on);

Sets or clears the hot-tracked state of the control.

Return Value:

No return value.

ParameterDescription
on If true, the hot-tracked state is set; otherwise, it is cleared.


setHotImage

public void setHotImage(Image imHot);

Sets the image used when the control is hot.

Return Value:

No return value.

ParameterDescription
imHot The image to be displayed by control when it is the hot item.



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