|
JFormDesigner 5.0.4 Runtime API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jformdesigner.model.SwingIcon
public class SwingIcon
Used to specify a javax.swing.Icon
.
The icon is either loaded from the classpath using
new ImageIcon(classLoader.getResource(name))
,
from the file system using new ImageIcon(name)
or from the current look and feel using UIManager.getIcon(name)
.
Field Summary | |
---|---|
static int |
CLASSPATH
|
static int |
FILE
|
static int |
SWING
|
Constructor Summary | |
---|---|
SwingIcon(int type,
java.lang.String name)
Constructs a icon. |
Method Summary | |
---|---|
javax.swing.Icon |
createIcon(java.lang.ClassLoader loader)
For internal use only. |
boolean |
equals(java.lang.Object obj)
Determines whether another object is equal to this object. |
int |
getIconHeight()
|
int |
getIconWidth()
|
java.lang.String |
getName()
Returns the icon name. |
int |
getType()
Returns the icon type ( CLASSPATH , FILE or SWING ). |
int |
hashCode()
Returns the hash code for this object. |
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
|
java.lang.String |
toString()
Returns a string representation of the object. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int CLASSPATH
public static final int FILE
public static final int SWING
Constructor Detail |
---|
public SwingIcon(int type, java.lang.String name)
type
- The icon type (CLASSPATH
, FILE
or SWING
).name
- The icon name.
A resource name (see java.lang.ClassLoader.getResource(String)
)
if type is CLASSPATH
, a file name (see javax.swing.ImageIcon(String)
)
if type is FILE
or a key (see javax.swing.UIManager.getIcon(String)
)
if type is SWING
.Method Detail |
---|
public int getType()
CLASSPATH
, FILE
or SWING
).
public java.lang.String getName()
CLASSPATH
,
a file name if type is FILE
or
a key if type is SWING
.
public javax.swing.Icon createIcon(java.lang.ClassLoader loader)
public int getIconWidth()
getIconWidth
in interface javax.swing.Icon
public int getIconHeight()
getIconHeight
in interface javax.swing.Icon
public void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
paintIcon
in interface javax.swing.Icon
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
JFormDesigner 5.0.4 Runtime API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |