21import java.awt.Component;
22import java.awt.event.ActionEvent;
23import java.awt.event.ActionListener;
25import javax.swing.JOptionPane;
26import javax.swing.UIManager;
28import denoptim.exception.DENOPTIMException;
29import denoptim.fragspace.FragmentSpace;
30import denoptim.fragspace.FragmentSpaceParameters;
52 super(refForPlacement);
57 btnDone.setText(
"Create BB Space");
58 btnDone.setToolTipText(String.format(
"<html><body width='%1s'>"
59 +
"Uses the parameters defined above to define a space"
60 +
"of graph building blocks (BB Space) "
61 +
"and makes it available to the graph handler.</html>",400));
67 btnDone.addActionListener(
new ActionListener() {
69 public void actionPerformed(ActionEvent e) {
73 }
catch (Exception e1) {
75 String msg =
"<html><body width='%1s'>"
76 +
"These parameters did not allow to "
77 +
"build a space of graph building blocks.<br>"
78 +
"Possible cause of this problem: "
81 if (e1.getCause() !=
null)
83 msg = msg + e1.getCause();
85 if (e1.getMessage() !=
null)
87 msg = msg +
" " + e1.getMessage();
89 msg = msg +
"<br>Please alter the "
90 +
"settings and try again.</html>";
92 JOptionPane.showMessageDialog(
btnDone,
93 String.format(msg,400),
95 JOptionPane.ERROR_MESSAGE,
96 UIManager.getIcon(
"OptionPane.errorIcon"));
103 this.
btnCanc.setToolTipText(
"Exit without creating any BB Space.");
121 StringBuilder sbPars =
new StringBuilder();
124 String[] lines = sbPars.toString().split(System.getProperty(
128 for (String line : lines)
Class defining a space of building blocks.
Parameters defining the fragment space.
void processParameters()
Read the information collected in the parameters stored in this class and create the fragment space a...
void checkParameters()
Evaluate consistency of input parameters.
FragmentSpace getFragmentSpace()
A modal dialog to define a fragment space and load it.
FSParamsDialog(Component refForPlacement)
Constructor.
static final long serialVersionUID
Version ID.
FSParametersForm fsParsForm
FragmentSpace makeFragSpace()
Reads all the parameters, calls the interpreters, and eventually creates the static FragmentSpace obj...
JButton btnCanc
The button that is used to close the dialog without processing any input.
void addToCentralPane(JComponent comp)
Adds a component to the central part of this dialog frame.
JButton btnDone
The button that is used to launch the processing of the data given to the open dialog,...
void close()
Closes the dialog window.
void readParameterLine(String line)