Package org.esa.snap.ui.assistant
Class AbstractAssistantPage
java.lang.Object
org.esa.snap.ui.assistant.AbstractAssistantPage
- All Implemented Interfaces:
AssistantPage
- Direct Known Subclasses:
AbstractLayerSourceAssistantPage
An abstract implementation of
AssistantPage.
The user has only to implement the createPageComponent() method.
Other methods have meaningful default implementations, which can be overriden
according to the concrete implementation.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractAssistantPage(String pageTitle) Creates a new instance with the given page title. -
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermines if the page can finish the current assitant or not.booleancanHelp()Determines if the page can show help information.protected abstract ComponentCreates the component of this page.Gets the current context for this page.final ComponentGets the component of the page.Gets the title of the page.booleanvoidCancels the current execution of the assitant.booleanvoidOnly called if @link #canHelp ()} returnstrue.voidsetContext(AssistantPageContext pageContext) Sets the current context for this page.booleanCalled fromAssistantPageContext.updateState()in order to validate user inputs.
-
Constructor Details
-
AbstractAssistantPage
Creates a new instance with the given page title.- Parameters:
pageTitle- The title of the page.
-
-
Method Details
-
setContext
Description copied from interface:AssistantPageSets the current context for this page.- Specified by:
setContextin interfaceAssistantPage- Parameters:
pageContext- The context of the page.
-
getContext
Description copied from interface:AssistantPageGets the current context for this page.- Specified by:
getContextin interfaceAssistantPage- Returns:
- The context of the page.
-
getPageTitle
Description copied from interface:AssistantPageGets the title of the page.- Specified by:
getPageTitlein interfaceAssistantPage- Returns:
- The page title.
-
getPageComponent
Description copied from interface:AssistantPageGets the component of the page.- Specified by:
getPageComponentin interfaceAssistantPage- Returns:
- The page component.
-
createPageComponent
Creates the component of this page.- Returns:
- The component of this page
-
validatePage
public boolean validatePage()Description copied from interface:AssistantPageCalled fromAssistantPageContext.updateState()in order to validate user inputs.- Specified by:
validatePagein interfaceAssistantPage- Returns:
- true, if the current page is valid
-
hasNextPage
public boolean hasNextPage()- Specified by:
hasNextPagein interfaceAssistantPage- Returns:
- true, if a next page is available
-
getNextPage
Description copied from interface:AssistantPage- Specified by:
getNextPagein interfaceAssistantPage- Returns:
- the next page, or
nullif no next page exists or the page could not be created.
-
canFinish
public boolean canFinish()Description copied from interface:AssistantPageDetermines if the page can finish the current assitant or not.- Specified by:
canFinishin interfaceAssistantPage- Returns:
trueif the page can perform finish, otherwisefalse
-
performFinish
public boolean performFinish()Description copied from interface:AssistantPage- Specified by:
performFinishin interfaceAssistantPage- Returns:
trueif finishing was successful, otherwisefalse.
-
performCancel
public void performCancel()Description copied from interface:AssistantPageCancels the current execution of the assitant. Implementors shall release allocated resources.- Specified by:
performCancelin interfaceAssistantPage
-
canHelp
public boolean canHelp()Description copied from interface:AssistantPageDetermines if the page can show help information.- Specified by:
canHelpin interfaceAssistantPage- Returns:
trueif the page can show help information, otherwisefalse
-
performHelp
public void performHelp()Description copied from interface:AssistantPageOnly called if @link #canHelp ()} returnstrue.- Specified by:
performHelpin interfaceAssistantPage
-