Class symantec.itools.multimedia.ImageViewer
All Packages  Class Hierarchy  This Package  Previous  Next  Index
  Class symantec.itools.multimedia.ImageViewer
Object
   |
   +----Component
           |
           +----symantec.itools.multimedia.ImageViewer
  -  public class ImageViewer
  
-  extends Component
  
-  implements Serializable
   
ImageViewer component. Provides a platform-independent display of an Image.
  -  Version:
  
 -  1.1, August 4, 1997
  
 -  Author:
  
 -  Symantec
 
  
  -  
	IMAGE_CENTERED
   -   A constant indicating the image is to be centered in the size of this component.
  
 -  
	IMAGE_NORMAL
   -   A constant indicating the image is to be drawn normally in the upper left corner.
  
 -  
	IMAGE_SCALED_TO_FIT
   -   A constant indicating the image is to be scaled to fit the size of this component.
  
 -  
	IMAGE_TILED
   -   A constant indicating the image is to be tiled in the size of this component.
  
 -  
	errors
   -   Error strings.
  
 -  
	fileName
   -   Name of file, if any, associated with this image.
  
 -  
	image
   -   Image that this viewer is displaying.
  
 -  
	imageStyle
   -   Determines how to draw the image.
  
 -  
	url
   -   URL of the image being displayed.
 
  
  -  
	symantec.itools.multimedia.ImageViewer()
   -   Create default image viewer.
  
 -  
	symantec.itools.multimedia.ImageViewer(String)
   -   Crate image viewer with filename.
  
 -  
	symantec.itools.multimedia.ImageViewer(URL)
   -   Create image viewer with URL.
  
 -  
	symantec.itools.multimedia.ImageViewer(Image)
   -   Create image viewer with image.
 
  
  -  
	addPropertyChangeListener(PropertyChangeListener)
   -   Adds a listener for all event changes.
  
 -  
	addVetoableChangeListener(VetoableChangeListener)
   -   Adds a vetoable listener for all event changes.
  
 -  
	getCenterMode()
   -   
  
 -  
	getFileName()
   -   Obtain the filename associated with the current image.
  
 -  
	getImage()
   -   Obtain the image currently being displayed.
  
 -  
	getImageURL()
   -   Obtain the URL associated with the current image.
  
 -  
	getStyle()
   -   Gets the current panel image style.
  
 -  
	getURL()
   -   
  
 -  
	minimumSize()
   -   Returns the minimum dimensions to properly display this component.
  
 -  
	paint(Graphics)
   -   Paints this component using the given graphics context.
  
 -  
	preferredSize()
   -   Returns the recommended dimensions to properly display this component.
  
 -  
	removePropertyChangeListener(PropertyChangeListener)
   -   Removes a listener for all event changes.
  
 -  
	removeVetoableChangeListener(VetoableChangeListener)
   -   Removes a vetoable listener for all event changes.
  
 -  
	setCenterMode(boolean)
   -   
  
 -  
	setFileName(String)
   -   Specify or change the image filename.
  
 -  
	setImage(Image)
   -   Set or change the current image.
  
 -  
	setImageURL(URL)
   -   Specify or change the image URL.
  
 -  
	setStyle(int)
   -   Sets the new panel image style.
  
 -  
	setURL(URL)
   -   
 
  
IMAGE_CENTERED
public static final int IMAGE_CENTERED
  -  A constant indicating the image is to be centered in the size of this component.
 
IMAGE_NORMAL
public static final int IMAGE_NORMAL
  -  A constant indicating the image is to be drawn normally in the upper left corner.
 
IMAGE_SCALED_TO_FIT
public static final int IMAGE_SCALED_TO_FIT
  -  A constant indicating the image is to be scaled to fit the size of this component.
 
IMAGE_TILED
public static final int IMAGE_TILED
  -  A constant indicating the image is to be tiled in the size of this component.
 
errors
protected transient java.util.ResourceBundle errors
  -  Error strings.
 
fileName
protected java.lang.String fileName
  -  Name of file, if any, associated with this image.
 
image
protected transient java.awt.Image image
  -  Image that this viewer is displaying.
 
imageStyle
protected int imageStyle
  -  Determines how to draw the image.
 
url
protected java.net.URL url
  -  URL of the image being displayed.
 
  
ImageViewer
public ImageViewer()
  -  Create default image viewer.
  
 
 
ImageViewer
public ImageViewer(String str) throws MalformedURLException
  -  Crate image viewer with filename.  The specified filename is used as
 the image source.
  
 
 
    -  Parameters:
    
 -  str - name of file containing the image source
    
 -  Throws: MalformedURLException
    
 -  Thrown if URL cannot be generated from filename
  
 
 
 
ImageViewer
public ImageViewer(URL url)
  -  Create image viewer with URL.  The specified URL is used as
 the image source.
  
 
 
    -  Parameters:
    
 -  url - the URL of the image to be displayed
  
 
 
 
ImageViewer
public ImageViewer(Image img)
  -  Create image viewer with image.  The specified image is used as
 the image source
  
 
 
    -  Parameters:
    
 -  img - the image to be displayed
  
 
 
 
  
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener listener)
  -  Adds a listener for all event changes.
  
 
 
    -  Parameters:
    
 -  PropertyChangeListener - listener the listener to add.
    
 -  See Also:
    
 -  removePropertyChangeListener
  
 
 
 
addVetoableChangeListener
public void addVetoableChangeListener(VetoableChangeListener listener)
  -  Adds a vetoable listener for all event changes.
  
 
 
    -  Parameters:
    
 -  VetoableChangeListener - listener the listener to add.
    
 -  See Also:
    
 -  removeVetoableChangeListener
  
 
 
 
getCenterMode
public boolean getCenterMode()
-  Note: getCenterMode() is deprecated.
  
-  
  
 
 
    -  See Also:
    
 -  getStyle
  
 
 
  
getFileName
public java.lang.String getFileName()
  -  Obtain the filename associated with the current image.
  
 
 
    -  Returns:
    
 -  the name of the file, if any, associated with this image.  If
 no file is associated with this image, returns null
  
 
 
 
getImage
public java.awt.Image getImage()
  -  Obtain the image currently being displayed.
  
 
 
    -  Returns:
    
 -  the image currently displayed or null if no image
  
 
 
 
getImageURL
public java.net.URL getImageURL()
  -  Obtain the URL associated with the current image.  If the image
 was specified by file name, or URL, it will have a URL which
 indicates its source.  Images created using the constructor
 with an Image parameter will have no associated URL.
  
 
 
    -  Returns:
    
 -  the name of the URL, if any, associated with this image.  If
no URL is associated with this image, returns null
  
 
 
 
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
  
 
 
 
getURL
public java.net.URL getURL()
-  Note: getURL() is deprecated.
  
-  
  
 
 
    -  See Also:
    
 -  getImageURL
  
 
 
  
minimumSize
public java.awt.Dimension minimumSize()
  -  Returns the minimum dimensions to properly display this component.
 This is a standard Java AWT method which gets called to determine
 the minimum size of this component.
  
 
 
    -  Returns:
    
 -  If no image has been loaded, a dimension of 10 by 10 is returned.
          If an image has been loaded, the height and width of the image
          is returned.
    
 -  Overrides:
    
 -  minimumSize in class Component
    
 -  See Also:
    
 -  preferredSize
  
 
 
 
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 Component
    
 -  See Also:
    
 -  repaint, update
  
 
 
 
preferredSize
public java.awt.Dimension preferredSize()
  -  Returns the recommended dimensions to properly display this component.
 This is a standard Java AWT method which gets called to determine
 the recommended size of this component.
  
 
 
    -  Returns:
    
 -  If no image has been loaded, a dimension of 10 by 10 is returned.
          If an image has been loaded, the height and width of the image
          is returned.
    
 -  Overrides:
    
 -  preferredSize in class Component
    
 -  See Also:
    
 -  minimumSize
  
 
 
 
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)
  -  Removes a listener for all event changes.
  
 
 
    -  Parameters:
    
 -  PropertyChangeListener - listener the listener to remove.
    
 -  See Also:
    
 -  addPropertyChangeListener
  
 
 
 
removeVetoableChangeListener
public void removeVetoableChangeListener(VetoableChangeListener listener)
  -  Removes a vetoable listener for all event changes.
  
 
 
    -  Parameters:
    
 -  VetoableChangeListener - listener the listener to remove.
    
 -  See Also:
    
 -  addVetoableChangeListener
  
 
 
 
setCenterMode
public void setCenterMode(boolean flag) throws PropertyVetoException
-  Note: setCenterMode() is deprecated.
  
-  
  
 
 
    -  Throws: PropertyVetoException
    
 -   if the specified property value is unacceptable
    
 -  See Also:
    
 -  setStyle
  
 
 
  
setFileName
public void setFileName(String str) throws PropertyVetoException
  -  Specify or change the image filename.
  
 
 
    -  Parameters:
    
 -  str - name of file containing image source
    
 -  Throws: PropertyVetoException
    
 -   if the specified property value is unacceptable
  
 
 
 
setImage
public void setImage(Image img) throws PropertyVetoException
  -  Set or change the current image.  Call this method if you want to
 specify directly the image to display.
  
 
 
    -  Parameters:
    
 -  img - the image to be displayed
    
 -  Throws: PropertyVetoException
    
 -   if the specified property value is unacceptable
  
 
 
 
setImageURL
public void setImageURL(URL aUrl) throws PropertyVetoException
  -  Specify or change the image URL.
  
 
 
    -  Parameters:
    
 -  aUrl - the URL of the image to be displayed
    
 -  Throws: PropertyVetoException
    
 -   if the specified property value is unacceptable
  
 
 
 
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
  
 
 
 
setURL
public void setURL(URL aUrl) throws PropertyVetoException
-  Note: setURL() is deprecated.
  
-  
  
 
 
    -  Throws: PropertyVetoException
    
 -   if the specified property value is unacceptable
    
 -  See Also:
    
 -  setImageURL
  
 
 
  
All Packages  Class Hierarchy  This Package  Previous  Next  Index