Class symantec.itools.awt.ImageButton
All Packages  Class Hierarchy  This Package  Previous  Next  Index
  Class symantec.itools.awt.ImageButton
Object
   |
   +----Component
           |
           +----Canvas
                   |
                   +----ButtonBase
                           |
                           +----symantec.itools.awt.ImageButton
  -  public class ImageButton
  
-  extends ButtonBase
  
The ImageButton component is similar to a regular button except that it
 displays an image on the button's face. The image to use is specified with
 a URL.
 
 Use an ImageButton to:
 
 - · Display an image in a button instead of text.
 
 - · Generate a train of action events while the user presses the button.
 
 
 
  -  Version:
  
 -  1.1, August 5, 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.
  
 -  
	disabledImage
   -   The image displayed when the button is disabled
  
 -  
	enabledImage
   -   The normally displayed image
  
 -  
	errors
   -   Error strings.
  
 -  
	imageStyle
   -   Determines how to draw the image.
  
 -  
	imageURL
   -   The URL for the button's image
  
 -  
	pressedImage
   -   The image displayed when the button is pressed
 
  
  -  
	symantec.itools.awt.ImageButton()
   -   Constructs a new default ImageButton.
 
  
  -  
	addImageStyleListener(PropertyChangeListener)
   -   Adds a listener for the ImageStyle property changes.
  
 -  
	addImageStyleListener(VetoableChangeListener)
   -   Adds a vetoable listener for the ImageStyle property changes.
  
 -  
	addNotify()
   -   Tells this component that it has been added to a container.
  
 -  
	addPropertyChangeListener(PropertyChangeListener)
   -   Adds a listener for all event changes.
  
 -  
	addVetoableChangeListener(VetoableChangeListener)
   -   Adds a vetoable listener for all event changes.
  
 -  
	getCenterMode()
   -   
  
 -  
	getImageStyle()
   -   Gets the current panel image style.
  
 -  
	getImageURL()
   -   Returns the URL of the image being displayed in the button.
  
 -  
	getPreferredSize()
   -   Returns the recommended dimensions to properly display this component.
  
 -  
	getScaleMode()
   -   
  
 -  
	isCenterMode()
   -   
  
 -  
	isScaleMode()
   -   
  
 -  
	isValidImageStyle(int)
   -   Is the given image style valid for this button.
  
 -  
	removeImageStyleListener(PropertyChangeListener)
   -   Removes a listener for the ImageStyle property changes.
  
 -  
	removeImageStyleListener(VetoableChangeListener)
   -   Removes a vetoable listener for the ImageStyle property changes.
  
 -  
	removeNotify()
   -   Tells this component that it is being removed from a container.
  
 -  
	removePropertyChangeListener(PropertyChangeListener)
   -   Removes a listener for all event changes.
  
 -  
	removeVetoableChangeListener(VetoableChangeListener)
   -   Removes a vetoable listener for all event changes.
  
 -  
	setCenterMode(boolean)
   -   
  
 -  
	setImageStyle(int)
   -   Sets the new panel image style.
  
 -  
	setImageURL(URL)
   -   Sets the URL of the image to display in the button.
  
 -  
	setScaleMode(boolean)
   -   
  
 -  
	updateButtonImage()
   -   Draws the button in the buttonImage offscreen image.
 
  
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.
 
disabledImage
protected transient java.awt.Image disabledImage
  -  The image displayed when the button is disabled
 
enabledImage
protected transient java.awt.Image enabledImage
  -  The normally displayed image
 
errors
protected transient java.util.ResourceBundle errors
  -  Error strings.
 
imageStyle
protected int imageStyle
  -  Determines how to draw the image.
 
imageURL
protected java.net.URL imageURL
  -  The URL for the button's image
 
pressedImage
protected transient java.awt.Image pressedImage
  -  The image displayed when the button is pressed
 
  
ImageButton
public ImageButton()
  -  Constructs a new default ImageButton. Image scaling is off and center mode on.
  
 
 
  
addImageStyleListener
public synchronized void addImageStyleListener(PropertyChangeListener listener)
  -  Adds a listener for the ImageStyle property changes.
  
 
 
    -  Parameters:
    
 -  listener - the listener to add.
    
 -  See Also:
    
 -  removeImageStyleListener(java.beans.PropertyChangeListener)
  
 
 
 
addImageStyleListener
public synchronized void addImageStyleListener(VetoableChangeListener listener)
  -  Adds a vetoable listener for the ImageStyle property changes.
  
 
 
    -  Parameters:
    
 -  listener - the listener to add.
    
 -  See Also:
    
 -  removeImageStyleListener(java.beans.VetoableChangeListener)
  
 
 
 
addNotify
public synchronized void addNotify()
  -  Tells this component that it has been added to a container.
 This is a standard Java AWT method which gets called by the AWT when
 this component is added to a container. Typically, it is used to
 create this component's peer.
 It has been overridden here to hook-up event listeners.
  
 
 
    -  Overrides:
    
 -  addNotify in class ButtonBase
    
 -  See Also:
    
 -  removeNotify
  
 
 
 
addPropertyChangeListener
public synchronized void addPropertyChangeListener(PropertyChangeListener listener)
  -  Adds a listener for all event changes.
  
 
 
    -  Parameters:
    
 -  listener - the listener to add.
    
 -  Overrides:
    
 -  addPropertyChangeListener in class ButtonBase
    
 -  See Also:
    
 -  removePropertyChangeListener
  
 
 
 
addVetoableChangeListener
public synchronized void addVetoableChangeListener(VetoableChangeListener listener)
  -  Adds a vetoable listener for all event changes.
  
 
 
    -  Parameters:
    
 -  listener - the listener to add.
    
 -  Overrides:
    
 -  addVetoableChangeListener in class ButtonBase
    
 -  See Also:
    
 -  removeVetoableChangeListener
  
 
 
 
getCenterMode
public boolean getCenterMode()
-  Note: getCenterMode() is deprecated.
  
-  
  
 
 
    -  See Also:
    
 -  isCenterMode
  
 
 
  
getImageStyle
public int getImageStyle()
  -  Gets the current panel image style.
  
 
 
    -  Returns:
    
 -  the current panel image style, one of
 IMAGE_TILED, IMAGE_CENTERED, IMAGE_SCALED_TO_FIT, or IMAGE_NORMAL.
    
 -  See Also:
    
 -  setImageStyle, IMAGE_TILED, IMAGE_CENTERED, IMAGE_SCALED_TO_FIT
  
 
 
 
getImageURL
public java.net.URL getImageURL()
  -  Returns the URL of the image being displayed in the button.
  
 
 
    -  See Also:
    
 -  setImageURL
  
 
 
 
getPreferredSize
public java.awt.Dimension getPreferredSize()
  -  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.
  
 
 
    -  Overrides:
    
 -  getPreferredSize in class ButtonBase
  
 
 
 
getScaleMode
public boolean getScaleMode()
-  Note: getScaleMode() is deprecated.
  
-  
  
 
 
    -  See Also:
    
 -  isScaleMode
  
 
 
  
isCenterMode
public boolean isCenterMode()
-  Note: isCenterMode() is deprecated.
  
-  
  
 
 
    -  See Also:
    
 -  getImageStyle
  
 
 
  
isScaleMode
public boolean isScaleMode()
-  Note: isScaleMode() is deprecated.
  
-  
  
 
 
    -  See Also:
    
 -  getImageStyle
  
 
 
  
isValidImageStyle
public boolean isValidImageStyle(int i)
  -  Is the given image style valid for this button.
  
 
 
    -  Parameters:
    
 -  i - the given image style
    
 -  Returns:
    
 -  true if the given image style is acceptable, false if not.
  
 
 
 
removeImageStyleListener
public synchronized void removeImageStyleListener(PropertyChangeListener listener)
  -  Removes a listener for the ImageStyle property changes.
  
 
 
    -  Parameters:
    
 -  listener - the listener to remove.
    
 -  See Also:
    
 -  addImageStyleListener(java.beans.PropertyChangeListener)
  
 
 
 
removeImageStyleListener
public synchronized void removeImageStyleListener(VetoableChangeListener listener)
  -  Removes a vetoable listener for the ImageStyle property changes.
  
 
 
    -  Parameters:
    
 -  listener - the listener to remove.
    
 -  See Also:
    
 -  addImageStyleListener(java.beans.VetoableChangeListener)
  
 
 
 
removeNotify
public synchronized void removeNotify()
  -  Tells this component that it is being removed from a container.
 This is a standard Java AWT method which gets called by the AWT when
 this component is removed from a container. Typically, it is used to
 destroy the peers of this component and all its subcomponents.
 It has been overridden here to unhook event listeners.
  
 
 
    -  Overrides:
    
 -  removeNotify in class ButtonBase
    
 -  See Also:
    
 -  addNotify
  
 
 
 
removePropertyChangeListener
public synchronized void removePropertyChangeListener(PropertyChangeListener listener)
  -  Removes a listener for all event changes.
  
 
 
    -  Parameters:
    
 -  listener - the listener to remove.
    
 -  Overrides:
    
 -  removePropertyChangeListener in class ButtonBase
    
 -  See Also:
    
 -  addPropertyChangeListener
  
 
 
 
removeVetoableChangeListener
public synchronized void removeVetoableChangeListener(VetoableChangeListener listener)
  -  Removes a vetoable listener for all event changes.
  
 
 
    -  Parameters:
    
 -  listener - the listener to remove.
    
 -  Overrides:
    
 -  removeVetoableChangeListener in class ButtonBase
    
 -  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:
    
 -  setImageStyle
  
 
 
  
setImageStyle
public void setImageStyle(int newStyle) throws PropertyVetoException
  -  Sets the new panel image style.
  
 
 
    -  Parameters:
    
 -  newStyle - the new panel image style, one of
 IMAGE_TILED, IMAGE_CENTERED, IMAGE_SCALED_TO_FIT, or IMAGE_NORMAL.
    
 -  Throws: PropertyVetoException
    
 -   if the specified property value is unacceptable
    
 -  See Also:
    
 -  getImageStyle, IMAGE_TILED, IMAGE_CENTERED, IMAGE_SCALED_TO_FIT, IMAGE_NORMAL
  
 
 
 
setImageURL
public void setImageURL(URL u) throws PropertyVetoException
  -  Sets the URL of the image to display in the button.
  
 
 
    -  Parameters:
    
 -  u - the URL of the image to display
    
 -  Throws: PropertyVetoException
    
 -   if the specified property value is unacceptable
    
 -  See Also:
    
 -  getImageURL
  
 
 
 
setScaleMode
public void setScaleMode(boolean flag) throws PropertyVetoException
-  Note: setScaleMode() is deprecated.
  
-  
  
 
 
    -  Throws: PropertyVetoException
    
 -   if the specified property value is unacceptable
    
 -  See Also:
    
 -  setImageStyle
  
 
 
  
updateButtonImage
protected void updateButtonImage()
  -  Draws the button in the buttonImage offscreen image.
  
 
 
    -  Overrides:
    
 -  updateButtonImage in class ButtonBase
    
 -  See Also:
    
 -  updateButtonImage
  
 
 
 
All Packages  Class Hierarchy  This Package  Previous  Next  Index