All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class dtai.gwt.ImageGadget

java.lang.Object
   |
   +----dtai.gwt.Gadget
           |
           +----dtai.gwt.DisplayGadget
                   |
                   +----dtai.gwt.LabelGadget
                           |
                           +----dtai.gwt.ImageGadget

public class ImageGadget
extends LabelGadget
ImageGadget is a subclass of LabelGadget. If the image is null, then the label is displayed instead. The label is initialized to the empty string (""), but you might want to set it to something like "No Image".


Constructor Index

 o ImageGadget()
constructs a Button with no label.
 o ImageGadget(Image)
Constructs an ImageGadget with the specified image.

Method Index

 o getBlackToForeground()
getBlackToForeground
 o getDefaultWaitForImage()
 o getImage()
Gets the label of the button.
 o getWaitForImage()
getWaitForImage
 o imageUpdate(Image, int, int, int, int, int)
Repaints the component when the image has changed.
 o isPossiblyDisabled()
isPossiblyDisabled
 o isStretched()
isStretched
 o isTiled()
isTiled
 o paintDisabledForeground(GadgetGraphics, int, int, int, int)
paintDisabledForeground
 o paintForeground(GadgetGraphics, int, int, int, int)
paints the foreground
 o resetForegroundSize(GadgetGraphics)
resets the size of the foreground
 o setBlackToForeground(boolean)
Set this to true if you want the black pixels to be converted to the current foreground color.
 o setDefaultWaitForImage(boolean)
 o setDisabledImage(Image)
setDisabledImage
 o setImage(Image)
sets the button with the specified image.
 o setPossiblyDisabled(boolean)
setPossiblyDisabled
 o setStretched(boolean)
setStretched
 o setTiled(boolean)
setTiled
 o setWaitForImage(boolean)
setWaitForImage

Constructors

 o ImageGadget
 public ImageGadget()
constructs a Button with no label.

 o ImageGadget
 public ImageGadget(Image image)
Constructs an ImageGadget with the specified image.

Parameters:
image - - the image to display

Methods

 o setDefaultWaitForImage
 public static void setDefaultWaitForImage(boolean defaultWaitForImage)
 o getDefaultWaitForImage
 public static boolean getDefaultWaitForImage()
 o getImage
 public Image getImage()
Gets the label of the button.

Returns:
Image
See Also:
setLabel
 o isPossiblyDisabled
 public boolean isPossiblyDisabled()
isPossiblyDisabled

Returns:
boolean
Overrides:
isPossiblyDisabled in class LabelGadget
See Also:
setWrapLength
 o setPossiblyDisabled
 public void setPossiblyDisabled(boolean possiblyDisabled)
setPossiblyDisabled

Parameters:
possiblyDisabled - - TBD
Overrides:
setPossiblyDisabled in class LabelGadget
 o getWaitForImage
 public boolean getWaitForImage()
getWaitForImage

Returns:
boolean
See Also:
setWrapLength
 o setWaitForImage
 public void setWaitForImage(boolean waitForImage)
setWaitForImage

Parameters:
waitForImage - - TBD
 o setBlackToForeground
 public void setBlackToForeground(boolean blackToForeground)
Set this to true if you want the black pixels to be converted to the current foreground color.

Parameters:
blackToForeground - - TBD
 o getBlackToForeground
 public boolean getBlackToForeground()
getBlackToForeground

Returns:
boolean
 o setTiled
 public void setTiled(boolean tiled)
setTiled

Parameters:
tiled - - TBD
 o isTiled
 public boolean isTiled()
isTiled

Returns:
boolean
 o setStretched
 public void setStretched(boolean stretched)
setStretched

Parameters:
stretched - - TBD
 o isStretched
 public boolean isStretched()
isStretched

Returns:
boolean
 o setImage
 public void setImage(Image image)
sets the button with the specified image.

Parameters:
image - - the image to set the button with
See Also:
getImage
 o setDisabledImage
 public void setDisabledImage(Image disabledImage)
setDisabledImage

Parameters:
disabledImage - - TBD
 o paintForeground
 protected void paintForeground(GadgetGraphics g,
                                int x,
                                int y,
                                int width,
                                int height)
paints the foreground

Parameters:
g - - TBD
x - - TBD
y - - TBD
width - - TBD
height - - TBD
Overrides:
paintForeground in class LabelGadget
 o paintDisabledForeground
 protected void paintDisabledForeground(GadgetGraphics g,
                                        int x,
                                        int y,
                                        int width,
                                        int height)
paintDisabledForeground

Parameters:
g - - TBD
x - - TBD
y - - TBD
width - - TBD
height - - TBD
Overrides:
paintDisabledForeground in class LabelGadget
 o resetForegroundSize
 protected void resetForegroundSize(GadgetGraphics g)
resets the size of the foreground

Parameters:
g - - TBD
Overrides:
resetForegroundSize in class LabelGadget
 o imageUpdate
 public boolean imageUpdate(Image img,
                            int flags,
                            int x,
                            int y,
                            int w,
                            int h)
Repaints the component when the image has changed.

Returns:
true if image has changed; false otherwise.
Overrides:
imageUpdate in class Gadget

All Packages  Class Hierarchy  This Package  Previous  Next  Index