Class symantec.itools.awt.ImagePanel
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class symantec.itools.awt.ImagePanel

Object
   |
   +----Component
           |
           +----Container
                   |
                   +----Panel
                           |
                           +----symantec.itools.awt.ImagePanel

public class ImagePanel
extends Panel
The ImagePanel component is similar to a regular panel except that it displays an image within the panel. The image to use is specified with a URL.


Variable Index

 o IMAGE_CENTERED
A constant indicating the image is to be centered in this panel.
 o IMAGE_NORMAL
A constant indicating the image is to be drawn from the upper left corner of the panel.
 o IMAGE_SCALED_TO_FIT
A constant indicating the image is to be scaled to fit this panel.
 o IMAGE_TILED
A constant indicating the image is to be tiled in this panel.
 o imageStyle
The style that the image will be displayed in.

Constructor Index

 o symantec.itools.awt.ImagePanel()
Constructs a default ImagePanel.

Method Index

 o addPropertyChangeListener(PropertyChangeListener)
Adds a listener for all event changes.
 o addVetoableChangeListener(VetoableChangeListener)
Adds a vetoable listener for all event changes.
 o getImage()
Returns the image being displayed in this panel.
 o getImageURL()
Returns the URL of the image being displayed in this panel.
 o getStyle()
Gets the current panel image style.
 o paint(Graphics)
Paints this component using the given graphics context.
 o removePropertyChangeListener(PropertyChangeListener)
Removes a listener for all event changes.
 o removeVetoableChangeListener(VetoableChangeListener)
Removes a vetoable listener for all event changes.
 o setImageURL(URL)
Sets the URL of the image to display in this panel.
 o setStyle(int)
Sets the new panel image style.

Variables

 o IMAGE_CENTERED
public static final int IMAGE_CENTERED
A constant indicating the image is to be centered in this panel.

 o IMAGE_NORMAL
public static final int IMAGE_NORMAL
A constant indicating the image is to be drawn from the upper left corner of the panel.

 o IMAGE_SCALED_TO_FIT
public static final int IMAGE_SCALED_TO_FIT
A constant indicating the image is to be scaled to fit this panel.

 o IMAGE_TILED
public static final int IMAGE_TILED
A constant indicating the image is to be tiled in this panel.

 o imageStyle
protected int imageStyle
The style that the image will be displayed in.

Constructors

 o ImagePanel
public ImagePanel()
Constructs a default ImagePanel. By default the image will be tiled.

Methods

 o addPropertyChangeListener
public synchronized void addPropertyChangeListener(PropertyChangeListener listener)
Adds a listener for all event changes.

Parameters:
listener - the listener to add.
See Also:
removePropertyChangeListener
 o addVetoableChangeListener
public synchronized void addVetoableChangeListener(VetoableChangeListener listener)
Adds a vetoable listener for all event changes.

Parameters:
listener - the listener to add.
See Also:
removeVetoableChangeListener
 o getImage
public java.awt.Image getImage()
Returns the image being displayed in this panel.

 o getImageURL
public java.net.URL getImageURL()
Returns the URL of the image being displayed in this panel.

See Also:
setImageURL
 o getStyle
public int getStyle()
Gets the current panel image style.

Returns:
the current panel image style, one of IMAGE_TILED, IMAGE_CENTERED, or IMAGE_SCALED_TO_FIT
See Also:
setStyle, IMAGE_TILED, IMAGE_CENTERED, IMAGE_SCALED_TO_FIT, IMAGE_NORMAL
 o paint
public void paint(Graphics g)
Paints this component using the given graphics context. This is a standard Java AWT method which typically gets called by the AWT to handle painting this component. It paints this component using the given graphics context. The graphics context clipping region is set to the bounding rectangle of this component and its [0,0] coordinate is this component's top-left corner.

Parameters:
g - the graphics context used for painting
Overrides:
paint in class Container
See Also:
repaint, update
 o removePropertyChangeListener
public synchronized void removePropertyChangeListener(PropertyChangeListener listener)
Removes a listener for all event changes.

Parameters:
listener - the listener to remove.
See Also:
addPropertyChangeListener
 o removeVetoableChangeListener
public synchronized void removeVetoableChangeListener(VetoableChangeListener listener)
Removes a vetoable listener for all event changes.

Parameters:
listener - the listener to remove.
See Also:
addVetoableChangeListener
 o setImageURL
public void setImageURL(URL url) throws PropertyVetoException
Sets the URL of the image to display in this panel.

Parameters:
url - the URL of the image to display
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
getImageURL
 o setStyle
public void setStyle(int newStyle) throws PropertyVetoException
Sets the new panel image style.

Parameters:
newStyle - the new panel image style, one of IMAGE_TILED, IMAGE_CENTERED, or IMAGE_SCALED_TO_FIT
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
getStyle, IMAGE_TILED, IMAGE_CENTERED, IMAGE_SCALED_TO_FIT, IMAGE_NORMAL

All Packages  Class Hierarchy  This Package  Previous  Next  Index