$darkmode
DENOPTIM
denoptim.gui.FitnessParametersForm Class Reference

Form collecting input parameters for a setting-up the fitness provider. More...

Inheritance diagram for denoptim.gui.FitnessParametersForm:
[legend]
Collaboration diagram for denoptim.gui.FitnessParametersForm:
[legend]

Classes

class  AtomSpecExpressionDefinition
 
class  DescriptorTreeNode
 
class  ParametrizedDescriptorDefinition
 

Public Member Functions

 FitnessParametersForm (Dimension d)
 
void importParametersFromDenoptimParamsFile (String fileName) throws Exception
 Imports parameters from a properly formatted parameters file. More...
 
void importSingleParameter (String key, String value) throws Exception
 
void putParametersToString (StringBuilder sb) throws Exception
 
- Public Member Functions inherited from denoptim.gui.ParametersForm
 ParametersForm ()
 Empty constructor. More...
 
void importParametersFromDenoptimParamsFile (String fileName) throws Exception
 
void importSingleParameter (String key, String value) throws Exception
 
void putParametersToString (StringBuilder sb) throws Exception
 
boolean hasUnsavedChanges ()
 Returns the flag signaling unsaved changes. More...
 
void setUnsavedChanges (boolean val)
 Set the status of the flag signaling unsaved changes. More...
 
void showUnknownKeyWarning (Component parent, String paramType)
 Shown a warning dialog that informs the user about having found text that is not present in the ParametersForm implementation and is treated as free text. More...
 
void importParametersFromDenoptimParamsFile (String fileName) throws Exception
 
void importSingleParameter (String key, String value) throws Exception
 
void putParametersToString (StringBuilder sb) throws Exception
 
boolean hasUnsavedChanges ()
 
void setUnsavedChanges (boolean val)
 

Static Public Attributes

static AtomicInteger fitFormUID = new AtomicInteger(1)
 Unique identified for instances of this form. More...
 

Protected Member Functions

void setVisibilityAccordingToFitnessProviderSelection ()
 
void preliminatyTasksUponImportingParams ()
 Overwritten by subclasses. More...
 
void adaptVisibility ()
 Overwritten by subclasses. More...
 
- Protected Member Functions inherited from denoptim.gui.ParametersForm
String getStringIfNotEmpty (String key, JTextField field, String prefix, String suffix)
 Produced the KEY:VALUE string for a general text field. More...
 
String getStringIfNotEmpty (String key, JEditorPane field, boolean multipleLines)
 Produced the KEY:VALUE string for a general text editor pane The text can include numbers, characters, or both. More...
 
String getStringIfNotEmpty (String key, JTextField field)
 Produced the KEY:VALUE string for a general text field. More...
 
String getStringForKVLine (String key, JSpinner spinner)
 Produced the KEY:VALUE string for a general spinner. More...
 
String getStringIfSelected (String key, JRadioButton btn)
 Produced the KEY:VALUE string for a on/off button. More...
 
String getStringFromTable (String key, JTable tab)
 Produced an overall string including one or more KEY:VALUE strings taken from a table. More...
 
String getStringFromTable (String key, JTable tab, boolean skipHeader)
 Produced an overall string including one or more KEY:VALUE strings taken from a table. More...
 
String getStringFromTable (String key, JTable tab, int[] fields, boolean skipHeader)
 Produced an overall string including one or more KEY:VALUE strings taken from a table. More...
 
String getStringFromTable (String key, JTable tab, int[] fields, String sep, boolean skipHeader)
 Produced an overall string including one or more KEY:VALUE strings taken from a table. More...
 
void importParametersFromDenoptimParamsFile (String fileName, String keyRoot) throws Exception
 Reads in the parameters from a text file collecting
DENOPTIM parameters in the form of KEY=VALUE lines. More...
 
void preliminatyTasksUponImportingParams ()
 Overwritten by subclasses. More...
 
void adaptVisibility ()
 Overwritten by subclasses. More...
 
void importParameterFromLine (String line) throws Exception
 
void addToUnformattedTxt (String key, String value)
 
JPanel getPanelForUnformattedInput ()
 
String getTextForUnformattedSettings ()
 
void clearUnformattedTxtArea ()
 

Static Package Functions

 [static initializer]
 

Package Attributes

JPanel block
 
JPanel localBlock1
 
JPanel localBlock2
 
JPanel localBlock3
 
JPanel localBlock4
 
JPanel lineSrcOrNew
 
JRadioButton rdbSrcOrNew
 
String key3dTrees = "FP-No3dTreeModel"
 
JPanel line3dTrees
 
JRadioButton rdb3dTrees
 
String keyPreFitnessUIDCheck = "FP-CheckUidBeforeFitness"
 
JPanel linePreFitnessUIDCheck
 
JRadioButton rdbPreFitnessUIDCheck
 
JPanel lineFPSource
 
JLabel lblFPSource
 
JTextField txtFPSource
 
JButton btnFPSource
 
JButton btnLoadFPSource
 
JPanel lineIntOrExt
 
JRadioButton rdbIntOrExt
 
String keyFitProviderSource = "FP-Source"
 
JPanel lineFitProviderSource
 
JLabel lblFitProviderSource
 
JTextField txtFitProviderSource
 
JButton btnFitProviderSource
 
String keyFitProviderInterpreter = "FP-Interpreter"
 
JPanel lineFitProviderInterpreter
 
JLabel lblFitProviderInterpreter
 
JTextField txtFitProviderInterpreter
 
String keyEq = "FP-Equation"
 
JPanel lineEq
 
JLabel lblEq
 
JTextField txtEq
 
String keyCustomVars = "FP-DescriptorSpecs"
 
JPanel lineCustomVars
 
JLabel lblCustomvars
 
JTable tabCustomVars
 
DefaultTableModel tabCustomVarsMod
 
JPanel descDefinitionPane
 
JScrollPane descDefScrollPane
 
JLabel lblDDValueTitle
 
JLabel lblDDValueName
 
JLabel lblDDValueDefinition
 
JLabel lblDDValueDescripton
 
JLabel lblDDValueClasses
 
JPanel pnlDDValueParams
 
JLabel lblDDValueParams
 
JButton btnDDValueParams
 
JLabel lblDDValueSource
 
String NL = System.getProperty("line.separator")
 
- Package Attributes inherited from denoptim.gui.ParametersForm
final Dimension fileLabelSize = new Dimension(250,28)
 Default sizes for file pathname labels. More...
 
final int preferredHeight
 Default text field height. More...
 
final Dimension fileFieldSize = new Dimension(350,preferredHeight)
 Default sizes for file pathname fields. More...
 
final Dimension strFieldSize = new Dimension(75,preferredHeight)
 Default sizes for short pathname fields (i.e., string or number) More...
 

Private Attributes

Map< String, Object > mapKeyFieldToValueField
 Map connecting the parameter keyword and the field containing the parameter value. More...
 
String descNameToTune = ""
 
String[] paramsToTune
 

Static Private Attributes

static final long serialVersionUID = -282726238111247056L
 Version. More...
 
static Map< Class<?>, String > additionalDocForParameters
 

Additional Inherited Members

- Protected Attributes inherited from denoptim.gui.ParametersForm
boolean unsavedChanges = false
 Flag notifying that some data was not saved. More...
 
FieldListener fieldListener
 Listener for changes in parameters of this form. More...
 
RdbFieldChange rdbFieldChange
 Listener for changes in radio button-bound parameters. More...
 
TabFieldChange tabFieldChange
 Listener for changes in table-bound parameters. More...
 
CmbFieldChange cmbFieldChange
 Listener for changes in combo box-bound parameters. More...
 
Map< String, Boolean > checkedFlags = new HashMap<String,Boolean>()
 Map of keyword to search for when reading a parameters file. More...
 
JTextArea txtUnformattedInput = new JTextArea(5,20)
 Storage of unformatted text for input files. More...
 
boolean foundCLIOnlyContent = false
 Flag recording we have imported text containing a line that is not interpreted as a GUI-controllable parameter. More...
 

Detailed Description

Form collecting input parameters for a setting-up the fitness provider.

Definition at line 73 of file FitnessParametersForm.java.

Constructor & Destructor Documentation

◆ FitnessParametersForm()

denoptim.gui.FitnessParametersForm.FitnessParametersForm ( Dimension  d)

Definition at line 183 of file FitnessParametersForm.java.

References denoptim.gui.FitnessParametersForm.additionalDocForParameters, denoptim.gui.FitnessParametersForm.block, denoptim.gui.FitnessParametersForm.btnDDValueParams, denoptim.gui.FitnessParametersForm.btnFitProviderSource, denoptim.gui.FitnessParametersForm.btnFPSource, denoptim.gui.FitnessParametersForm.btnLoadFPSource, denoptim.gui.FitnessParametersForm.descDefinitionPane, denoptim.gui.FitnessParametersForm.descDefScrollPane, denoptim.gui.FitnessParametersForm.descNameToTune, denoptim.gui.FitnessParametersForm.DescriptorTreeNode.dff, denoptim.gui.ParametersForm.fieldListener, denoptim.gui.ParametersForm.fileFieldSize, denoptim.gui.ParametersForm.fileLabelSize, denoptim.fitness.DescriptorUtils.findAllCDKDescriptors(), denoptim.fitness.DescriptorUtils.findAllDENOPTIMDescriptors(), denoptim.fitness.DescriptorForFitness.getClassName(), denoptim.fitness.DescriptorForFitness.getDictClasses(), denoptim.fitness.DescriptorForFitness.getDictDefinition(), denoptim.fitness.DescriptorForFitness.getDictTitle(), denoptim.fitness.DescriptorForFitness.getImplementation(), denoptim.fitness.DescriptorForFitness.getShortName(), denoptim.gui.FitnessParametersForm.importParametersFromDenoptimParamsFile(), denoptim.gui.FitnessParametersForm.key3dTrees, denoptim.gui.FitnessParametersForm.keyCustomVars, denoptim.gui.FitnessParametersForm.keyEq, denoptim.gui.FitnessParametersForm.keyFitProviderInterpreter, denoptim.gui.FitnessParametersForm.keyFitProviderSource, denoptim.gui.FitnessParametersForm.keyPreFitnessUIDCheck, denoptim.gui.FitnessParametersForm.lblCustomvars, denoptim.gui.FitnessParametersForm.lblDDValueClasses, denoptim.gui.FitnessParametersForm.lblDDValueDefinition, denoptim.gui.FitnessParametersForm.lblDDValueDescripton, denoptim.gui.FitnessParametersForm.lblDDValueName, denoptim.gui.FitnessParametersForm.lblDDValueParams, denoptim.gui.FitnessParametersForm.lblDDValueSource, denoptim.gui.FitnessParametersForm.lblDDValueTitle, denoptim.gui.FitnessParametersForm.lblEq, denoptim.gui.FitnessParametersForm.lblFitProviderInterpreter, denoptim.gui.FitnessParametersForm.lblFitProviderSource, denoptim.gui.FitnessParametersForm.lblFPSource, denoptim.gui.FitnessParametersForm.line3dTrees, denoptim.gui.FitnessParametersForm.lineCustomVars, denoptim.gui.FitnessParametersForm.lineEq, denoptim.gui.FitnessParametersForm.lineFitProviderInterpreter, denoptim.gui.FitnessParametersForm.lineFitProviderSource, denoptim.gui.FitnessParametersForm.lineFPSource, denoptim.gui.FitnessParametersForm.lineIntOrExt, denoptim.gui.FitnessParametersForm.linePreFitnessUIDCheck, denoptim.gui.FitnessParametersForm.lineSrcOrNew, denoptim.gui.FitnessParametersForm.localBlock1, denoptim.gui.FitnessParametersForm.localBlock2, denoptim.gui.FitnessParametersForm.localBlock3, denoptim.gui.FitnessParametersForm.localBlock4, denoptim.gui.FitnessParametersForm.mapKeyFieldToValueField, denoptim.gui.FitnessParametersForm.paramsToTune, denoptim.gui.GUIFileOpener.pickFileForTxtField(), denoptim.gui.FitnessParametersForm.pnlDDValueParams, denoptim.gui.ParametersForm.preferredHeight, denoptim.gui.FitnessParametersForm.rdb3dTrees, denoptim.gui.FitnessParametersForm.rdbIntOrExt, denoptim.gui.FitnessParametersForm.rdbPreFitnessUIDCheck, denoptim.gui.FitnessParametersForm.rdbSrcOrNew, denoptim.gui.GUIModalDialog.result, denoptim.gui.FitnessParametersForm.setVisibilityAccordingToFitnessProviderSelection(), denoptim.gui.GUIModalDialog.showDialog(), denoptim.gui.FitnessParametersForm.tabCustomVars, denoptim.gui.FitnessParametersForm.tabCustomVarsMod, denoptim.gui.FitnessParametersForm.txtEq, denoptim.gui.FitnessParametersForm.txtFitProviderInterpreter, denoptim.gui.FitnessParametersForm.txtFitProviderSource, and denoptim.gui.FitnessParametersForm.txtFPSource.

Here is the call graph for this function:

Member Function Documentation

◆ [static initializer]()

denoptim.gui.FitnessParametersForm.[static initializer]
staticpackage

◆ adaptVisibility()

void denoptim.gui.FitnessParametersForm.adaptVisibility ( )
protected

Overwritten by subclasses.

Sets visibility of panels according to the current selections and field content.

Reimplemented from denoptim.gui.ParametersForm.

Definition at line 937 of file FitnessParametersForm.java.

References denoptim.gui.FitnessParametersForm.setVisibilityAccordingToFitnessProviderSelection().

Here is the call graph for this function:

◆ importParametersFromDenoptimParamsFile()

void denoptim.gui.FitnessParametersForm.importParametersFromDenoptimParamsFile ( String  fileName) throws Exception

Imports parameters from a properly formatted parameters file.

The file is a text file with lines containing KEY=VALUE pairs.

Parameters
fileNamethe pathname of the file to read
Exceptions
Exception

Reimplemented from denoptim.gui.ParametersForm.

Definition at line 987 of file FitnessParametersForm.java.

References denoptim.gui.ParametersForm.clearUnformattedTxtArea(), denoptim.gui.FitnessParametersForm.importParametersFromDenoptimParamsFile(), denoptim.gui.FitnessParametersForm.localBlock1, denoptim.gui.FitnessParametersForm.localBlock2, denoptim.gui.FitnessParametersForm.localBlock3, denoptim.gui.FitnessParametersForm.localBlock4, denoptim.gui.FitnessParametersForm.rdbIntOrExt, denoptim.gui.FitnessParametersForm.rdbSrcOrNew, and denoptim.gui.ParametersForm.showUnknownKeyWarning().

Referenced by denoptim.gui.FitnessParametersForm.FitnessParametersForm(), and denoptim.gui.FitnessParametersForm.importParametersFromDenoptimParamsFile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ importSingleParameter()

void denoptim.gui.FitnessParametersForm.importSingleParameter ( String  key,
String  value 
) throws Exception

◆ preliminatyTasksUponImportingParams()

void denoptim.gui.FitnessParametersForm.preliminatyTasksUponImportingParams ( )
protected

Overwritten by subclasses.

Does any preliminary tasks, such as cleaning

Reimplemented from denoptim.gui.ParametersForm.

Definition at line 925 of file FitnessParametersForm.java.

References denoptim.gui.FitnessParametersForm.tabCustomVarsMod.

◆ putParametersToString()

◆ setVisibilityAccordingToFitnessProviderSelection()

void denoptim.gui.FitnessParametersForm.setVisibilityAccordingToFitnessProviderSelection ( )
protected

Definition at line 908 of file FitnessParametersForm.java.

References denoptim.gui.FitnessParametersForm.localBlock3, denoptim.gui.FitnessParametersForm.localBlock4, and denoptim.gui.FitnessParametersForm.rdbIntOrExt.

Referenced by denoptim.gui.FitnessParametersForm.adaptVisibility(), and denoptim.gui.FitnessParametersForm.FitnessParametersForm().

Here is the caller graph for this function:

Member Data Documentation

◆ additionalDocForParameters

Map<Class<?>,String> denoptim.gui.FitnessParametersForm.additionalDocForParameters
staticprivate

◆ block

JPanel denoptim.gui.FitnessParametersForm.block
package

◆ btnDDValueParams

JButton denoptim.gui.FitnessParametersForm.btnDDValueParams
package

◆ btnFitProviderSource

JButton denoptim.gui.FitnessParametersForm.btnFitProviderSource
package

◆ btnFPSource

JButton denoptim.gui.FitnessParametersForm.btnFPSource
package

◆ btnLoadFPSource

JButton denoptim.gui.FitnessParametersForm.btnLoadFPSource
package

◆ descDefinitionPane

JPanel denoptim.gui.FitnessParametersForm.descDefinitionPane
package

◆ descDefScrollPane

JScrollPane denoptim.gui.FitnessParametersForm.descDefScrollPane
package

◆ descNameToTune

String denoptim.gui.FitnessParametersForm.descNameToTune = ""
private

◆ fitFormUID

AtomicInteger denoptim.gui.FitnessParametersForm.fitFormUID = new AtomicInteger(1)
static

Unique identified for instances of this form.

Definition at line 84 of file FitnessParametersForm.java.

◆ key3dTrees

String denoptim.gui.FitnessParametersForm.key3dTrees = "FP-No3dTreeModel"
package

◆ keyCustomVars

String denoptim.gui.FitnessParametersForm.keyCustomVars = "FP-DescriptorSpecs"
package

◆ keyEq

◆ keyFitProviderInterpreter

String denoptim.gui.FitnessParametersForm.keyFitProviderInterpreter = "FP-Interpreter"
package

◆ keyFitProviderSource

String denoptim.gui.FitnessParametersForm.keyFitProviderSource = "FP-Source"
package

◆ keyPreFitnessUIDCheck

String denoptim.gui.FitnessParametersForm.keyPreFitnessUIDCheck = "FP-CheckUidBeforeFitness"
package

◆ lblCustomvars

JLabel denoptim.gui.FitnessParametersForm.lblCustomvars
package

◆ lblDDValueClasses

JLabel denoptim.gui.FitnessParametersForm.lblDDValueClasses
package

◆ lblDDValueDefinition

JLabel denoptim.gui.FitnessParametersForm.lblDDValueDefinition
package

◆ lblDDValueDescripton

JLabel denoptim.gui.FitnessParametersForm.lblDDValueDescripton
package

◆ lblDDValueName

JLabel denoptim.gui.FitnessParametersForm.lblDDValueName
package

◆ lblDDValueParams

JLabel denoptim.gui.FitnessParametersForm.lblDDValueParams
package

◆ lblDDValueSource

JLabel denoptim.gui.FitnessParametersForm.lblDDValueSource
package

◆ lblDDValueTitle

JLabel denoptim.gui.FitnessParametersForm.lblDDValueTitle
package

◆ lblEq

JLabel denoptim.gui.FitnessParametersForm.lblEq
package

◆ lblFitProviderInterpreter

JLabel denoptim.gui.FitnessParametersForm.lblFitProviderInterpreter
package

◆ lblFitProviderSource

JLabel denoptim.gui.FitnessParametersForm.lblFitProviderSource
package

◆ lblFPSource

JLabel denoptim.gui.FitnessParametersForm.lblFPSource
package

◆ line3dTrees

JPanel denoptim.gui.FitnessParametersForm.line3dTrees
package

◆ lineCustomVars

JPanel denoptim.gui.FitnessParametersForm.lineCustomVars
package

◆ lineEq

JPanel denoptim.gui.FitnessParametersForm.lineEq
package

◆ lineFitProviderInterpreter

JPanel denoptim.gui.FitnessParametersForm.lineFitProviderInterpreter
package

◆ lineFitProviderSource

JPanel denoptim.gui.FitnessParametersForm.lineFitProviderSource
package

◆ lineFPSource

JPanel denoptim.gui.FitnessParametersForm.lineFPSource
package

◆ lineIntOrExt

JPanel denoptim.gui.FitnessParametersForm.lineIntOrExt
package

◆ linePreFitnessUIDCheck

JPanel denoptim.gui.FitnessParametersForm.linePreFitnessUIDCheck
package

◆ lineSrcOrNew

JPanel denoptim.gui.FitnessParametersForm.lineSrcOrNew
package

◆ localBlock1

JPanel denoptim.gui.FitnessParametersForm.localBlock1
package

◆ localBlock2

JPanel denoptim.gui.FitnessParametersForm.localBlock2
package

◆ localBlock3

◆ localBlock4

◆ mapKeyFieldToValueField

Map<String,Object> denoptim.gui.FitnessParametersForm.mapKeyFieldToValueField
private

Map connecting the parameter keyword and the field containing the parameter value.

Definition at line 90 of file FitnessParametersForm.java.

Referenced by denoptim.gui.FitnessParametersForm.FitnessParametersForm(), and denoptim.gui.FitnessParametersForm.importSingleParameter().

◆ NL

String denoptim.gui.FitnessParametersForm.NL = System.getProperty("line.separator")
package

◆ paramsToTune

String [] denoptim.gui.FitnessParametersForm.paramsToTune
private

◆ pnlDDValueParams

JPanel denoptim.gui.FitnessParametersForm.pnlDDValueParams
package

◆ rdb3dTrees

JRadioButton denoptim.gui.FitnessParametersForm.rdb3dTrees
package

◆ rdbIntOrExt

◆ rdbPreFitnessUIDCheck

JRadioButton denoptim.gui.FitnessParametersForm.rdbPreFitnessUIDCheck
package

◆ rdbSrcOrNew

JRadioButton denoptim.gui.FitnessParametersForm.rdbSrcOrNew
package

◆ serialVersionUID

final long denoptim.gui.FitnessParametersForm.serialVersionUID = -282726238111247056L
staticprivate

Version.

Definition at line 79 of file FitnessParametersForm.java.

◆ tabCustomVars

JTable denoptim.gui.FitnessParametersForm.tabCustomVars
package

◆ tabCustomVarsMod

◆ txtEq

JTextField denoptim.gui.FitnessParametersForm.txtEq
package

◆ txtFitProviderInterpreter

JTextField denoptim.gui.FitnessParametersForm.txtFitProviderInterpreter
package

◆ txtFitProviderSource

JTextField denoptim.gui.FitnessParametersForm.txtFitProviderSource
package

◆ txtFPSource

JTextField denoptim.gui.FitnessParametersForm.txtFPSource
package

The documentation for this class was generated from the following file: