org.cumt.misc
Class ModelIcon

java.lang.Object
  extended by org.cumt.misc.ModelIcon
All Implemented Interfaces:
java.io.Serializable, javax.swing.Icon

public class ModelIcon
extends java.lang.Object
implements javax.swing.Icon, java.io.Serializable

Icon used in model objets. This is more serialization-friendly due buffered images are not serializable.

Author:
Carlos Descalzi
See Also:
Serialized Form

Constructor Summary
ModelIcon()
           
 
Method Summary
 java.lang.Object clone()
           
static ModelIcon fromImage(java.net.URL location)
           
 int getIconHeight()
           
 int getIconWidth()
           
 java.net.URL getUrl()
           
 void paintIcon(java.awt.Component component, java.awt.Graphics g, int x, int y)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelIcon

public ModelIcon()
Method Detail

fromImage

public static ModelIcon fromImage(java.net.URL location)
                           throws java.io.IOException
Throws:
java.io.IOException

paintIcon

public void paintIcon(java.awt.Component component,
                      java.awt.Graphics g,
                      int x,
                      int y)
Specified by:
paintIcon in interface javax.swing.Icon

getIconWidth

public int getIconWidth()
Specified by:
getIconWidth in interface javax.swing.Icon

getIconHeight

public int getIconHeight()
Specified by:
getIconHeight in interface javax.swing.Icon

getUrl

public java.net.URL getUrl()

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object


Copyright © 2006 null. All Rights Reserved.