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
-
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)
-
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)
-
addTitleListener(TitleListener)
-
Adds a title Listener
-
createItemView(HostContext, String)
-
Creates an ItemView by invoking the ItemViewFactory
-
createURLToLaunch(String, String)
- Creates a URL that can be used to launch an ItemView
-
destroy()
- Destroys an ItemView so that it can be garbage collected.
-
getCategoryFromURL(String)
- Gets the category out of a URL that was created with
createURLToLaunch
-
getCategoryName()
- Gets the full name of the Category displayed in the ItemView
-
getItemFromURL(String)
- Gets the Item's name out of a URL that was created with
createURLToLaunch
-
getItemSelector()
- Gets the selector of the Item displayed in the ItemView
-
getItemViewContext()
- Gets the ItemViewContext being used by the ItemView
-
getPanel()
- Gets the JPanel that is actually containing the ItemView.
-
removeItemViewLaunchRequestListener(ItemViewLaunchRequestListener)
- Removes an ItemViewLaunchRequestListener
-
removeTaskLaunchRequestListener(TaskLaunchRequestListener)
- Removes a TaskLaunchRequestListener
-
removeTitleListener(TitleListener)
-
-
setItem(String)
- Sets the Item to display in this ItemView
setItem
public void setItem(String selector)
- Sets the Item to display in this ItemView
- Parameters:
- selector - the selector of the Item to display
getItemSelector
public String getItemSelector()
- Gets the selector of the Item displayed in the ItemView
- Returns:
- The selector of the Item being displayed
getCategoryName
public String getCategoryName()
- Gets the full name of the Category displayed in the ItemView
- Returns:
- The name of the category being displayed
destroy
public void destroy()
- Destroys an ItemView so that it can be garbage collected.
getPanel
public JPanel getPanel()
- Gets the JPanel that is actually containing the ItemView.
- Returns:
- the JPanel
getItemViewContext
public ItemViewContext getItemViewContext()
- Gets the ItemViewContext being used by the ItemView
- Returns:
- the ItemViewContext
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
removeTaskLaunchRequestListener
public void removeTaskLaunchRequestListener(TaskLaunchRequestListener listener)
- Removes a TaskLaunchRequestListener
- Parameters:
- listener - the TaskLaunchRequestListener to remove
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
removeItemViewLaunchRequestListener
public void removeItemViewLaunchRequestListener(ItemViewLaunchRequestListener listener)
- Removes an ItemViewLaunchRequestListener
- Parameters:
- listener - the ItemViewLaunchRequestListener to remove
addTitleListener
public void addTitleListener(TitleListener listener)
- Adds a title Listener
- Parameters:
- listener - The TitleListener that's notified when the
title changes.
removeTitleListener
public void removeTitleListener(TitleListener listener)
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.
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
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
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