public abstract class AbstractAssistantPage extends Object implements AssistantPage
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.
Modifier | Constructor and Description |
---|---|
protected |
AbstractAssistantPage(String pageTitle)
Creates a new instance with the given page title.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canFinish()
Determines if the page can finish the current assitant or not.
|
boolean |
canHelp()
Determines if the page can show help information.
|
protected abstract Component |
createPageComponent()
Creates the component of this page.
|
AssistantPageContext |
getContext()
Gets the current context for this page.
|
AssistantPage |
getNextPage()
|
Component |
getPageComponent()
Gets the component of the page.
|
String |
getPageTitle()
Gets the title of the page.
|
boolean |
hasNextPage() |
void |
performCancel()
Cancels the current execution of the assitant.
|
boolean |
performFinish()
|
void |
performHelp()
Only called if @link #canHelp ()} returns
true . |
void |
setContext(AssistantPageContext pageContext)
Sets the current context for this page.
|
boolean |
validatePage()
Called from
AssistantPageContext.updateState() in order to validate user inputs. |
protected AbstractAssistantPage(String pageTitle)
pageTitle
- The title of the page.public void setContext(AssistantPageContext pageContext)
AssistantPage
setContext
in interface AssistantPage
pageContext
- The context of the page.public AssistantPageContext getContext()
AssistantPage
getContext
in interface AssistantPage
public String getPageTitle()
AssistantPage
getPageTitle
in interface AssistantPage
public final Component getPageComponent()
AssistantPage
getPageComponent
in interface AssistantPage
protected abstract Component createPageComponent()
public boolean validatePage()
AssistantPage
AssistantPageContext.updateState()
in order to validate user inputs.validatePage
in interface AssistantPage
public boolean hasNextPage()
hasNextPage
in interface AssistantPage
public AssistantPage getNextPage()
AssistantPage
getNextPage
in interface AssistantPage
null
if no next page exists or the page could not be created.public boolean canFinish()
AssistantPage
canFinish
in interface AssistantPage
true
if the page can perform finish, otherwise false
public boolean performFinish()
AssistantPage
performFinish
in interface AssistantPage
true
if finishing was successful, otherwise false
.public void performCancel()
AssistantPage
performCancel
in interface AssistantPage
public boolean canHelp()
AssistantPage
canHelp
in interface AssistantPage
true
if the page can show help information, otherwise false
public void performHelp()
AssistantPage
true
.performHelp
in interface AssistantPage
Copyright © 2014–2015 European Space Agency (ESA). All rights reserved.