3import java.awt.Component;
4import java.awt.FlowLayout;
5import java.awt.event.ActionEvent;
6import java.awt.event.ActionListener;
9import javax.swing.JComboBox;
10import javax.swing.JLabel;
11import javax.swing.JPanel;
12import javax.swing.JRadioButton;
13import javax.swing.JSeparator;
14import javax.swing.JTextField;
16import denoptim.fragmenter.ScaffoldingPolicy;
17import denoptim.graph.Template.ContractLevel;
18import denoptim.graph.Vertex.BBType;
19import denoptim.programs.fragmenter.CuttingRule;
20import denoptim.programs.fragmenter.FragmenterParameters;
45 List<CuttingRule> customCuttingRules,
boolean preselectDefault,
48 super(defaultCuttingRules, customCuttingRules, preselectDefault,
49 refForPlacement, settings);
51 setTitle(
"Settings for Converting Molecules to Graphs");
55 String toolTipScaffoldingPolicy = String.format(
"<html><body width='%1s'>"
56 +
"Defines the policy used to choose a vertex and make it be "
57 +
"the scaffold of the graph obtained by converting a "
58 +
"molecule.</html>", 400);
65 String[] stringArr =
new String[policies.length];
66 for (
int i=0;i<policies.length;i++)
67 stringArr[i]=policies[i].toString();
73 public void actionPerformed(ActionEvent e)
89 "<html><body width='%1s'>"
90 +
"Use this field to provide any additional string that is "
91 +
"needed to characterized some type of policy.</html>", 400));
100 String toolTipEmbTmpl = String.format(
"<html><body width='%1s'>"
101 +
"Require converting ggubstrags that define ring systems into "
102 +
"Templates that embed the subgraph of an entire ring syste. "
103 +
"Ring systems that are separated by at least one acyclic "
104 +
"edge are mbedded into separate Templates.</html>", 400);
105 lineEmbTmpl =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
106 rdbEmbTmpl =
new JRadioButton(
"Embed rings into Templates");
108 rdbEmbTmpl.addActionListener(
new ActionListener() {
110 public void actionPerformed(ActionEvent e)
122 String toolTipTemplateContract = String.format(
"<html><body width='%1s'>"
123 +
"Defines the constraints of the templates used to embed ring"
124 +
"systems. </html>", 400);
127 "Contract for ring-embedding Templates: ");
130 String[] stringContracts =
new String[contracts.length];
131 for (
int i=0;i<contracts.length;i++)
132 stringContracts[i]=contracts[i].toString();
A modal dialog to define parameters for fragmentation and fragment filtering.
FragmenterParameters frgParams
Parameter storage were we store parameters.
void appendToCentralPanel(JComponent panel)
Method to append a panel to the bottom of the central panel.
final Dimension strFieldSize
Default sizes for mid-long text.
JTextField txtScaffoldingPolicy
boolean getEmbedRingsInTemplate()
JComboBox< String > cmbTemplateContract
JComboBox< String > cmbScaffoldingPolicy
JLabel lblScaffoldingPolicy
static final long serialVersionUID
Version ID.
JPanel lineScaffoldingPolicy
MolToGraphParametersDialog(List< CuttingRule > defaultCuttingRules, List< CuttingRule > customCuttingRules, boolean preselectDefault, Component refForPlacement, FragmenterParameters settings)
ScaffoldingPolicy getScaffoldingPolicy()
JPanel lineTemplateContract
ContractLevel getEmbeddedRingsContract()
JLabel lblTemplateContract
Parameters controlling execution of the fragmenter.
void setEmbeddedRingsContract(ContractLevel embeddedRingsContract)
void setEmbedRingsInTemplate(boolean embedRingsInTemplate)
void setScaffoldingPolicy(ScaffoldingPolicy sp)
Defines how to define the scaffold vertex of a graph.
Enum specifying to what extent the template's inner graph can be changed.
FREE
Inner graphs are free to change within the confines of the required AttachmentPoints.
The type of building block.