chemaxon.alchemist
Class AlchemistController

java.lang.Object
  extended by chemaxon.alchemist.AlchemistController
All Implemented Interfaces:
java.beans.PropertyChangeListener, java.util.EventListener

public abstract class AlchemistController
extends java.lang.Object
implements java.beans.PropertyChangeListener


Field Summary
protected  Alchemist alchemist
          The Alchemist object of the controller instance
 javax.swing.Action BACK_ACTION
          Backward navigation Action
 javax.swing.Action CANCEL_ACTION
          Cancel Action
 javax.swing.Action DONE_ACTION
          Done Action
 javax.swing.Action FINISH_ACTION
          Finish Action
 javax.swing.Action NEXT_ACTION
          Forward navigation Action
 javax.swing.Action PROGRESS_ACTION
          Progress Action for jumping one or more steps forward or backward if possible
protected  AlchemistState state
          the AlchemistState object of this controller
 
Constructor Summary
AlchemistController(java.lang.String title)
          Creates an AlchemistController instance.
 
Method Summary
protected  void addPage(java.lang.String label, AlchemistPage page)
          Inserts an item to the end of progress list.
protected abstract  void cancelPressed()
          This method is called when cancel button is pressed
protected abstract  void finishPressed()
          This method is called when finish button is pressed
 Alchemist getAlchemist()
          Returns the alchemist of this configuration instance.
abstract  java.lang.String getHelpURL()
          This function returns a string with help URL or null
abstract  java.io.File getPropertiesFile()
          This method returns the file for persistent properties to be saved into, or null, if no save needed.
protected  void initAlchemist()
          This method initializes the first page of Alchemist.
protected  void initializeProperties()
          This method initializes the AlchemistState of the Alchemist by loading the persistent properties
protected  void popupHelpInBrowser()
          This method starts a browser with online help url
 void propertyChange(java.beans.PropertyChangeEvent evt)
           
protected  void saveProperties()
          This method saves the persistent properties of Alchemist
protected  void setBanner(AlchemistBanner banner)
          Sets the banner displayed in AlchemistFrame
protected  void setStepEnabled(int step, boolean enabled)
          This method sets the state of a step in the workflow
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

state

protected AlchemistState state
the AlchemistState object of this controller


alchemist

protected Alchemist alchemist
The Alchemist object of the controller instance


BACK_ACTION

public final javax.swing.Action BACK_ACTION
Backward navigation Action


NEXT_ACTION

public final javax.swing.Action NEXT_ACTION
Forward navigation Action


CANCEL_ACTION

public final javax.swing.Action CANCEL_ACTION
Cancel Action


FINISH_ACTION

public final javax.swing.Action FINISH_ACTION
Finish Action


DONE_ACTION

public final javax.swing.Action DONE_ACTION
Done Action


PROGRESS_ACTION

public final javax.swing.Action PROGRESS_ACTION
Progress Action for jumping one or more steps forward or backward if possible

Constructor Detail

AlchemistController

public AlchemistController(java.lang.String title)
Creates an AlchemistController instance. Initializes an Alchemist instance with this controller

Parameters:
title - is the title of the Alchemist frame
Method Detail

setBanner

protected void setBanner(AlchemistBanner banner)
Sets the banner displayed in AlchemistFrame

Parameters:
banner - is the banner object

initAlchemist

protected void initAlchemist()
This method initializes the first page of Alchemist. This should be called after the pages were initialized, and Controller is ready to show first page of wizard NOTE: calling this method will reset to first page without saving the state of current page, so it is recommeded to call this method only once, after pages are initialized.


initializeProperties

protected void initializeProperties()
This method initializes the AlchemistState of the Alchemist by loading the persistent properties


saveProperties

protected void saveProperties()
This method saves the persistent properties of Alchemist


cancelPressed

protected abstract void cancelPressed()
This method is called when cancel button is pressed


finishPressed

protected abstract void finishPressed()
This method is called when finish button is pressed


addPage

protected final void addPage(java.lang.String label,
                             AlchemistPage page)
Inserts an item to the end of progress list.

Parameters:
label - is the text of the progress object.
page - is the panel instance corresponds to the progress object.

getAlchemist

public Alchemist getAlchemist()
Returns the alchemist of this configuration instance.

Returns:
alchemist

setStepEnabled

protected final void setStepEnabled(int step,
                                    boolean enabled)
This method sets the state of a step in the workflow

Parameters:
step - is the index of the step
enabled - is the state

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent evt)
Specified by:
propertyChange in interface java.beans.PropertyChangeListener

getPropertiesFile

public abstract java.io.File getPropertiesFile()
This method returns the file for persistent properties to be saved into, or null, if no save needed.

Returns:
property file or null

getHelpURL

public abstract java.lang.String getHelpURL()
This function returns a string with help URL or null


popupHelpInBrowser

protected void popupHelpInBrowser()
This method starts a browser with online help url