Class sunsoft.jws.visual.rt.awt.ImageLabel
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sunsoft.jws.visual.rt.awt.ImageLabel

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Canvas
                   |
                   +----sunsoft.jws.visual.rt.awt.ImageLabel

public class ImageLabel
extends Canvas
An image label. It greys itself out when disabled.

Variable Index

 o defaultHeight
 o defaultWidth
 o disImg
The image to use when the component is disabled.
 o imgHeight
 o imgWidth
 o origImg
The original image set in the constructor or in setImage().
 o padWidth
 o upImg
The massaged image (after the win95 work-around.)

Constructor Index

 o ImageLabel(Image)
 o ImageLabel(Image, int, int)

Method Index

 o addNotify()
 o disable()
 o enable()
 o getDefaultHeight()
 o getDefaultWidth()
 o getImage()
 o getPadWidth()
 o imageUpdate(Image, int, int, int, int, int)
 o minimumSize()
 o paint(Graphics)
Draw the image in the center of the available area.
 o preferredSize()
 o setBackground(Color)
Overrides Component setBackground in order to redo the images, because of the transparent gif workaround and also because the disabled image relies on the background color.
 o setDefaultHeight(int)
 o setDefaultWidth(int)
 o setImage(Image)
 o setPadWidth(int)
 o update(Graphics)
By overriding update we insure that this component won't be completely cleared with the background color each time it's updated (while loading.) We'd like less flickering than that.
 o updateSize(int, int)
Figures out if this component needs to be resized.
 o updateWindow(Component)

Variables

 o origImg
  protected Image origImg
The original image set in the constructor or in setImage().
 o upImg
  protected Image upImg
The massaged image (after the win95 work-around.)
 o disImg
  protected Image disImg
The image to use when the component is disabled. This is the upImg stippled with the background color.
 o padWidth
  protected int padWidth
 o defaultWidth
  protected int defaultWidth
 o defaultHeight
  protected int defaultHeight
 o imgWidth
  protected int imgWidth
 o imgHeight
  protected int imgHeight

Constructors

 o ImageLabel
  public ImageLabel(Image img)
 o ImageLabel
  public ImageLabel(Image img,
                    int w,
                    int h)

Methods

 o setPadWidth
  public void setPadWidth(int w)
 o getPadWidth
  public int getPadWidth()
 o setDefaultWidth
  public void setDefaultWidth(int w)
 o getDefaultWidth
  public int getDefaultWidth()
 o setDefaultHeight
  public void setDefaultHeight(int h)
 o getDefaultHeight
  public int getDefaultHeight()
 o setImage
  public void setImage(Image img)
 o getImage
  public Image getImage()
 o minimumSize
  public Dimension minimumSize()
Overrides:
minimumSize in class Component
 o preferredSize
  public Dimension preferredSize()
Overrides:
preferredSize in class Component
 o setBackground
  public void setBackground(Color bg)
Overrides Component setBackground in order to redo the images, because of the transparent gif workaround and also because the disabled image relies on the background color.
Overrides:
setBackground in class Component
 o updateWindow
  protected void updateWindow(Component c)
 o updateSize
  protected void updateSize(int w,
                            int h)
Figures out if this component needs to be resized.
 o update
  public void update(Graphics g)
By overriding update we insure that this component won't be completely cleared with the background color each time it's updated (while loading.) We'd like less flickering than that.
Overrides:
update in class Component
 o paint
  public void paint(Graphics g)
Draw the image in the center of the available area. No background clearing is done here (that job belongs to update().)
Overrides:
paint in class Canvas
 o imageUpdate
  public boolean imageUpdate(Image img,
                             int flags,
                             int x,
                             int y,
                             int w,
                             int h)
Overrides:
imageUpdate in class Component
 o enable
  public void enable()
Overrides:
enable in class Component
 o disable
  public void disable()
Overrides:
disable in class Component
 o addNotify
  public void addNotify()
Overrides:
addNotify in class Canvas

All Packages  Class Hierarchy  This Package  Previous  Next  Index