|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.genuine.resources.ResourceItem
A resource item encapsulates all available information about a resource, i.e. its name, description, icon, tool tip, etc.
Constructor Summary | |
(package private) |
ResourceItem(java.lang.String name)
Creates a new instance with all attributes set to default values |
Method Summary | |
(package private) void |
addProperty(java.lang.String propertyName,
java.lang.String value)
Sets a property for this resource item. |
java.util.List |
getChoices()
Returns a list of String objects that define other resource items
to be used, for example, as buttons in a message box. |
javax.swing.ImageIcon |
getImage()
Returns an image if one is defined for this resource item, null otherwise. |
javax.swing.KeyStroke |
getKeyStroke()
Returns the KeyStroke instance to be used as accelerator for this resource item if one is defined, null otherwise. |
javax.swing.ImageIcon |
getLargeImage()
Returns a large image if one is defined for this resource item, null otherwise. |
int |
getMnemonic()
Returns a character that is used as mnemonic. |
java.lang.String |
getName()
Returns the name of the resource item with which it can be fetched. |
java.lang.String |
getText()
Returns the text of this resource item if one is defined, an empty string otherwise. |
java.lang.String |
getTitle()
Returns the title of this resource item that is used as title for the application window or for message boxes. |
java.lang.String |
getTooltip()
Returns the tool tip for this resource item if one is defined, an empty string otherwise. |
java.lang.String |
getType()
Returns the type of this resource item. |
java.lang.String |
toString()
Prints its text. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
ResourceItem(java.lang.String name)
name
- The name of the resource item as defined in a property bundleMethod Detail |
void addProperty(java.lang.String propertyName, java.lang.String value)
See ResourceManager
for a list of valid properties.
If the text contains an ampersand character, the charactor following the ampersand is used as mnemonic.
public java.lang.String getName()
public javax.swing.ImageIcon getImage()
public javax.swing.ImageIcon getLargeImage()
public javax.swing.KeyStroke getKeyStroke()
public java.lang.String getText()
public int getMnemonic()
public java.lang.String getTooltip()
public java.lang.String getTitle()
public java.lang.String getType()
MessageResourceItem
public java.util.List getChoices()
String
objects that define other resource items
to be used, for example, as buttons in a message box.
MessageResourceItem
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |