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.
-
IMAGE_CENTERED
- A constant indicating the image is to be centered in this panel.
-
IMAGE_NORMAL
- A constant indicating the image is to be drawn from the upper left corner of the panel.
-
IMAGE_SCALED_TO_FIT
- A constant indicating the image is to be scaled to fit this panel.
-
IMAGE_TILED
- A constant indicating the image is to be tiled in this panel.
-
imageStyle
- The style that the image will be displayed in.
-
symantec.itools.awt.ImagePanel()
- Constructs a default ImagePanel.
-
addPropertyChangeListener(PropertyChangeListener)
- Adds a listener for all event changes.
-
addVetoableChangeListener(VetoableChangeListener)
- Adds a vetoable listener for all event changes.
-
getImage()
- Returns the image being displayed in this panel.
-
getImageURL()
- Returns the URL of the image being displayed in this panel.
-
getStyle()
- Gets the current panel image style.
-
paint(Graphics)
- Paints this component using the given graphics context.
-
removePropertyChangeListener(PropertyChangeListener)
- Removes a listener for all event changes.
-
removeVetoableChangeListener(VetoableChangeListener)
- Removes a vetoable listener for all event changes.
-
setImageURL(URL)
- Sets the URL of the image to display in this panel.
-
setStyle(int)
- Sets the new panel image style.
IMAGE_CENTERED
public static final int IMAGE_CENTERED
- A constant indicating the image is to be centered in this panel.
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.
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.
IMAGE_TILED
public static final int IMAGE_TILED
- A constant indicating the image is to be tiled in this panel.
imageStyle
protected int imageStyle
- The style that the image will be displayed in.
ImagePanel
public ImagePanel()
- Constructs a default ImagePanel. By default the image will be tiled.
addPropertyChangeListener
public synchronized void addPropertyChangeListener(PropertyChangeListener listener)
- Adds a listener for all event changes.
- Parameters:
- listener - the listener to add.
- See Also:
- removePropertyChangeListener
addVetoableChangeListener
public synchronized void addVetoableChangeListener(VetoableChangeListener listener)
- Adds a vetoable listener for all event changes.
- Parameters:
- listener - the listener to add.
- See Also:
- removeVetoableChangeListener
getImage
public java.awt.Image getImage()
- Returns the image being displayed in this panel.
getImageURL
public java.net.URL getImageURL()
- Returns the URL of the image being displayed in this panel.
- See Also:
- setImageURL
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
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
removePropertyChangeListener
public synchronized void removePropertyChangeListener(PropertyChangeListener listener)
- Removes a listener for all event changes.
- Parameters:
- listener - the listener to remove.
- See Also:
- addPropertyChangeListener
removeVetoableChangeListener
public synchronized void removeVetoableChangeListener(VetoableChangeListener listener)
- Removes a vetoable listener for all event changes.
- Parameters:
- listener - the listener to remove.
- See Also:
- addVetoableChangeListener
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
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