All Packages Class Hierarchy This Package Previous Next Index
Class com.sgi.sysadm.ui.GuidePage
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----javax.swing.JComponent
|
+----javax.swing.JPanel
|
+----com.sgi.sysadm.ui.RPanel
|
+----com.sgi.sysadm.ui.TaskPage
|
+----com.sgi.sysadm.ui.GuidePage
- public class GuidePage
- extends TaskPage
GuidePage is a TaskPage that is added to the Guide
interface of a Task. Each GuidePage instance has a name, which is
used to find the properties for the page icon, page title, and
optional introductory text.
For more information about writing Tasks in Rhino, see the
How to write a Task
tutorial.
- See Also:
- Task
-
DEFAULT_NUM_COLUMNS
- The resource GuidePage.numColumns
is an int that tells how to position the labels and components.
-
ICON
- The property {GuidePage name}.icon describes the
CLASSPATH relative name
of the icon image file to be
used on the named GuidePage.
-
INTRO_TEXT
- The property {GuidePage name}.introText is a String containing
the introductory text for the named GuidePage.
-
INTRO_TEXT_TRAVERSABLE
- The property {GuidePage name}.introText.traversable is a
Boolean that controls whether the RichTextArea created to
display the INTRO_TEXT is focus traversable.
-
TITLE
- The property {GuidePage name}.title is a String that is
used as the title of the GuidePage.
-
GuidePage(TaskContext, String)
- Constructor.
-
createUI()
- Called by the base class the first time this page is made visible.
-
getAllowTurnPageOnError()
- If this method returns true, then the infrastructure will
allow the user to see the next page of a Guide even if the
first page's verifiers failed.
-
getPageName()
- Get the name of this page.
-
okToAdvance(ResultListener)
- Call the verifier for this page to determine if it is OK to
advance to a subsequent page in the Guide.
-
requestFocus()
- Called when this GuidePage should get keyboard focus.
-
setAllowTurnPageOnError(boolean)
- Called to control the behavior of the Task when the user hits
the Next button but a verifier fails.
-
setVerifier(TaskDataVerifier)
- Set (or replace) the verifier that will be called by the Guide base
class when the user wants to advance to the next (or subsequent) page.
-
showPage()
- Tell this page it is being shown.
TITLE
public static final String TITLE
- The property {GuidePage name}.title is a String that is
used as the title of the GuidePage. This property must be defined in
either {package}.PackageP.properties or
{package}.{taskname}P.properties if the subclass calls super.createUI()
to set up the page.
ICON
public static final String ICON
- The property {GuidePage name}.icon describes the
CLASSPATH relative name
of the icon image file to be
used on the named GuidePage. If this property is not defined,
then the property Guide.ICON is used.
INTRO_TEXT
public static final String INTRO_TEXT
- The property {GuidePage name}.introText is a String containing
the introductory text for the named GuidePage. If this property exists,
the text will be displayed in a RichTextArea at the top of the
GuidePage.
If the introductory text on your GuidePage needs to
be dynamic (in other words, it can change based on User input or
system state), then you should not define this property and you
should add a RichTextArea component to your GuidePage.
- See Also:
- RichTextArea
INTRO_TEXT_TRAVERSABLE
public static final String INTRO_TEXT_TRAVERSABLE
- The property {GuidePage name}.introText.traversable is a
Boolean that controls whether the RichTextArea created to
display the INTRO_TEXT is focus traversable. This
property defaults to false if not present.
Setting INTRO_TEXT_TRAVERSAL to true is useful for a
GuidePage that contains no other Components. It prevents
keyboard focus from going to the Guide Buttons, which would
disable keyboard navigation of the Guide.
DEFAULT_NUM_COLUMNS
public static final String DEFAULT_NUM_COLUMNS
- The resource GuidePage.numColumns
is an int that tells how to position the labels and components.
This is the default that is used if NUM_COLUMNS is not found.
The options are:
- 1
- aligns the labels to the top of their components
- 2
- aligns the labels to the left of their components
GuidePage
public GuidePage(TaskContext taskContext,
String pageName)
- Constructor.
- Parameters:
- taskContext - The TaskContext associated with this page.
- pageName - Name for this page that is used to retrieve
properties such as the page title and page icon.
setAllowTurnPageOnError
public void setAllowTurnPageOnError(boolean okToTurnPage)
- Called to control the behavior of the Task when the user hits
the Next button but a verifier fails. If true is
passed, then the error dialog will have a button that allows
them to browse to the next page anyway. If true is
passed, then the error dialog will only have an OK button and
the user will not be able to turn the page until the error is
corrected.
The default for GuidePages is to allow turining pages on
errors.
- Parameters:
- okToTurnPage - Pass true if it's okay to turn
the page if a verifier fails, else false
getAllowTurnPageOnError
public boolean getAllowTurnPageOnError()
- If this method returns true, then the infrastructure will
allow the user to see the next page of a Guide even if the
first page's verifiers failed. Use setAllowTurnPageOnError
to set this behavior
- Returns:
- A boolean indicating if browsing to the next page is
allowed
- See Also:
- setAllowTurnPageOnError
createUI
public void createUI()
- Called by the base class the first time this page is made visible.
Subclasses should override this method to create their specific
GuidePage Components. To have the base class automatically set the
page title, page icon, and intro text, subclass.createUI() should
call super.createUI() before creating any GuidePage-specific
Components.
showPage
public void showPage()
- Tell this page it is being shown. If this is the first time the
page is shown, it will create its user interface components.
requestFocus
public void requestFocus()
- Called when this GuidePage should get keyboard focus.
GuidePage implementation uses UIContext.findFocusTraversable()
to find a showing traversable Component.
- Overrides:
- requestFocus in class JComponent
setVerifier
public void setVerifier(TaskDataVerifier verifier)
- Set (or replace) the verifier that will be called by the Guide base
class when the user wants to advance to the next (or subsequent) page.
The purpose of the verifier is to determine if the data on this
page is valid and consistent with other data entered into the Guide.
- Parameters:
- verifier - TaskDataVerifier to call before moving forward
from this page, null to remove the verifier.
getPageName
public String getPageName()
- Get the name of this page.
- Returns:
- The name of this page.
okToAdvance
public void okToAdvance(ResultListener listener)
- Call the verifier for this page to determine if it is OK to
advance to a subsequent page in the Guide. The verifier is
responsible for posting any error or warning dialogs.
- Parameters:
- listener - A ResultListener to be notified when the verification
succeeds or fails.
All Packages Class Hierarchy This Package Previous Next Index