|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.netbeans.spi.wizard.WizardController
public final class WizardController extends java.lang.Object
Controller which can be used to modify the UI state of a wizard. Passed
as an argument to methods of WizardPanelProvider
. Use this
interface
to determine whether the Next/Finish buttons should be enabled, and if some
problem explanation text should be displayed.
If you are using WizardPage
, methods equivalent to this
interface are available directly on instances of WizardPage
.
WizardPanelProvider
Modifier and Type | Field and Description |
---|---|
static int |
MODE_CAN_CONTINUE
Constant that can be passed to setForwardNavigationMode to indicate
that the Next button can be enabled if the problem string is null. |
static int |
MODE_CAN_CONTINUE_OR_FINISH
Constant that can be passed to setForwardNavigationMode to indicate
that both the Finish and Next buttons can be enabled if the problem
string is null. |
static int |
MODE_CAN_FINISH
Constant that can be passed to setForwardNavigationMode to indicate
that the Finish button can be enabled if the problem string is null. |
Modifier and Type | Method and Description |
---|---|
void |
setBusy(boolean busy)
Indicate that some sort of background process is happening (presumably a progress bar is being shown to the user) which cannot be interrupted. |
void |
setForwardNavigationMode(int navigationMode)
Set the forward navigation mode. |
void |
setProblem(java.lang.String value)
Indicate that there is a problem with what the user has (or has not) input, such that the Next/Finish buttons should be disabled until the user has made some change. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MODE_CAN_CONTINUE
setForwardNavigationMode
to indicate
that the Next button can be enabled if the problem string is null.
Value is identical to the similarly named constant on Wizard
.
public static final int MODE_CAN_FINISH
setForwardNavigationMode
to indicate
that the Finish button can be enabled if the problem string is null.
Value is identical to the similarly named constant on Wizard
.
public static final int MODE_CAN_CONTINUE_OR_FINISH
setForwardNavigationMode
to indicate
that both the Finish and Next buttons can be enabled if the problem
string is null. This value is a bitmask - i.e.
MODE_CAN_CONTINUE_OR_FINISH == MODE_CAN_CONTINUE |
MODE_CAN_FINISH
.
Value is identical to the similarly named constant on
Wizard
.
Method Detail |
---|
public void setProblem(java.lang.String value)
If you want to disable the Next/Finish buttons, do that by calling this method with a short description of what is wrong.
Pass null to indicate there is no problem; non-null indicates there is a problem - the passed string should be a localized, human-readable description that assists the user in correcting the situation. It will be displayed in the UI.
public void setForwardNavigationMode(int navigationMode)
On panels where, based on the UI state, the only reasonable next step is to finish the wizard (even though there may be more panels if the UI is in a different state), set the navigation mode to MODE_CAN_FINISH, and the Finish button will be enabled, and the Next button not.
On panels where, based on the UI state, the user could either continue or complete the wizard at that point, set the navigation mode to MODE_CAN_CONTINUE_OR_FINISH.
If the finish button should not be enabled, set the navigation mode
to MODE_CAN_CONTINUE. This is the default on any panel if no
explicit call to setForwardNavigationMode()
has been made.
navigationMode
- Legal values are MODE_CAN_CONTINUE,
MODE_CAN_FINISH or MODE_CAN_CONTINUE_OR_FINISHpublic void setBusy(boolean busy)
finally
to reenable navigation.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |