| java.lang.Object org.netbeans.installer.wizard.components.WizardComponent org.netbeans.installer.wizard.components.WizardAction
All known Subclasses: org.netbeans.installer.wizard.components.actions.DownloadConfigurationLogicAction, org.netbeans.installer.wizard.components.actions.UninstallAction, org.netbeans.installer.wizard.components.actions.InitializeRegistryAction, org.netbeans.installer.wizard.components.actions.FinalizeRegistryAction, org.netbeans.installer.wizard.components.actions.CreateMacOSAppLauncherAction, org.netbeans.installer.wizard.components.actions.DownloadInstallationDataAction, org.netbeans.installer.wizard.components.actions.SearchForJavaAction, org.netbeans.installer.wizard.components.actions.CreateBundleAction, org.netbeans.installer.wizard.components.actions.CacheEngineAction, org.netbeans.installer.wizard.components.actions.SetInstallationLocationAction, org.netbeans.installer.wizard.components.actions.InstallAction, org.netbeans.installer.wizard.components.actions.CreateNativeLauncherAction,
WizardAction | abstract public class WizardAction extends WizardComponent (Code) | | This class is a specialization of the
WizardComponent which defines
behavior specific to actions.
An action is best described by the following characteristics: it represents a
lengthy process (and hence displays a progress bar) and does not require any user
input - it just informs the user that something is happening and the wizard did
not hang.
Optionally an action may provide means to cancel without waiting for it to
finish. This behavior is controlled by the
WizardAction.isCancelable() method.
The derivative classes are expected to implement the
WizardAction.execute() and the
WizardAction.isCancelable() methods. If the action is cancelable, then the code in
the
WizardAction.execute() method should check the cancellation status of the action
via
WizardAction.isCanceled() . The action will not be interrupted automatically -
canceling is a deliberate process.
author: Kirill Sorokin since: 1.0 |
Inner Class :public static class WizardActionUi extends WizardComponentUi implements ProgressListener | |
Inner Class :public static class WizardActionSwingUi extends WizardComponentSwingUi | |
WizardAction | protected WizardAction()(Code) | | Creates a new instance of
WizardAction . This is the default
protected constructor which must be called by the concrete
implementations. It initializes the fields above.
|
cancel | public void cancel()(Code) | | Cancels the action. Note that this method does not explicitly "kill" the
execution of the action, but instead simply sets the cancellation marker and
waits till the action's execution finishes. In case of a not-very-well
behaved action, this can take a while.
|
execute | abstract public void execute()(Code) | | The main business-logic method of the action. It must be implemented by
concrete instances of
WizardAction .
The code in this method is expected to update the progress as it is being
executed. The
Progress object for the action should be created by
this method and passed to the UI via the
WizardActionUi.setProgress(Progress) method.
The implementing code is also expected to pay attention to the return value
of the
WizardAction.isCanceled() method. When the action receives a cancel signal
(if it supports cancelation) the return value of this method will change to
true .
|
getWizardUi | public WizardActionUi getWizardUi()(Code) | | |
initialize | public void initialize()(Code) | | The default implementation of this method for
WizardAction has an
empty body. Concrete implementations are expected to override this method
if they require any custom initialization.
See Also: WizardComponent.initialize |
isCancelable | public boolean isCancelable()(Code) | | Whether this action can be canceled. The default value if true ,
concrete implementations of
WizardAction may override this method to
disable the possibility to cancel the action.
true if the action can be canceled, false otherwise. |
isCanceled | public boolean isCanceled()(Code) | | Whether this action has been canceled. This informational method is intended
to be called by the code in
WizardAction.execute in order to
correct its flow in case the action has been canceled.
true is the action has been canceled, false otherwise. |
|
|