Package org.geotools.swing.wizard
Class JPage
- Object
-
- JPage
-
- Direct Known Subclasses:
JDataChoosePage
,JDataStorePage
,JParameterListPage
,ProcessParameterPage
,ProcessRunPage
,ProcessSelectionPage
public abstract class JPage extends Object
Wizard page; will be created as needed.- Author:
- Jody Garnett (LISAsoft), Graham Davis (Refractions Research)
-
-
Field Summary
Fields Modifier and Type Field Description protected String
backPageIdentifier
static String
DEFAULT
Used to indicate which page we should start with.static String
FINISH
Used to indicate that we are done and the wizard should closestatic String
NEXT
Used to indicate that there is a next step to completeprotected String
nextPageIdentifier
protected String
pageIdentifier
Identifier used to track this page in a work flow.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JPanel
createPanel()
Called to initialize the page for the first time.void
dispose()
Called when the workflow is completed (either in Finish, Canel or Error) giving the page a chance to clean up any resources it is using such as a database connection.String
getBackPageIdentifier()
Identifier of the panel to use Back.JWizard
getJWizard()
Map<String,JPage>
getModel()
String
getNextPageIdentifier()
Identifier of the panel to use Next.String
getPageIdentifier()
JPanel
getPanel()
Access the JPanel - init will be used to create the panel the first time this method is called.boolean
isValid()
Validation of page state; if the page isValid then the next or finish button will be enabled.void
postDisplayPanel()
Called just after the panel is displayed.void
preClosePanel()
Override this method to perform functionality just before the panel is to be hidden.void
preDisplayPanel()
Called just before the panel is to be displayed.void
setBackPageIdentifier(String backPageIdentifier)
void
setNextPageIdentifier(String nextPageIdentifier)
void
setPageIdentifier(String pageIdentifier)
-
-
-
Field Detail
-
DEFAULT
public static final String DEFAULT
Used to indicate which page we should start with.- See Also:
- Constant Field Values
-
FINISH
public static final String FINISH
Used to indicate that we are done and the wizard should close- See Also:
- Constant Field Values
-
NEXT
public static final String NEXT
Used to indicate that there is a next step to complete- See Also:
- Constant Field Values
-
pageIdentifier
protected String pageIdentifier
Identifier used to track this page in a work flow.
-
backPageIdentifier
protected String backPageIdentifier
-
nextPageIdentifier
protected String nextPageIdentifier
-
-
Constructor Detail
-
JPage
public JPage()
Create a default page.
-
JPage
public JPage(String id)
Create a page with the provided id.
-
-
Method Detail
-
getPanel
public final JPanel getPanel()
Access the JPanel - init will be used to create the panel the first time this method is called.- Returns:
- JPanel used for this wizard page
-
getPageIdentifier
public String getPageIdentifier()
-
setPageIdentifier
public void setPageIdentifier(String pageIdentifier)
-
getJWizard
public final JWizard getJWizard()
-
getNextPageIdentifier
public String getNextPageIdentifier()
Identifier of the panel to use Next.- Returns:
- Return id of the next JProcessPage or null if next should be disabled. You can use FINISH to indicate the wizard is complete and may be closed.
-
setNextPageIdentifier
public void setNextPageIdentifier(String nextPageIdentifier)
-
getBackPageIdentifier
public String getBackPageIdentifier()
Identifier of the panel to use Back.- Returns:
- Return id of the next JProcessPage or null if next should be disabled.
-
setBackPageIdentifier
public void setBackPageIdentifier(String backPageIdentifier)
-
createPanel
public JPanel createPanel()
Called to initialize the page for the first time.Please note this method will normally only be called once; even if the user clicks forwards and backwards to return to your page. It is only called if getPanel() returns null.
Calling this method directly will erase any previously constructed panel.
-
preDisplayPanel
public void preDisplayPanel()
Called just before the panel is to be displayed.This is a good time to populate your fields with values; hook up any listeners and gernally muck about.
-
postDisplayPanel
public void postDisplayPanel()
Called just after the panel is displayed.This is a good time to perform any animations or set the focus into one of the fields etc.
-
isValid
public boolean isValid()
Validation of page state; if the page isValid then the next or finish button will be enabled.If you need to call setNextPageIdentifier based on input this is the time to do it.
- Returns:
- true if the page contents are valid
-
preClosePanel
public void preClosePanel()
Override this method to perform functionality just before the panel is to be hidden.
-
dispose
public void dispose()
Called when the workflow is completed (either in Finish, Canel or Error) giving the page a chance to clean up any resources it is using such as a database connection.
-
-