All Packages Class Hierarchy This Package Previous Next Index
Class com.sgi.sysadm.ui.ItemFinderState
java.lang.Object
|
+----com.sgi.sysadm.ui.ItemFinderState
- public class ItemFinderState
- extends Object
A class that represents the state of an ItemFinder
-
HEADER
- This is the reason that will be returned returned by
getReasons if the name selected is a header.
-
NO_ITEM_CHOSEN
-
This is a reason that will be returned by
getReasonsif the text field of the ItemFinder is blank.
-
NO_SUCH_ITEM
- This is a reason that will be returned by getReasons
if the user has typed in a name of an object that the
ItemFinder doesn't know about.
-
getItem()
- Returns the Item that is currently selected.
-
getReasons()
- Returns the reason that getItem returned null.
-
getText()
- Returns the text that is currently displayed in the ItemFinder.
NO_SUCH_ITEM
public static final Object NO_SUCH_ITEM
- This is a reason that will be returned by getReasons
if the user has typed in a name of an object that the
ItemFinder doesn't know about.
NO_ITEM_CHOSEN
public static final Object NO_ITEM_CHOSEN
- This is a reason that will be returned by
getReasonsif the text field of the ItemFinder is blank.
HEADER
public static final Object HEADER
- This is the reason that will be returned returned by
getReasons if the name selected is a header.
getItem
public Item getItem()
- Returns the Item that is currently selected. Can be null if
the user has typed text that does not identify a known Item
or if the ItemFinder's ItemFilter has rejected the Item whose
name the user typed.
- Returns:
- The Item that is selected.
getText
public String getText()
- Returns the text that is currently displayed in the ItemFinder.
- Returns:
- A String that contains the current text in the text area.
getReasons
public Object[] getReasons()
- Returns the reason that getItem returned null. It can
be one of the constants NO_SUCH_ITEM,
NO_ITEM_CHOSEN, or HEADER, which means that the
ItemFinder does not know of any Item that matches the current
selection, or it can be an Object that the ItemTester has
returned that tells why the ItemTester rejected the Item.
An assertion will be thrown if this method is called when
getItem would have returned a non-null Item.
- Returns:
- An array of Objects representing the reason that
getItem returned null. To understand why there can be
multiple reasons, consider the following situation - There
could be several Items in the Category with the same display
name, each of which is being filtered out for a different
reason. If the user types that name
into the ItemFinder, then for each of the Items, a reason will
be returned. The reasons returned are specific to the
ItemTester, and there should be agreement between the client of
getReasons and the ItemTester about the meaning of the reasons.
All Packages Class Hierarchy This Package Previous Next Index