com.ibm.as400.resource
Class Presentation

java.lang.Object
  |
  +--com.ibm.as400.resource.Presentation
All Implemented Interfaces:
java.io.Serializable

public class Presentation
extends java.lang.Object
implements java.io.Serializable

The Presentation class represents presentation information that describes an object. This may include description text, help text, and icons. In addition, customized information can also be stored.

See Also:
Serialized Form

Field Summary
static java.lang.String DESCRIPTION_TEXT
          Constant indicating the presentation key for description text.
static java.lang.String FULL_NAME
          Constant indicating the presentation key for full name.
static java.lang.String HELP_TEXT
          Constant indicating the presentation key for help text.
static java.lang.String ICON_COLOR_16x16
          Constant indicating the presentation key for a 16x16 color icon.
static java.lang.String ICON_COLOR_32x32
          Constant indicating the presentation key for a 32x32 color icon.
static java.lang.String NAME
          Constant indicating the presentation key for abbreviated name.
 
Constructor Summary
Presentation()
          Constructs a Presentation object.
Presentation(java.lang.String name)
          Constructs a Presentation object.
Presentation(java.lang.String name, java.lang.String fullName)
          Constructs a Presentation object.
 
Method Summary
 java.lang.String getFullName()
          Returns the full name.
 java.lang.String getName()
          Returns the abbreviated name.
 java.lang.Object getValue(java.lang.Object key)
          Returns a presentation value.
 void setFullName(java.lang.String fullName)
          Sets the full name.
 void setName(java.lang.String name)
          Sets the abbreviated name.
 void setValue(java.lang.Object key, java.lang.Object value)
          Sets a presentation value.
 java.lang.String toString()
          Returns the abbreviated name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NAME

public static final java.lang.String NAME
Constant indicating the presentation key for abbreviated name.

FULL_NAME

public static final java.lang.String FULL_NAME
Constant indicating the presentation key for full name.

DESCRIPTION_TEXT

public static final java.lang.String DESCRIPTION_TEXT
Constant indicating the presentation key for description text. If avaliable, this represents a String value.

HELP_TEXT

public static final java.lang.String HELP_TEXT
Constant indicating the presentation key for help text. If avaliable, this represents a String value.

ICON_COLOR_16x16

public static final java.lang.String ICON_COLOR_16x16
Constant indicating the presentation key for a 16x16 color icon. If avaliable, this represents a java.awt.Image value.

ICON_COLOR_32x32

public static final java.lang.String ICON_COLOR_32x32
Constant indicating the presentation key for a 32x32 color icon. If avaliable, this represents a java.awt.Image value.
Constructor Detail

Presentation

public Presentation()
Constructs a Presentation object.

Presentation

public Presentation(java.lang.String name)
Constructs a Presentation object.
Parameters:
name - The abbreviated name.

Presentation

public Presentation(java.lang.String name,
                    java.lang.String fullName)
Constructs a Presentation object.
Parameters:
name - The abbreviated name.
fullName - The full name.
Method Detail

getFullName

public java.lang.String getFullName()
Returns the full name. The length of the full name is usually greater than or equal to the abbreviated name.
Returns:
The full name if a full name has been set, or the abbreviated name if a full name has not been set.

getName

public java.lang.String getName()
Returns the abbreviated name. The length of the abbreviated name is usually less than or equal to the full name.
Returns:
The abbreviated name.

getValue

public java.lang.Object getValue(java.lang.Object key)
Returns a presentation value.
Parameters:
key - The presentation key.
Returns:
The presentation value, or null if no value for the key is set.

setFullName

public void setFullName(java.lang.String fullName)
Sets the full name. The length of the full name is usually greater than or equal to the abbreviated name.
Parameters:
fullName - The full name.

setName

public void setName(java.lang.String name)
Sets the abbreviated name. The length of the abbreviated name is usually less than or equal to the full name.
Parameters:
name - The abbreviated name.

setValue

public void setValue(java.lang.Object key,
                     java.lang.Object value)
Sets a presentation value.
Parameters:
key - The presentation key.
value - The presentation value.

toString

public java.lang.String toString()
Returns the abbreviated name.
Overrides:
toString in class java.lang.Object
Returns:
The abbreviated name.