Package com.ms.ui |
![]() Previous |
![]() Contents |
![]() Index |
![]() Next |
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.
public UIStateItem();Create a static item control with no image or text and set its justification to CENTERED.
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.
Parameter Description image Image to be displayed by control. text Text to be displayed by control.
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.
Parameter Description image Image to be displayed by control. text Text to be displayed by control. justify Justification used when arranging content within control.
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.
Parameter Description 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.
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.
Parameter Description 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.
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.
Parameter Description 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.
public void enable(boolean on);Enables or disables the control.
Return Value:
No return value.
Parameter Description on If true, the control is enabled; otherwise, the control is disabled.
public Image getDisabledImage();Retrieves the image used when the item is disabled.
Return Value:
Returns the disabled image.
public Image getHotImage();Retrieves the image used when the item is hot.
Return Value:
Returns the hot image.
public void setDisabledImage(Image imDis);Sets the image used when the item is disabled.
Return Value:
No return value.
Parameter Description imDis Image used when item is disabled.
public void setHot(boolean on);Sets or clears the hot-tracked state of the control.
Return Value:
No return value.
Parameter Description on If true, the hot-tracked state is set; otherwise, it is cleared.
public void setHotImage(Image imHot);Sets the image used when the item is hot.
Return Value:
No return value.
Parameter Description imHot Image used when item is hot.
© 1997 Microsoft Corporation. All rights reserved. Legal Notices.