|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.northwestern.at.utils.swing.icons.SmallIcons
public class SmallIcons
SmallIcons.
SmallIcons are small icons. The ".gif" files reside in a specified subdirectory of the package directory.
The SmallIcons class provides methods to manage and encapsulate
access to collections of small icons. See the Emoticons and
StarIcons classes for examples.
| Field Summary | |
|---|---|
protected javax.swing.ImageIcon[] |
icons
Icon cache. |
protected java.lang.String[] |
names
Small icon names. |
protected java.lang.String |
path
Path for icons. |
| Constructor Summary | |
|---|---|
protected |
SmallIcons(java.lang.String[] names,
java.lang.String path)
Create small icons accessor. |
| Method Summary | |
|---|---|
javax.swing.ImageIcon |
get(int index)
Gets an icon by index. |
javax.swing.ImageIcon |
get(java.lang.String name)
Gets an emoticon by name. |
int |
indexOf(javax.swing.ImageIcon icon)
Gets the index of an emoticon. |
javax.swing.JPopupMenu |
popup(java.awt.event.ActionListener listener)
Creates and returns a popup menu for all the emoticons. |
javax.swing.JPopupMenu |
popup(int[] order,
java.awt.event.ActionListener listener)
Creates and returns a popup menu for all the emoticons in a specified order. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String[] names
protected java.lang.String path
protected javax.swing.ImageIcon[] icons
| Constructor Detail |
|---|
protected SmallIcons(java.lang.String[] names,
java.lang.String path)
names - Names of icons.path - Class path to icons. | Method Detail |
|---|
public javax.swing.ImageIcon get(int index)
index - The index of the icon.
public javax.swing.ImageIcon get(java.lang.String name)
name - The emoticon name.
public javax.swing.JPopupMenu popup(java.awt.event.ActionListener listener)
listener - Shared action listener for all the menu items.
public javax.swing.JPopupMenu popup(int[] order,
java.awt.event.ActionListener listener)
order - An array of integer indexes in the order in which
the emoticons should appear in the menu.listener - Shared action listener for all the menu items.
public int indexOf(javax.swing.ImageIcon icon)
icon - The image icon.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||