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

Class UIStateItem

Constructors , Methods

public class UIStateItem extends UIItem
{
  // Constructors
  public UIStateItem();								
  public UIStateItem(Image image, String text);
  public UIStateItem(Image image, String text, int justify);
  public UIStateItem(Image im, String s, int justify, int style);
  public UIStateItem(Image im, Image imHot, String s, int justify, int style);
  public UIStateItem(Image im, Image imHot, Image imDis, String s, 
                     int justify, int style);

  // 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 item object.


Constructors


UIStateItem

public UIStateItem();

Create a static item control with no image or text and set its justification to CENTERED.


UIStateItem

public UIStateItem(Image image, String text);

Create a static item control containing the specified image and text and set its justification to CENTERED and its image position to ONLEFT.

ParameterDescription
image Image to be displayed by control.
text Text to be displayed by control.


UIStateItem

public UIStateItem(Image image, String text, int justify);

Create a static item control containing the specified image and text with the specified justification and set its image position to ONLEFT.

ParameterDescription
image Image to be displayed by control.
text Text to be displayed by control.
justify Justification used when arranging content within control.


UIStateItem

public UIStateItem(Image im, String s, int justify, int style);

Create a static item control containing the specified image and text, with the specified justification, and with the specified image position.

ParameterDescription
im The image to be displayed by control.
s The text to be displayed by control.
justify The justification used when arranging content within control.
style The style of the static item control. Specify one of the following values: UIItem.ONLEFT, UIItem.ABOVE, or UIItem.FIRSTLINE.


UIStateItem

public UIStateItem(Image im, Image imHot, String s, int justify, 
                   int style);

Create a static item control containing the specified images and text, with the specified justification, and with the specified style.

ParameterDescription
im The image displayed by control when not a hot item.
imHot The image displayed by control when hot item.
s The text to be displayed by control.
justify The justification used when arranging content within control.
style The style of the static item control. Specify one of the following values: UIItem.ONLEFT, UIItem.ABOVE, or UIItem.FIRSTLINE.


UIStateItem

public UIStateItem(Image im, Image imHot, Image imDis, String s, 
                   int justify, int style);

Create a static item control containing the specified images and text, with the specified justification, and with the specified style.

ParameterDescription
im The image displayed by control when not a hot item.
imHot The image displayed by control when hot item.
imDis The image displayed by control when disabled.
s The text to be displayed by control.
justify The justification used when arranging content within control.
style The style of the static item control. Specify one of the following values: UIItem.ONLEFT, UIItem.ABOVE, or UIItem.FIRSTLINE.


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 item is disabled.

Return Value:

Returns the disabled image.


getHotImage

public Image getHotImage();

Retrieves the image used when the item is hot.

Return Value:

Returns the hot image.


setDisabledImage

public void setDisabledImage(Image imDis);

Sets the image used when the item is disabled.

Return Value:

No return value.

ParameterDescription
imDis Image used when item 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 item is hot.

Return Value:

No return value.

ParameterDescription
imHot Image used when item is hot.



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