Class ToolAdapterExecutionDialog
java.lang.Object
org.esa.snap.ui.AbstractDialog
org.esa.snap.ui.ModelessDialog
org.esa.snap.core.gpf.ui.SingleTargetProductDialog
org.esa.snap.ui.tooladapter.dialogs.ToolAdapterExecutionDialog
public class ToolAdapterExecutionDialog
extends org.esa.snap.core.gpf.ui.SingleTargetProductDialog
Form dialog for running a tool adapter operator.
-
Field Summary
Fields inherited from class org.esa.snap.core.gpf.ui.SingleTargetProductDialog
appContext, targetProductSelector
Fields inherited from class org.esa.snap.ui.ModelessDialog
ID_APPLY_CLOSE, ID_APPLY_CLOSE_HELP
-
Constructor Summary
ConstructorsConstructorDescriptionToolAdapterExecutionDialog
(ToolAdapterOperatorDescriptor descriptor, AppContext appContext, String title) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
canApply()
protected Product
Creates the desired target product.void
hide()
Hides the dialog.protected void
onApply()
Called if the "Apply" button has been clicked.protected void
onCancel()
Called if the "Cancel" button has been clicked.protected void
onClose()
Called if the "Close" button has been clicked.int
show()
Shows the dialog.Methods inherited from class org.esa.snap.core.gpf.ui.SingleTargetProductDialog
getAppContext, getTargetProductSelector, handleInitialisationError, handleProcessingError, showOpenInAppInfo, showSuppressibleInformationDialog
Methods inherited from class org.esa.snap.ui.ModelessDialog
close
Methods inherited from class org.esa.snap.ui.AbstractDialog
center, collectButtons, getButton, getButtonID, getButtonMask, getButtonPanel, getContent, getHelpID, getJDialog, getParent, getQualifiedPropertyName, getTitle, onHelp, onNo, onOK, onOther, onReset, onYes, registerButton, setButtonID, setContent, setContent, setHelpID, setTitle, showErrorDialog, showErrorDialog, showErrorDialog, showInformationDialog, showInformationDialog, showInformationDialog, showWarningDialog, showWarningDialog, showWarningDialog, verifyUserInput
-
Constructor Details
-
ToolAdapterExecutionDialog
public ToolAdapterExecutionDialog(ToolAdapterOperatorDescriptor descriptor, AppContext appContext, String title) Constructor.- Parameters:
descriptor
- The operator descriptorappContext
- The application contexttitle
- The dialog title
-
-
Method Details
-
onApply
protected void onApply()Description copied from class:AbstractDialog
Called if the "Apply" button has been clicked. The default implementation does nothing. Clients should override this method to implement meaningful behaviour.- Overrides:
onApply
in classorg.esa.snap.core.gpf.ui.SingleTargetProductDialog
-
show
public int show()Description copied from class:AbstractDialog
Shows the dialog. Overrides shall callsuper.show()
at the end.- Overrides:
show
in classAbstractDialog
- Returns:
- the identifier of the last button pressed or zero if this is a modeless dialog.
-
hide
public void hide()Description copied from class:AbstractDialog
Hides the dialog. Overrides shall callsuper.hide()
at the end. This method does nothing else than hiding the underlying Swing dialog.- Overrides:
hide
in classAbstractDialog
- See Also:
-
createTargetProduct
Description copied from class:org.esa.snap.core.gpf.ui.SingleTargetProductDialog
Creates the desired target product. Usually, this method will be implemented by invoking one of the multipleGPF
createProduct
methods.The method should throw a
OperatorException
in order to signal "nominal" processing errors, other exeption types are treated as internal errors.- Specified by:
createTargetProduct
in classorg.esa.snap.core.gpf.ui.SingleTargetProductDialog
- Returns:
- The target product.
- Throws:
Exception
- if an error occurs, anOperatorException
is signaling "nominal" processing errors.
-
canApply
protected boolean canApply()- Overrides:
canApply
in classorg.esa.snap.core.gpf.ui.SingleTargetProductDialog
-
onCancel
protected void onCancel()Description copied from class:AbstractDialog
Called if the "Cancel" button has been clicked. The default implementation callsAbstractDialog.hide()
. Clients should override this method to implement meaningful behaviour.- Overrides:
onCancel
in classAbstractDialog
-
onClose
protected void onClose()Description copied from class:AbstractDialog
Called if the "Close" button has been clicked. The default implementation callsAbstractDialog.hide()
. Clients should override this method to implement meaningful behaviour.- Overrides:
onClose
in classAbstractDialog
-