Add EvA2 Logo to closing dialog
This commit is contained in:
parent
d01cfb4803
commit
e449f28419
@ -482,11 +482,16 @@ public class MainFrame extends JFrame implements OptimizationStateListener {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void windowClosing(final WindowEvent event) {
|
public void windowClosing(final WindowEvent event) {
|
||||||
|
BasicResourceLoader loader = BasicResourceLoader.getInstance();
|
||||||
|
byte[] bytes = loader.getBytesFromResourceLocation(EvAInfo.iconLocation, true);
|
||||||
|
ImageIcon icon = new ImageIcon(bytes);
|
||||||
int result = JOptionPane.showConfirmDialog(
|
int result = JOptionPane.showConfirmDialog(
|
||||||
MainFrame.this,
|
MainFrame.this,
|
||||||
"Do you really want to exit EvA2?",
|
"Do you really want to exit EvA2?",
|
||||||
"Exit Application",
|
"Exit Application",
|
||||||
JOptionPane.YES_NO_OPTION);
|
JOptionPane.YES_NO_OPTION,
|
||||||
|
JOptionPane.QUESTION_MESSAGE,
|
||||||
|
icon);
|
||||||
if (result == JOptionPane.YES_OPTION) {
|
if (result == JOptionPane.YES_OPTION) {
|
||||||
MainFrame.this.close();
|
MainFrame.this.close();
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
package eva2.gui;
|
package eva2.gui;
|
||||||
|
|
||||||
import eva2.EvAInfo;
|
|
||||||
import eva2.tools.BasicResourceLoader;
|
|
||||||
import eva2.tools.StringTools;
|
import eva2.tools.StringTools;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
@ -23,8 +21,7 @@ public class PropertyDialog extends JDialog {
|
|||||||
public PropertyDialog(Window parent, PropertyEditor editor, String title) {
|
public PropertyDialog(Window parent, PropertyEditor editor, String title) {
|
||||||
super(parent, title, ModalityType.APPLICATION_MODAL);
|
super(parent, title, ModalityType.APPLICATION_MODAL);
|
||||||
setTitle(getFrameNameFromEditor(editor));
|
setTitle(getFrameNameFromEditor(editor));
|
||||||
BasicResourceLoader loader = BasicResourceLoader.getInstance();
|
|
||||||
byte[] bytes = loader.getBytesFromResourceLocation(EvAInfo.iconLocation, true);
|
|
||||||
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
|
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
|
||||||
setLayout(new BorderLayout());
|
setLayout(new BorderLayout());
|
||||||
propertyEditor = editor;
|
propertyEditor = editor;
|
||||||
|
@ -139,9 +139,7 @@ public class ERPStarter {
|
|||||||
filterCols[4] = initialPosBoxLenColIndex;
|
filterCols[4] = initialPosBoxLenColIndex;
|
||||||
filterCols[5] = isObjectiveColIndex;
|
filterCols[5] = isObjectiveColIndex;
|
||||||
filterCols[6] = fitWeightsColIndex;
|
filterCols[6] = fitWeightsColIndex;
|
||||||
// double[][] dat = BasicResourceLoader.loadDoubleData(fname, null, ";", 1, -1, new int[]{2,3,4,5,6,7,8,9});
|
|
||||||
double[][] dat = BasicResourceLoader.loadDoubleData(fname, null, ";", 1, -1, filterCols);
|
double[][] dat = BasicResourceLoader.loadDoubleData(fname, null, ";", 1, -1, filterCols);
|
||||||
// System.out.println(BeanInspector.toString(dat));
|
|
||||||
double[][] filteredVars = ToolBox.filterBy(dat, 0, 1., 1.); // filter only those with a value of one in column isVariable
|
double[][] filteredVars = ToolBox.filterBy(dat, 0, 1., 1.); // filter only those with a value of one in column isVariable
|
||||||
double[][] range = ToolBox.getCols(filteredVars, 1, 2); // get columns with lower and upper bound
|
double[][] range = ToolBox.getCols(filteredVars, 1, 2); // get columns with lower and upper bound
|
||||||
double[][] initPos = ToolBox.getCols(filteredVars, 3); // get column with initial position center
|
double[][] initPos = ToolBox.getCols(filteredVars, 3); // get column with initial position center
|
||||||
|
Loading…
x
Reference in New Issue
Block a user