All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.dnd.ImageGlyph

java.lang.Object
   |
   +----com.ibm.dnd.ImageGlyph

public class ImageGlyph
extends Object
implements Serializable
This class contains images and provides some useful constructors to create it. This class reads an image with the help of MediaTracker.

See Also:
MediaTracker

Constructor Index

 o ImageGlyph()
This method creates ImageGlyph with a null image.
 o ImageGlyph(Class, String)
This method creates ImageGlyph by the anchor class and a relative path.
 o ImageGlyph(Image)
This method creates ImageGlyph by Image.
 o ImageGlyph(String)
This method creates ImageGlyph by an image filename.
 o ImageGlyph(String, boolean)
This method creates ImageGlyph by the image URL string representation.
 o ImageGlyph(URL)
This method creates ImageGlyph by URL.

Method Index

 o addPropertyChangeListener(PropertyChangeListener)
Registers a new listener of the PropertyChanged event.
 o equals(Object)
Compares two ImageGlyphs for equality.
 o getImage()
This method returns an image.
 o getImageName()
This method returns the image URL string representation.
 o getSerializeImage()
This method returns the serializeImage flag.
 o hashCode()
 o removePropertyChangeListener(PropertyChangeListener)
Removes a listener of the PropertyChanged event.
 o setImage(Image)
This method sets an image.
 o setSerializeImage(boolean)
This method sets the serializeImage flag.

Constructors

 o ImageGlyph
 public ImageGlyph()
This method creates ImageGlyph with a null image.

 o ImageGlyph
 public ImageGlyph(Image image)
This method creates ImageGlyph by Image.

Parameters:
image - java.awt.Image.
 o ImageGlyph
 public ImageGlyph(Class anchor,
                   String path)
This method creates ImageGlyph by the anchor class and a relative path.

Parameters:
anchor - anchor class.
path - relative path.
Throws: IllegalArgumentException
if anchor or path is null.
 o ImageGlyph
 public ImageGlyph(String filename)
This method creates ImageGlyph by an image filename.

Parameters:
filename - image filename.
Throws: IllegalArgumentException
if filename is null.
 o ImageGlyph
 public ImageGlyph(String string_url,
                   boolean flag)
This method creates ImageGlyph by the image URL string representation.

Parameters:
string_url - image URL string representation.
flag - serializeImage flag.
Throws: IllegalArgumentException
if string_url is null.
 o ImageGlyph
 public ImageGlyph(URL url)
This method creates ImageGlyph by URL.

Parameters:
url - relative URL.
Throws: IllegalArgumentException
if url is null.

Methods

 o addPropertyChangeListener
 public void addPropertyChangeListener(PropertyChangeListener l)
Registers a new listener of the PropertyChanged event.

Parameters:
l - reference to an object to be registered as a listener of the PropertyChanged event.
Throws: IllegalArgumentException
if l is null.
 o equals
 public boolean equals(Object obj)
Compares two ImageGlyphs for equality.

Parameters:
obj - reference object to be compared with.
Returns:
true if this object is the same as an object argument; false otherwise.
Overrides:
equals in class Object
 o getImage
 public Image getImage()
This method returns an image.

Returns:
image.
 o getImageName
 public String getImageName()
This method returns the image URL string representation.

Returns:
image URL string representation.
 o getSerializeImage
 public boolean getSerializeImage()
This method returns the serializeImage flag. If it is true, an image wrapped by this ImageGlyph, is serialized in the ImageGlyph serialization.

Returns:
serializeImage flag.
 o hashCode
 public int hashCode()
Returns:
int
Overrides:
hashCode in class Object
 o removePropertyChangeListener
 public void removePropertyChangeListener(PropertyChangeListener l)
Removes a listener of the PropertyChanged event.

Parameters:
l - reference to an object to be removed as a listener of the PropertyChanged event.
Throws: IllegalArgumentException
if l is null.
 o setImage
 public void setImage(Image img)
This method sets an image.

Parameters:
img - java.awt.Image.
 o setSerializeImage
 public void setSerializeImage(boolean flag)
This method sets the serializeImage flag. If it is true, an image wrapped by this ImageGlyph, is serialized in the ImageGlyph serialization.

Parameters:
flag - serializeImage flag.

All Packages  Class Hierarchy  This Package  Previous  Next  Index