All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.as400.ui.framework.java.ItemDescriptor

java.lang.Object
   |
   +----com.ibm.as400.ui.framework.java.ItemDescriptor

public class ItemDescriptor
extends Object
implements SwingConstants
Describes an item in a list. ItemDescriptors represent objects on a user interface panel, as displayed in a list or table.


Constructor Index

 o ItemDescriptor()
Constructs an ItemDescriptor.
 o ItemDescriptor(String, String)
Constructs an ItemDescriptor with the specified name and title.
 o ItemDescriptor(String, String, HandlerTask[])
Constructs an ItemDescriptor with the specified name, title, and HandlerTask list.
 o ItemDescriptor(String, String, String)
Constructs an ItemDescriptor with the specified name, title and image file.
 o ItemDescriptor(String, String, String, int, int)
Constructs an ItemDescriptor with the specified name, title, image file, and icon alignment.

Method Index

 o addHandlerTask(HandlerTask)
Adds a HandlerTask to the item.
 o getHorizontalIconPosition()
Returns the item's horizontal icon position.
 o getImageFile()
Returns the item's image file name.
 o getName()
Returns the item name.
 o getTitle()
Returns the item title.
 o getVerticalIconPosition()
Returns the item's vertical icon position.
 o removeHandlerTask(HandlerTask)
Removes a HandlerTask from the item.
 o setHorizontalIconPosition(int)
Sets the item's horizontal icon position.
 o setImageFile(String)
Sets the item's image file name.
 o setName(String)
Sets the item name.
 o setTitle(String)
Sets the item title.
 o setVerticalIconPosition(int)
Sets the item's vertical icon position.
 o toString()
Returns a string representation of the item.

Constructors

 o ItemDescriptor
 public ItemDescriptor()
Constructs an ItemDescriptor.

 o ItemDescriptor
 public ItemDescriptor(String name,
                       String title)
Constructs an ItemDescriptor with the specified name and title.

Parameters:
name - the name that is used to identify the item programmatically
title - the title of the item in a form suitable for displaying to the user
 o ItemDescriptor
 public ItemDescriptor(String name,
                       String title,
                       String imageFile)
Constructs an ItemDescriptor with the specified name, title and image file. Default icon position of LEFT and vertical icon position of CENTER will be used.

Parameters:
name - the name that is used to identify the item programmatically
title - the title of the item in a form suitable for displaying to the user
 o ItemDescriptor
 public ItemDescriptor(String name,
                       String title,
                       String imageFile,
                       int iconPosition,
                       int vIconPosition)
Constructs an ItemDescriptor with the specified name, title, image file, and icon alignment.

Parameters:
name - the name that is used to identify the item programmatically
title - the title of the item in a form suitable for displaying to the user
 o ItemDescriptor
 public ItemDescriptor(String name,
                       String title,
                       HandlerTask handlerTasks[])
Constructs an ItemDescriptor with the specified name, title, and HandlerTask list.

Parameters:
name - the name that is used to identify the item programmatically
title - the title of the item in a form suitable for displaying to the user
handlerTasks - a list of HandlerTasks which describe to the UI framework actions which should be carried out when the item is selected
See Also:
HandlerTask

Methods

 o getName
 public String getName()
Returns the item name.

Returns:
a string which is used to identify the item programmatically
See Also:
setName
 o setName
 public void setName(String name)
Sets the item name.

Parameters:
name - a string which is used to identify the item programmatically
See Also:
getName
 o getTitle
 public String getTitle()
Returns the item title.

Returns:
the string which is displayed to the user
See Also:
setTitle
 o setTitle
 public void setTitle(String title)
Sets the item title.

Parameters:
title - the string which is displayed to the user
See Also:
getTitle
 o getImageFile
 public String getImageFile()
Returns the item's image file name.

Returns:
the name of the image resource that will be used to create the icon for the item
See Also:
setImageFile
 o setImageFile
 public void setImageFile(String imageFile)
Sets the item's image file name.

Parameters:
imageFile - the name of the image resource that will be used to create the icon for the item
See Also:
getImageFile
 o getHorizontalIconPosition
 public int getHorizontalIconPosition()
Returns the item's horizontal icon position.

Returns:
the horizontal position of the icon for the item
See Also:
setHorizontalIconPosition
 o setHorizontalIconPosition
 public void setHorizontalIconPosition(int horizontalIconPosition)
Sets the item's horizontal icon position.

Parameters:
horizontalIconPosition - the horizontal position of the icon for the item
See Also:
getHorizontalIconPosition
 o getVerticalIconPosition
 public int getVerticalIconPosition()
Returns the item's vertical icon position.

Returns:
the vertical position of the icon for the item
See Also:
setVerticalIconPosition
 o setVerticalIconPosition
 public void setVerticalIconPosition(int verticalIconPosition)
Sets the item's vertical icon position.

Parameters:
verticalIconPosition - the vertical position of the icon for the item
See Also:
getVerticalIconPosition
 o addHandlerTask
 public void addHandlerTask(HandlerTask task)
Adds a HandlerTask to the item. A HandlerTask is an action that should be performed by the UI framework when the item is selected.

Parameters:
task - the task to be performed
See Also:
removeHandlerTask, HandlerTask
 o removeHandlerTask
 public void removeHandlerTask(HandlerTask task)
Removes a HandlerTask from the item. If the specified HandlerTask is not associated with the item, no action occurs.

Parameters:
task - the task to be removed
See Also:
addHandlerTask, HandlerTask
 o toString
 public String toString()
Returns a string representation of the item. The string is in a form suitable for displaying to the user.

Returns:
the item as a string
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index