public abstract class IconSize extends Object implements Serializable
To create a non-default icon size, subclass IconSize as follows:
IconSize CUSTOM_48X52 = new IconSize(48, 52) { }and optionally override readResolve to support serialization.
Modifier and Type | Field and Description |
---|---|
static IconSize |
DEFAULT_128X128
Default 128x128 icon size.
|
static IconSize |
DEFAULT_16X16
Default 16x16 icon size.
|
static IconSize |
DEFAULT_24X24
Default 24x24 icon size.
|
static IconSize |
DEFAULT_32X32
Default 32x32 icon size.
|
static IconSize |
DEFAULT_48X48
Default 48x48 icon size.
|
static IconSize |
DEFAULT_64X64
Default 64x64 icon size.
|
static IconSize |
DEFAULT_96X96
Default 96x96 icon size.
|
static List |
VALUES
Public list of default enumeration values.
|
Modifier | Constructor and Description |
---|---|
protected |
IconSize(int width,
int height)
Create a new icon size with the specified width
and height.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o)
Override equals and make it final to prevent
subclasses from changing the implementation.
|
int |
getHeight()
Return the icon height.
|
int |
getWidth()
Return the icon width.
|
int |
hashCode()
Override hashCode and make it final to prevent
subclasses from changing the implementation.
|
(package private) Object |
readResolve()
Override readResolve to return the proper static
final enumeration values.
|
String |
toString()
Return the string value of
width + "x" + height . |
public static final IconSize DEFAULT_16X16
public static final IconSize DEFAULT_24X24
public static final IconSize DEFAULT_32X32
public static final IconSize DEFAULT_48X48
public static final IconSize DEFAULT_64X64
public static final IconSize DEFAULT_96X96
public static final IconSize DEFAULT_128X128
public static final List VALUES
protected IconSize(int width, int height)
width
- icon widthheight
- icon heightpublic final String toString()
width + "x" + height
.public final int getWidth()
public final int getHeight()
public final boolean equals(Object o)
public final int hashCode()
Object readResolve() throws ObjectStreamException
ObjectStreamException
- if an error occursCopyright (c) 2003-2013 held jointly by the individual authors. Licensed under the GNU Lesser General Public License (LGPL).