Package com.ms.ui |
![]() Previous |
![]() Contents |
![]() Index |
![]() Next |
public class UIGraphic extends UIStatic { // Constructors public UIGraphic(); public UIGraphic(Image image); public UIGraphic(Image image, int justify); // Methods public Image getImage(); public void setImage(Image image); public boolean imageUpdate(Image image, int flags, int x, int y, int width, int height); public int getRoleCode(); public Dimension minimumSize(); public void paint(Graphics g, Rectangle rect); }
A class that manages a static graphic control object, used to display graphical information.
public UIGraphic();Creates a graphic control with no image and a justification of centered.
public UIGraphic(Image image);Creates a graphic control with a specified image and a justification of centered.
Parameter Description image The image to be displayed.
public UIGraphic(Image image, int justify);Creates a graphic control with a specified image and justification.
Parameter Description image The image to be displayed. justify The justification used when arranging content within the control. For a description of valid justification values, see the UIStatic class fields (Fields).
public boolean imageUpdate(Image image, int flags, int x, int y, int width, int height);Updates the image displayed by the control.
Return Value:
Returns false if the image passed is not the image displayed by the control.
Parameter Description image The image displayed by the control. flags Flags that specify information about the image update. You can pass any bitwise combination of the fields defined in the ImageObserver interface. x The x coordinate for the clipping rectangle used by this graphics context. y The y coordinate for the clipping rectange used by this graphics context. width The width of the clipping rectangle. height The height of the clipping rectangle.
public Image getImage();Retrieves the image that is displayed by the control.
Return Value:
Returns the control's Image object.
public int getRoleCode();Retrieves the role of the graphic control.
Return Value:
Returns the ROLE_SYSTEM code that best describes the role of the control.
Remarks:
This method returns the ROLE_SYSTEM_GRAPHIC code.
public Dimension minimumSize();Retrieves the minimum size of the graphic control.
Return Value:
Returns the minimum size.
Overrides:
Overrides minimumSize in class UIStatic.
public void paint(Graphics g, Rectangle rect);Repaints the graphic control within the specified rectangle.
Return Value:
No return value.
Parameter Description g The graphics context. Rectangle The rectangle to paint the graphics in. Overrides:
Overrides Paint in class UIStatic.
public void setImage(Image image);Sets the image that is displayed by the control.
Return Value:
No return value.
Parameter Description image The image to be displayed.
© 1997 Microsoft Corporation. All rights reserved. Legal Notices.