$darkmode
DENOPTIM
denoptim.gui.CuttingRulesSelectionDialog Class Reference

A modal dialog to define parameters for fragmentation and fragment filtering. More...

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

Classes

class  MyJSVGCanvas
 Special canvas that overrides the set interpretation of mouse+key input to achieve a simplified zoom/pan capability using only BUTTON1 and SHIFT or CTRL keys. More...
 
class  SMARTSVisualizationButton
 A button that opens a modal dialog displaying the PNGs with a visual representation of SMARTS queries that are selected in the table given upon construction. More...
 

Public Member Functions

 CuttingRulesSelectionDialog (List< CuttingRule > defaultCuttingRules, List< CuttingRule > customCuttingRules, boolean preselectDefault, Component refForPlacement, FragmenterParameters settings)
 Constructor. More...
 
- Public Member Functions inherited from denoptim.gui.GUIModalDialog
 GUIModalDialog (Component refForPlacement)
 Constructor. More...
 
 GUIModalDialog (Component refForPlacement, boolean useExtraButton)
 Constructor. More...
 
Object showDialog ()
 Shows the dialog and restrains the modality to it, until the dialog gets closed. More...
 
void addToNorthPane (JComponent comp)
 Adds a component to the topmost part of this dialog frame. More...
 
void addToCentralPane (JComponent comp)
 Adds a component to the central part of this dialog frame. More...
 

Protected Member Functions

void saveResults ()
 
void appendToCentralPanel (JComponent panel)
 Method to append a panel to the bottom of the central panel. More...
 
- Protected Member Functions inherited from denoptim.gui.GUIModalDialog
void close ()
 Closes the dialog window. More...
 

Protected Attributes

JPanel centralPanel = new JPanel(new BorderLayout())
 The panel in the central part of the dialog. More...
 
File lastUsedCutRulFile = null
 The file where we last saved cutting rules different from the default. More...
 
final int preferredHeight
 Default text field height. More...
 
final Dimension strFieldSize = new Dimension(200, preferredHeight)
 Default sizes for mid-long text. More...
 
JTextField txtLinearity
 User-controlled definition of the linearity limit. More...
 
List< CuttingRulechosenOnes
 Chosen set of rules. More...
 
FragmenterParameters frgParams
 Parameter storage were we store parameters. More...
 
- Protected Attributes inherited from denoptim.gui.GUIModalDialog
JButton btnDone
 The button that is used to launch the processing of the data given to the open dialog, and close the dialog window. More...
 
JButton btnCanc
 The button that is used to close the dialog without processing any input. More...
 
JButton btnExtra
 The button that can be used for any action that does not close the dialog. More...
 
Object result = null
 The result to be returned once the dialog is closed. More...
 

Private Member Functions

String escapeCharactersForSMARTSViewer (String smarts)
 Escaping some characters as explained in https://smarts.plus/rest. More...
 
void buildCustomRulesTable (List< CuttingRule > customCuttingRules, String[] emptyRow)
 
File getTmpFileForCuttingRules () throws DENOPTIMException
 

Private Attributes

JRadioButton rdbUseDefault
 
JRadioButton rdbUseCustom
 
DefaultTableModel defaultRulesTabModel
 
DefaultTableModel customRulesTabModel
 
File nextWrittenCutRulFile = null
 The file where we will save next edited list of cutting rules. More...
 

Static Private Attributes

static final long serialVersionUID = 1L
 Version ID. More...
 

Detailed Description

A modal dialog to define parameters for fragmentation and fragment filtering.

This dialog allows to control only a limited set of parameters compared to the full capacity of FragmenterParameters. This because many of the parameters in the latter have no sense to exist in an interactive, GUI-controlled fragmentation.

Definition at line 84 of file CuttingRulesSelectionDialog.java.

Constructor & Destructor Documentation

◆ CuttingRulesSelectionDialog()

denoptim.gui.CuttingRulesSelectionDialog.CuttingRulesSelectionDialog ( List< CuttingRule defaultCuttingRules,
List< CuttingRule customCuttingRules,
boolean  preselectDefault,
Component  refForPlacement,
FragmenterParameters  settings 
)

Constructor.

Exceptions
DENOPTIMException

Definition at line 147 of file CuttingRulesSelectionDialog.java.

References denoptim.gui.GUIModalDialog.addToCentralPane(), denoptim.files.FileUtils.addToRecentFiles(), denoptim.gui.CuttingRulesSelectionDialog.appendToCentralPanel(), denoptim.gui.GUIModalDialog.btnCanc, denoptim.gui.GUIModalDialog.btnDone, denoptim.gui.CuttingRulesSelectionDialog.buildCustomRulesTable(), denoptim.gui.CuttingRulesSelectionDialog.centralPanel, denoptim.gui.CuttingRulesSelectionDialog.chosenOnes, denoptim.gui.GUIModalDialog.close(), denoptim.gui.CuttingRulesSelectionDialog.customRulesTabModel, denoptim.files.FileFormat.CUTRULE, denoptim.gui.CuttingRulesSelectionDialog.defaultRulesTabModel, denoptim.files.FileAndFormat.file, denoptim.files.FileAndFormat.format, denoptim.gui.CuttingRulesSelectionDialog.frgParams, denoptim.utils.GeneralUtils.getEnglishFormattedDecimal(), denoptim.programs.fragmenter.FragmenterParameters.getLinearAngleLimit(), denoptim.gui.CuttingRulesSelectionDialog.getTmpFileForCuttingRules(), denoptim.gui.CuttingRulesSelectionDialog.lastUsedCutRulFile, denoptim.gui.CuttingRulesSelectionDialog.nextWrittenCutRulFile, denoptim.gui.GUIFileOpener.pickFile(), denoptim.gui.GUIFileSaver.pickFileForSavingCuttingRules(), denoptim.gui.CuttingRulesSelectionDialog.rdbUseCustom, denoptim.gui.CuttingRulesSelectionDialog.rdbUseDefault, denoptim.io.DenoptimIO.readCuttingRules(), denoptim.gui.CuttingRulesSelectionDialog.saveResults(), denoptim.gui.CuttingRulesSelectionDialog.strFieldSize, denoptim.gui.CuttingRulesSelectionDialog.txtLinearity, and denoptim.io.DenoptimIO.writeCuttingRules().

Here is the call graph for this function:

Member Function Documentation

◆ appendToCentralPanel()

void denoptim.gui.CuttingRulesSelectionDialog.appendToCentralPanel ( JComponent  panel)
protected

Method to append a panel to the bottom of the central panel.

Parameters
panel

Definition at line 628 of file CuttingRulesSelectionDialog.java.

References denoptim.gui.CuttingRulesSelectionDialog.centralPanel.

Referenced by denoptim.gui.CuttingRulesSelectionDialog.CuttingRulesSelectionDialog(), and denoptim.gui.MolToGraphParametersDialog.MolToGraphParametersDialog().

Here is the caller graph for this function:

◆ buildCustomRulesTable()

void denoptim.gui.CuttingRulesSelectionDialog.buildCustomRulesTable ( List< CuttingRule customCuttingRules,
String[]  emptyRow 
)
private

Definition at line 875 of file CuttingRulesSelectionDialog.java.

References denoptim.gui.CuttingRulesSelectionDialog.customRulesTabModel.

Referenced by denoptim.gui.CuttingRulesSelectionDialog.CuttingRulesSelectionDialog().

Here is the caller graph for this function:

◆ escapeCharactersForSMARTSViewer()

String denoptim.gui.CuttingRulesSelectionDialog.escapeCharactersForSMARTSViewer ( String  smarts)
private

Escaping some characters as explained in https://smarts.plus/rest.

Definition at line 861 of file CuttingRulesSelectionDialog.java.

Referenced by denoptim.gui.CuttingRulesSelectionDialog.SMARTSVisualizationButton.SMARTSVisualizationButton().

Here is the caller graph for this function:

◆ getTmpFileForCuttingRules()

File denoptim.gui.CuttingRulesSelectionDialog.getTmpFileForCuttingRules ( ) throws DENOPTIMException
private

Definition at line 904 of file CuttingRulesSelectionDialog.java.

References denoptim.files.FileUtils.getAvailableFileName(), and denoptim.gui.GUIPreferences.tmpSpace.

Referenced by denoptim.gui.CuttingRulesSelectionDialog.CuttingRulesSelectionDialog().

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

◆ saveResults()

void denoptim.gui.CuttingRulesSelectionDialog.saveResults ( )
protected

Member Data Documentation

◆ centralPanel

JPanel denoptim.gui.CuttingRulesSelectionDialog.centralPanel = new JPanel(new BorderLayout())
protected

The panel in the central part of the dialog.

This is where main content goes.

Definition at line 96 of file CuttingRulesSelectionDialog.java.

Referenced by denoptim.gui.CuttingRulesSelectionDialog.appendToCentralPanel(), and denoptim.gui.CuttingRulesSelectionDialog.CuttingRulesSelectionDialog().

◆ chosenOnes

List<CuttingRule> denoptim.gui.CuttingRulesSelectionDialog.chosenOnes
protected

◆ customRulesTabModel

DefaultTableModel denoptim.gui.CuttingRulesSelectionDialog.customRulesTabModel
private

◆ defaultRulesTabModel

DefaultTableModel denoptim.gui.CuttingRulesSelectionDialog.defaultRulesTabModel
private

◆ frgParams

FragmenterParameters denoptim.gui.CuttingRulesSelectionDialog.frgParams
protected

◆ lastUsedCutRulFile

File denoptim.gui.CuttingRulesSelectionDialog.lastUsedCutRulFile = null
protected

The file where we last saved cutting rules different from the default.

Definition at line 107 of file CuttingRulesSelectionDialog.java.

Referenced by denoptim.gui.CuttingRulesSelectionDialog.CuttingRulesSelectionDialog(), and denoptim.gui.CuttingRulesSelectionDialog.saveResults().

◆ nextWrittenCutRulFile

File denoptim.gui.CuttingRulesSelectionDialog.nextWrittenCutRulFile = null
private

The file where we will save next edited list of cutting rules.

Definition at line 112 of file CuttingRulesSelectionDialog.java.

Referenced by denoptim.gui.CuttingRulesSelectionDialog.CuttingRulesSelectionDialog().

◆ preferredHeight

final int denoptim.gui.CuttingRulesSelectionDialog.preferredHeight
protected
Initial value:
=
(int) (new JTextField()).getPreferredSize().getHeight()

Default text field height.

Definition at line 117 of file CuttingRulesSelectionDialog.java.

◆ rdbUseCustom

JRadioButton denoptim.gui.CuttingRulesSelectionDialog.rdbUseCustom
private

◆ rdbUseDefault

JRadioButton denoptim.gui.CuttingRulesSelectionDialog.rdbUseDefault
private

◆ serialVersionUID

final long denoptim.gui.CuttingRulesSelectionDialog.serialVersionUID = 1L
staticprivate

Version ID.

Definition at line 90 of file CuttingRulesSelectionDialog.java.

◆ strFieldSize

final Dimension denoptim.gui.CuttingRulesSelectionDialog.strFieldSize = new Dimension(200, preferredHeight)
protected

◆ txtLinearity

JTextField denoptim.gui.CuttingRulesSelectionDialog.txtLinearity
protected

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