org.geotools.legend
Class ReIcon

java.lang.Object
  extended by org.geotools.legend.ReIcon

public class ReIcon
extends java.lang.Object

Quick utility class used to "resize" an icon.

Author:
Jody Garnett

Constructor Summary
ReIcon(javax.swing.Icon icon)
           
 
Method Summary
 javax.swing.Icon getIcon()
           
 javax.swing.Icon getIcon(int size)
          Produce an icon of the required size.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReIcon

public ReIcon(javax.swing.Icon icon)
Method Detail

getIcon

public javax.swing.Icon getIcon()

getIcon

public javax.swing.Icon getIcon(int size)
Produce an icon of the required size.

The returned icon is not always an ImageIcon; and may in fact pay attention to your component foreground and background color.

Parameters:
size - Size of the icon (usually 16,32 and 48 are supported)
Returns:
A square icon of the requested size


Copyright © 1996-2010 Geotools. All Rights Reserved.