uic.widgets.filechooser
Class FCImageIcon

java.lang.Object
  extended by javax.swing.ImageIcon
      extended by uic.widgets.filechooser.FCImageIcon
All Implemented Interfaces:
Serializable, Comparable, Accessible, Icon

public class FCImageIcon
extends ImageIcon
implements Comparable

Special image icon that holds file information. Image icon that holds: a file object system icon system description

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.ImageIcon
ImageIcon.AccessibleImageIcon
 
Field Summary
 
Fields inherited from class javax.swing.ImageIcon
component, tracker
 
Constructor Summary
FCImageIcon(File file, Icon icon, String description)
          Constructor.
FCImageIcon(File file, Image icon, String description)
          Constructor.
 
Method Summary
 int compareTo(Object o)
          Compared the filenames/types to make sorting possible.
 String getDescription()
          Returns system description.
 File getFile()
          Returns file this icon represents.
 int getIconHeight()
           
 int getIconWidth()
           
 void paintIcon(Component c, Graphics g, int x, int y)
          Overriden to paint the system icon
 
Methods inherited from class javax.swing.ImageIcon
getAccessibleContext, getImage, getImageLoadStatus, getImageObserver, loadImage, setDescription, setImage, setImageObserver, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FCImageIcon

public FCImageIcon(File file,
                   Icon icon,
                   String description)
Constructor.

Parameters:
file - the file this icon represents
icon - the system icon
description - system description of the file

FCImageIcon

public FCImageIcon(File file,
                   Image icon,
                   String description)
Constructor.

Parameters:
file - the file this icon represents
icon - the system icon
description - system description of the file
Method Detail

getIconHeight

public int getIconHeight()
Specified by:
getIconHeight in interface Icon
Overrides:
getIconHeight in class ImageIcon

getIconWidth

public int getIconWidth()
Specified by:
getIconWidth in interface Icon
Overrides:
getIconWidth in class ImageIcon

paintIcon

public void paintIcon(Component c,
                      Graphics g,
                      int x,
                      int y)
Overriden to paint the system icon

Specified by:
paintIcon in interface Icon
Overrides:
paintIcon in class ImageIcon

getFile

public File getFile()
Returns file this icon represents.

Returns:
file this icon represents

getDescription

public String getDescription()
Returns system description.

Overrides:
getDescription in class ImageIcon
Returns:
system description

compareTo

public int compareTo(Object o)
Compared the filenames/types to make sorting possible.

Specified by:
compareTo in interface Comparable


Copyright © 2002-2004 Thomas Zander Available under the Free Apache licence