All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface com.sgi.sysadm.ui.ItemTableColumnRenderer

public interface ItemTableColumnRenderer
An interface that describes how to render a particular column of an ItemTable and how to sort Items based on that column. The ItemTableColumnRenderer is used by the ItemTableController to render cells in ways that are not automatically handled by the ItemTableController. To use a ItemTableColumnRenderer, the programmer should set the METHOD resource to componentRenderer, stringRenderer, or richTextRenderer in the Category's property file and set the COLUMN_RENDERER property to a class that implements this interface. See the ItemTable documentation for more information

See Also:
ItemTableController, ItemTable, COLUMN_RENDERER, METHOD

Method Index

 o compareItemsForItemTable(Item, Item, String)
Compare two items based on a particular column.
 o getComponentForCellOfItemTable(Item, String, ItemTableContext)
Returns a JComponent that should be displayed for a particular Item in a particular column.
 o getRichTextForCellOfItemTable(Item, String, ItemTableContext)
Returns a String that should be displayed in a RichTextComponent in the table's cell for a particular Item in a particular column.
 o getStringForCellOfItemTable(Item, String, ItemTableContext)
Returns a string that represents the value of a particular Item in a particular column.

Methods

 o getStringForCellOfItemTable
 public abstract String getStringForCellOfItemTable(Item item,
                                                    String columnName,
                                                    ItemTableContext context)
Returns a string that represents the value of a particular Item in a particular column. The string will be displayed in a cell of an ItemTable.

Parameters:
item - The Item being rendered
columnName - The column containing the cell that needs to be rendered.
context - An ItemTableContext for use by the renderer
Returns:
A String representing the state of Item item that should be displayed in column columnName.
 o getComponentForCellOfItemTable
 public abstract JComponent getComponentForCellOfItemTable(Item item,
                                                           String columnName,
                                                           ItemTableContext context)
Returns a JComponent that should be displayed for a particular Item in a particular column. The component will be displayed in a cell of an ItemTable.

Parameters:
item - The Item being rendered
columnName - The column containing the cell that needs to be rendered.
context - An ItemTableContext for use by the renderer
Returns:
A JComponent representing the state of Item item that should be displayed in column columnName.
 o getRichTextForCellOfItemTable
 public abstract String getRichTextForCellOfItemTable(Item item,
                                                      String columnName,
                                                      ItemTableContext context)
Returns a String that should be displayed in a RichTextComponent in the table's cell for a particular Item in a particular column. The string will be used to create a RichTextComponent that will be displayed in an ItemTable. If desired, the string that is returned can contain HTML markup that describes a link to an ItemView, as created by ItemView's createURLToLaunch. In this case, the ItemTableController will automatically handle the user's click on the link.

Parameters:
item - The Item being rendered
columnName - The column containing the cell that needs to be rendered.
context - An ItemTableContext for use by the renderer
Returns:
A String representing the state of Item item that should be displayed in column columnName.
See Also:
createURLToLaunch
 o compareItemsForItemTable
 public abstract int compareItemsForItemTable(Item item1,
                                              Item item2,
                                              String columnName)
Compare two items based on a particular column. Returns

Parameters:
item1 - The first Item
item2 - The second Item
columnName - The column of the ItemTable to compare on.
Returns:
An integer

All Packages  Class Hierarchy  This Package  Previous  Next  Index