All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sgi.sysadm.ui.ItemView

java.lang.Object
   |
   +----com.sgi.sysadm.ui.ItemView

public class ItemView
extends Object
implements ItemViewProperties
A class that encapsulates an ItemView. An ItemView shows all the relevant information about a particular Item in a way that the user can understand. There are several sections to an ItemView:
Icon
Shown in the upper left corner of the ItemView. Typically, the Icon represents the type of Item being viewed, and perhaps the state of the Item.
Fields
Shown in the upper right corner of the ItemView. This section is a key/value section, and is designed to show information about the Item that can be represented by fairly short Strings.
Additional Info section
This section occupies the center of the ItemView. It is an optional section. This section is designed to show information about the Item that can't easily be represented as a single line of text. Examples include ItemTables, graphs, or additional icons. Any java component can be shown here.
TaskShelf section
This section occupies the bottom of the ItemView. It shows a TaskShelf that contains Tasks that make sense to perform with the displayed Item in the Item's current state.
To create an ItemView, you should first call the static createItemView to invoke the ItemViewFactory and instantiate an ItemView. It is then necessary to call setItem on the ItemView to tell the ItemView which Item to display.

To learn more about how to use resource files to define an ItemView, see the ItemViewController documentation. To learn how to control the overall look of the ItemView by setting various properties, look at the ItemViewProperties documentation.

See Also:
ItemViewFactory, ItemViewController, ItemViewProperties

Method Index

 o addItemViewLaunchRequestListener(ItemViewLaunchRequestListener)
Adds an ItemViewLaunchRequestListener that will be notified if a user requests that a ItemView be launched (such as be clicking on a hyperlink on the ItemView)
 o addTaskLaunchRequestListener(TaskLaunchRequestListener)
Adds a TaskLaunchRequestListener that will be notified if a user requests that a Task be launched (such as by clicking in a TaskShelf contained by this ItemView)
 o addTitleListener(TitleListener)
Adds a title Listener
 o createItemView(HostContext, String)
Creates an ItemView by invoking the ItemViewFactory
 o createURLToLaunch(String, String)
Creates a URL that can be used to launch an ItemView
 o destroy()
Destroys an ItemView so that it can be garbage collected.
 o getCategoryFromURL(String)
Gets the category out of a URL that was created with createURLToLaunch
 o getCategoryName()
Gets the full name of the Category displayed in the ItemView
 o getItemFromURL(String)
Gets the Item's name out of a URL that was created with createURLToLaunch
 o getItemSelector()
Gets the selector of the Item displayed in the ItemView
 o getItemViewContext()
Gets the ItemViewContext being used by the ItemView
 o getPanel()
Gets the JPanel that is actually containing the ItemView.
 o removeItemViewLaunchRequestListener(ItemViewLaunchRequestListener)
Removes an ItemViewLaunchRequestListener
 o removeTaskLaunchRequestListener(TaskLaunchRequestListener)
Removes a TaskLaunchRequestListener
 o removeTitleListener(TitleListener)
 o setItem(String)
Sets the Item to display in this ItemView

Methods

 o setItem
 public void setItem(String selector)
Sets the Item to display in this ItemView

Parameters:
selector - the selector of the Item to display
 o getItemSelector
 public String getItemSelector()
Gets the selector of the Item displayed in the ItemView

Returns:
The selector of the Item being displayed
 o getCategoryName
 public String getCategoryName()
Gets the full name of the Category displayed in the ItemView

Returns:
The name of the category being displayed
 o destroy
 public void destroy()
Destroys an ItemView so that it can be garbage collected.

 o getPanel
 public JPanel getPanel()
Gets the JPanel that is actually containing the ItemView.

Returns:
the JPanel
 o getItemViewContext
 public ItemViewContext getItemViewContext()
Gets the ItemViewContext being used by the ItemView

Returns:
the ItemViewContext
 o addTaskLaunchRequestListener
 public void addTaskLaunchRequestListener(TaskLaunchRequestListener listener)
Adds a TaskLaunchRequestListener that will be notified if a user requests that a Task be launched (such as by clicking in a TaskShelf contained by this ItemView)

Parameters:
listener - the TaskLaunchRequestListener to add
 o removeTaskLaunchRequestListener
 public void removeTaskLaunchRequestListener(TaskLaunchRequestListener listener)
Removes a TaskLaunchRequestListener

Parameters:
listener - the TaskLaunchRequestListener to remove
 o addItemViewLaunchRequestListener
 public void addItemViewLaunchRequestListener(ItemViewLaunchRequestListener listener)
Adds an ItemViewLaunchRequestListener that will be notified if a user requests that a ItemView be launched (such as be clicking on a hyperlink on the ItemView)

Parameters:
listener - the ItemViewLaunchRequestListener to add
 o removeItemViewLaunchRequestListener
 public void removeItemViewLaunchRequestListener(ItemViewLaunchRequestListener listener)
Removes an ItemViewLaunchRequestListener

Parameters:
listener - the ItemViewLaunchRequestListener to remove
 o addTitleListener
 public void addTitleListener(TitleListener listener)
Adds a title Listener

Parameters:
listener - The TitleListener that's notified when the title changes.
 o removeTitleListener
 public void removeTitleListener(TitleListener listener)
 o createItemView
 public static ItemView createItemView(HostContext hostContext,
                                       String categoryName) throws ItemViewException
Creates an ItemView by invoking the ItemViewFactory

Parameters:
hostContext - the hostContext to use
categoryName - the Category to use
Throws: ItemViewException
if there is an error while creating the ItemView.
 o createURLToLaunch
 public static String createURLToLaunch(String category,
                                        String item)
Creates a URL that can be used to launch an ItemView

Parameters:
category - The name of category that contains the item to view
item - The name of the item to view.
Returns:
A URL that contains category and item
 o getCategoryFromURL
 public static String getCategoryFromURL(String url)
Gets the category out of a URL that was created with createURLToLaunch

Parameters:
url - The string to extract the category from
Returns:
the name of the category
See Also:
createURLToLaunch
 o getItemFromURL
 public static String getItemFromURL(String url)
Gets the Item's name out of a URL that was created with createURLToLaunch

Parameters:
url - The string to extract the Item's name from
Returns:
the name of the item
See Also:
createURLToLaunch

All Packages  Class Hierarchy  This Package  Previous  Next  Index