fr.jussieu.gla.wasa.util.customizer
Class EditableCustomizer

java.lang.Object
  |
  +--fr.jussieu.gla.wasa.util.customizer.EditableCustomizer
All Implemented Interfaces:
java.lang.Cloneable, ICustomizer

public class EditableCustomizer
extends java.lang.Object
implements ICustomizer

A configurable ICustomizer.

Version:
$Revision: 1.1 $ $Date: 2002/04/01 16:30:44 $
Author:
Laurent Caillette

Inner classes inherited from class fr.jussieu.gla.wasa.core.ICustomizer
ICustomizer.ICustomizerEditor
 
Constructor Summary
EditableCustomizer()
           
 
Method Summary
 java.lang.Object clone()
           
 fr.jussieu.gla.wasa.util.customizer.ICustomizerEditor createCustomizerEditor()
          Creates an ICustomizerEditor instance bound to this.
 EditableEffect getEffect(AlgorithmState forState)
           
 AlgorithmState[] getSupportedStates()
          Returns AlgorithmStates for which a non-null EditableEffect is set.
 void processImprovementFound(Problem problem)
          This method is called before an engine in the state AlgorithmState.IMPROVEMENT_FOUND execute a step.
 void processNoErrorAssigned(Problem problem)
          This method is called before an engine in the state AlgorithmState.NO_ERROR_ASSIGNED execute a step.
 void processNoImprovementFound(Problem problem)
          This method is called before an engine in the state AlgorithmState.NO_IMPROVEMENT_FOUND execute a step.
 void processNoVarFound(Problem problem)
          This method is called before an engine in the state AlgorithmState.NO_VAR_FOUND execute a step.
 void processUninitialized(Problem problem)
          This method is called before an engine in the state AlgorithmState.UNINITIALIZED execute a step.
 void setEffect(AlgorithmState forState, EditableEffect effect)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EditableCustomizer

public EditableCustomizer()
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

processUninitialized

public void processUninitialized(Problem problem)
                          throws EngineException
Description copied from interface: ICustomizer
This method is called before an engine in the state AlgorithmState.UNINITIALIZED execute a step.
Specified by:
processUninitialized in interface ICustomizer

processNoErrorAssigned

public void processNoErrorAssigned(Problem problem)
                            throws EngineException
Description copied from interface: ICustomizer
This method is called before an engine in the state AlgorithmState.NO_ERROR_ASSIGNED execute a step.
Specified by:
processNoErrorAssigned in interface ICustomizer

processNoVarFound

public void processNoVarFound(Problem problem)
                       throws EngineException
Description copied from interface: ICustomizer
This method is called before an engine in the state AlgorithmState.NO_VAR_FOUND execute a step.
Specified by:
processNoVarFound in interface ICustomizer

processNoImprovementFound

public void processNoImprovementFound(Problem problem)
                               throws EngineException
Description copied from interface: ICustomizer
This method is called before an engine in the state AlgorithmState.NO_IMPROVEMENT_FOUND execute a step.
Specified by:
processNoImprovementFound in interface ICustomizer

processImprovementFound

public void processImprovementFound(Problem problem)
                             throws EngineException
Description copied from interface: ICustomizer
This method is called before an engine in the state AlgorithmState.IMPROVEMENT_FOUND execute a step.
Specified by:
processImprovementFound in interface ICustomizer

createCustomizerEditor

public fr.jussieu.gla.wasa.util.customizer.ICustomizerEditor createCustomizerEditor()
Description copied from interface: ICustomizer
Creates an ICustomizer.ICustomizerEditor instance bound to this.

The program using ICustomizerEditor should take care of hiding its visual component after the user entered parameters, and work on a clone of the ICustomizer parametrized instance. Otherwise, it could lead to unclear situations, where ICustomizer state is not reflected by GUI.

Specified by:
createCustomizerEditor in interface ICustomizer
Following copied from interface: fr.jussieu.gla.wasa.core.ICustomizer
Returns:
an ICustomizerEditor instance.

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Specified by:
clone in interface ICustomizer
Overrides:
clone in class java.lang.Object

getSupportedStates

public AlgorithmState[] getSupportedStates()
Returns AlgorithmStates for which a non-null EditableEffect is set.
Returns:
An array of AlgorithmState with no null values.

getEffect

public EditableEffect getEffect(AlgorithmState forState)

setEffect

public void setEffect(AlgorithmState forState,
                      EditableEffect effect)