Public Member Functions | |
JMultiIconLabel () | |
JMultiIconLabel (String[] resourceNames) | |
JMultiIconLabel (String[] resourceNames, int horizontalAlignement) | |
JMultiIconLabel (javax.swing.Icon[] icons) | |
JMultiIconLabel (javax.swing.Icon[] icons, int horizontalAlignment) | |
void | addIcon (String resourceName) |
void | addIcon (javax.swing.Icon icon) |
void | addIcons (String[] resourceNames) |
void | addIcons (Icon[] icons) |
Icon | getIconByIndex (int index) |
void | setIconByIndex (int index) |
Protected Member Functions | |
Icon | loadFromResource (String resourceName) |
Private Attributes | |
final java.util.Vector | iconList = new java.util.Vector() |
javax.swing.JLabel
so that it allows display of multiple icons. It maintains internal list of icons that associates integer values with Icon
objects. This index is guaranteed to be valid even if the desired icon could not be found, is not valid or is null. In such cases the corresponding icon will not be displayed.
Icons can be provided by either the calling class via the javax.swing.Icon
object or they can be loaded from the projects resource automatically. Two methods are provided to add the icons: addIcon, addIcons
The later is preffered when adding multiple icons at the same time.
Use the setIconByIndex
method to set which icon should be displayed.
The disabled state icon of the JLabel is not overriden and can be still specified.
Creation date: (12/24/2001 15:57:21)
|
Default constructor for JMultiIconLabel. |
|
Constructs a JMultiIconLabel and loads the icons from the specified resource names.
|
|
Constructs a JMultiIconLabel and loads the icons from the specified resource names. Also sets the horizontal alignement of the text.
|
|
Constructs a JMultiIconLabel and adds the icons to the icon list.
|
|
Constructs a JMultiIconLabel and adds the icons to the icon list. Also sets the horizontal alignement of the text.
|
|
Appends the icon to the list of icons. Creation date: (12/24/2001 16:02:13)
|
|
Appends the icon specified by resourceName to the end of internal list of icons. This method calls addIcon(Icon) and loadFromResource(String). If resourceName does not exist in the projects resources, method adds empty icon. Creation date: (12/24/2001 16:14:15)
|
|
Appends all icons specified by icons parameter to the internal list of icons. For adding multiple icons, this method outperforms individual calls to After calling this method, the list of icons will grow by the size of the array, regardless of its contentrs. If any of the icons is null or of invalid type, the associated icon will not be displayed. Creation date: (12/24/2001 16:17:36)
|
|
Appends all icons specified by resourceNames to the end of internal list of icons. For adding multiple icons, this method outperforms individual calls to After calling this method, the list of icons will grow by the size of the array, regardless of its contentrs. If any of the icons is null or of invalid type, the associated icon will not be displayed. Creation date: (12/24/2001 16:21:36)
|
|
Returns the Icon resource assigned to the specified index. If the icon has not been defined, returns null. Creation date: (12/24/2001 16:10:44)
|
|
Loads the Icon from the projects resource. Returns null if the resource does not exist. Creation date: (12/24/2001 16:04:52)
|
|
Displays the icon specified by index. If the icon with this index has not been defined, no icon will be displayed. Creation date: (12/24/2001 16:09:33)
|
|
|