Java 8 code cleanup.
This commit is contained in:
parent
ded424bb55
commit
02a7b74415
@ -8,10 +8,7 @@ import eva2.tools.BasicResourceLoader;
|
|||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.event.HyperlinkEvent;
|
import javax.swing.event.HyperlinkEvent;
|
||||||
import javax.swing.event.HyperlinkListener;
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.ActionEvent;
|
|
||||||
import java.awt.event.ActionListener;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The About dialog used in the EvA2 GUI.
|
* The About dialog used in the EvA2 GUI.
|
||||||
@ -57,17 +54,13 @@ class AboutDialog extends JDialog {
|
|||||||
infoEditorPane = new JEditorPane("text/html", infoMessage);
|
infoEditorPane = new JEditorPane("text/html", infoMessage);
|
||||||
infoEditorPane.setEditable(false);
|
infoEditorPane.setEditable(false);
|
||||||
infoEditorPane.setOpaque(false);
|
infoEditorPane.setOpaque(false);
|
||||||
infoEditorPane.addHyperlinkListener(new HyperlinkListener() {
|
infoEditorPane.addHyperlinkListener(hle -> {
|
||||||
|
if (HyperlinkEvent.EventType.ACTIVATED.equals(hle.getEventType())) {
|
||||||
|
Desktop desktop = Desktop.getDesktop();
|
||||||
|
|
||||||
@Override
|
if (desktop.isSupported(Desktop.Action.BROWSE)) {
|
||||||
public void hyperlinkUpdate(HyperlinkEvent hle) {
|
//java.net.URI uri = new java.net.URI(hle.getURL().toString());
|
||||||
if (HyperlinkEvent.EventType.ACTIVATED.equals(hle.getEventType())) {
|
//desktop.browse(uri);
|
||||||
java.awt.Desktop desktop = java.awt.Desktop.getDesktop();
|
|
||||||
|
|
||||||
if (desktop.isSupported(java.awt.Desktop.Action.BROWSE)) {
|
|
||||||
//java.net.URI uri = new java.net.URI(hle.getURL().toString());
|
|
||||||
//desktop.browse(uri);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -87,14 +80,7 @@ class AboutDialog extends JDialog {
|
|||||||
add(new JScrollPane(aboutTextArea), gbConstraints);
|
add(new JScrollPane(aboutTextArea), gbConstraints);
|
||||||
|
|
||||||
JButton closeButton = new JButton("Close");
|
JButton closeButton = new JButton("Close");
|
||||||
closeButton.addActionListener(new ActionListener() {
|
closeButton.addActionListener(e -> this.dispose());
|
||||||
|
|
||||||
@Override
|
|
||||||
public void actionPerformed(ActionEvent e) {
|
|
||||||
AboutDialog.this.dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
gbConstraints.gridy++;
|
gbConstraints.gridy++;
|
||||||
gbConstraints.fill = GridBagConstraints.NONE;
|
gbConstraints.fill = GridBagConstraints.NONE;
|
||||||
gbConstraints.weighty = 0.0;
|
gbConstraints.weighty = 0.0;
|
||||||
|
@ -4,8 +4,6 @@ import com.sun.management.OperatingSystemMXBean;
|
|||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.ActionEvent;
|
|
||||||
import java.awt.event.ActionListener;
|
|
||||||
import java.lang.management.ManagementFactory;
|
import java.lang.management.ManagementFactory;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
|
|
||||||
@ -22,12 +20,9 @@ public class CPUPanel extends JPanel {
|
|||||||
private OperatingSystemMXBean osBean;
|
private OperatingSystemMXBean osBean;
|
||||||
|
|
||||||
public CPUPanel(int timeSteps) {
|
public CPUPanel(int timeSteps) {
|
||||||
Timer timer = new Timer(500, new ActionListener() {
|
Timer timer = new Timer(500, e -> {
|
||||||
@Override
|
this.updateLoad();
|
||||||
public void actionPerformed(ActionEvent e) {
|
this.repaint();
|
||||||
CPUPanel.this.updateLoad();
|
|
||||||
CPUPanel.this.repaint();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
timer.start();
|
timer.start();
|
||||||
maxTimeSteps = timeSteps;
|
maxTimeSteps = timeSteps;
|
||||||
|
@ -1,17 +1,4 @@
|
|||||||
package eva2.gui;
|
package eva2.gui;
|
||||||
/*
|
|
||||||
* Title: EvA2
|
|
||||||
* Description:
|
|
||||||
* Copyright: Copyright (c) 2003
|
|
||||||
* Company: University of Tuebingen, Computer Architecture
|
|
||||||
* @author Holger Ulmer, Felix Streichert, Hannes Planatscher
|
|
||||||
* @version: $Revision: 10 $
|
|
||||||
* $Date: 2006-01-18 11:02:22 +0100 (Wed, 18 Jan 2006) $
|
|
||||||
* $Author: streiche $
|
|
||||||
*/
|
|
||||||
/*==========================================================================*
|
|
||||||
* IMPORTS
|
|
||||||
*==========================================================================*/
|
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
|
||||||
@ -29,7 +16,7 @@ public abstract class ExtAction extends AbstractAction {
|
|||||||
*/
|
*/
|
||||||
private void setValues(String s, String toolTip) {
|
private void setValues(String s, String toolTip) {
|
||||||
Mnemonic m = new Mnemonic(s);
|
Mnemonic m = new Mnemonic(s);
|
||||||
putValue(MNEMONIC, new Character(m.getMnemonic()));
|
putValue(MNEMONIC, m.getMnemonic());
|
||||||
putValue(Action.NAME, m.getText());
|
putValue(Action.NAME, m.getText());
|
||||||
putValue(TOOLTIP, toolTip);
|
putValue(TOOLTIP, toolTip);
|
||||||
}
|
}
|
||||||
|
@ -39,16 +39,12 @@ public class JExtDesktopPane extends JDesktopPane {
|
|||||||
desktopManager = new ExtDesktopManager(this);
|
desktopManager = new ExtDesktopManager(this);
|
||||||
setDesktopManager(desktopManager);
|
setDesktopManager(desktopManager);
|
||||||
|
|
||||||
actMenuFrame = new ActionListener() {
|
actMenuFrame = event -> {
|
||||||
|
if (!(event.getSource() instanceof JMenuItem)) {
|
||||||
@Override
|
return;
|
||||||
public void actionPerformed(final ActionEvent event) {
|
|
||||||
if (!(event.getSource() instanceof JMenuItem)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
JInternalFrame frame = (JInternalFrame) ((JMenuItem) event.getSource()).getClientProperty(ExtDesktopManager.FRAME);
|
|
||||||
selectFrame(frame);
|
|
||||||
}
|
}
|
||||||
|
JInternalFrame frame = (JInternalFrame) ((JMenuItem) event.getSource()).getClientProperty(ExtDesktopManager.FRAME);
|
||||||
|
selectFrame(frame);
|
||||||
};
|
};
|
||||||
|
|
||||||
actWindowTileVert = new ExtAction("Tile &Vertically", "Tiles all windows vertically",
|
actWindowTileVert = new ExtAction("Tile &Vertically", "Tiles all windows vertically",
|
||||||
@ -202,15 +198,9 @@ public class JExtDesktopPane extends JDesktopPane {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int getFrameCount() {
|
public int getFrameCount() {
|
||||||
return getComponentCount(new ComponentFilter() {
|
return getComponentCount(c -> c instanceof JInternalFrame
|
||||||
|
|| (c instanceof JInternalFrame.JDesktopIcon
|
||||||
@Override
|
&& ((JInternalFrame.JDesktopIcon) c).getInternalFrame() != null));
|
||||||
public boolean accept(Component c) {
|
|
||||||
return c instanceof JInternalFrame
|
|
||||||
|| (c instanceof JInternalFrame.JDesktopIcon
|
|
||||||
&& ((JInternalFrame.JDesktopIcon) c).getInternalFrame() != null);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getComponentCount(ComponentFilter c) {
|
public int getComponentCount(ComponentFilter c) {
|
||||||
|
@ -3,8 +3,6 @@ package eva2.gui;
|
|||||||
import eva2.tools.ToolBoxGui;
|
import eva2.tools.ToolBoxGui;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.event.ActionEvent;
|
|
||||||
import java.awt.event.ActionListener;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author becker
|
* @author becker
|
||||||
@ -25,36 +23,15 @@ public class JExtDesktopPaneToolBar extends JToolBar {
|
|||||||
|
|
||||||
/* Add Buttons to tile the desktopPane */
|
/* Add Buttons to tile the desktopPane */
|
||||||
JButton verticalButton = ToolBoxGui.createIconifiedButton("images/TileVertical16.png", "Tile vertically", false);
|
JButton verticalButton = ToolBoxGui.createIconifiedButton("images/TileVertical16.png", "Tile vertically", false);
|
||||||
verticalButton.addActionListener(new ActionListener() {
|
verticalButton.addActionListener(e -> desktopPane.tileWindows(SwingConstants.VERTICAL));
|
||||||
|
|
||||||
@Override
|
|
||||||
public void actionPerformed(ActionEvent e) {
|
|
||||||
desktopPane.tileWindows(SwingConstants.VERTICAL);
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
add(verticalButton);
|
add(verticalButton);
|
||||||
|
|
||||||
JButton horizontalButton = ToolBoxGui.createIconifiedButton("images/TileHorizontal16.png", "Tile horizontally", false);
|
JButton horizontalButton = ToolBoxGui.createIconifiedButton("images/TileHorizontal16.png", "Tile horizontally", false);
|
||||||
horizontalButton.addActionListener(new ActionListener() {
|
horizontalButton.addActionListener(e -> desktopPane.tileWindows(SwingConstants.HORIZONTAL));
|
||||||
|
|
||||||
@Override
|
|
||||||
public void actionPerformed(ActionEvent e) {
|
|
||||||
desktopPane.tileWindows(SwingConstants.HORIZONTAL);
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
add(horizontalButton);
|
add(horizontalButton);
|
||||||
|
|
||||||
JButton cascadeButton = ToolBoxGui.createIconifiedButton("images/Cascade16.png", "Cascade windows", false);
|
JButton cascadeButton = ToolBoxGui.createIconifiedButton("images/Cascade16.png", "Cascade windows", false);
|
||||||
cascadeButton.addActionListener(new ActionListener() {
|
cascadeButton.addActionListener(e -> desktopPane.overlapWindows());
|
||||||
|
|
||||||
@Override
|
|
||||||
public void actionPerformed(ActionEvent e) {
|
|
||||||
desktopPane.overlapWindows();
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
add(cascadeButton);
|
add(cascadeButton);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,17 +1,4 @@
|
|||||||
package eva2.gui;
|
package eva2.gui;
|
||||||
/*
|
|
||||||
* Title: EvA2
|
|
||||||
* Description:
|
|
||||||
* Copyright: Copyright (c) 2003
|
|
||||||
* Company: University of Tuebingen, Computer Architecture
|
|
||||||
* @author Holger Ulmer, Felix Streichert, Hannes Planatscher
|
|
||||||
* @version: $Revision: 10 $
|
|
||||||
* $Date: 2006-01-18 11:02:22 +0100 (Wed, 18 Jan 2006) $
|
|
||||||
* $Author: streiche $
|
|
||||||
*/
|
|
||||||
/*==========================================================================*
|
|
||||||
* IMPORTS
|
|
||||||
*==========================================================================*/
|
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
@ -1,14 +1,4 @@
|
|||||||
package eva2.gui;
|
package eva2.gui;
|
||||||
/*
|
|
||||||
* Title: EvA2
|
|
||||||
* Description:
|
|
||||||
* Copyright: Copyright (c) 2003
|
|
||||||
* Company: University of Tuebingen, Computer Architecture
|
|
||||||
* @author Holger Ulmer, Felix Streichert, Hannes Planatscher
|
|
||||||
* @version: $Revision: 10 $
|
|
||||||
* $Date: 2006-01-18 11:02:22 +0100 (Wed, 18 Jan 2006) $
|
|
||||||
* $Author: streiche $
|
|
||||||
*/
|
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.beans.PropertyChangeEvent;
|
import java.beans.PropertyChangeEvent;
|
||||||
@ -24,12 +14,7 @@ public class JExtMenu extends JMenu {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public JExtMenu() {
|
public JExtMenu() { }
|
||||||
//super();
|
|
||||||
//Mnemonic m = new Mnemonic(s);
|
|
||||||
//setText(m.getText());
|
|
||||||
//setMnemonic(m.getMnemonic());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -50,7 +35,7 @@ public class JExtMenu extends JMenu {
|
|||||||
Object o;
|
Object o;
|
||||||
o = a.getValue(ExtAction.MNEMONIC);
|
o = a.getValue(ExtAction.MNEMONIC);
|
||||||
if (o != null) {
|
if (o != null) {
|
||||||
item.setMnemonic(((Character) o).charValue());
|
item.setMnemonic((Character) o);
|
||||||
}
|
}
|
||||||
o = a.getValue(ExtAction.TOOLTIP);
|
o = a.getValue(ExtAction.TOOLTIP);
|
||||||
if (o != null) {
|
if (o != null) {
|
||||||
@ -81,7 +66,7 @@ public class JExtMenu extends JMenu {
|
|||||||
menuItem.setText((String) e.getNewValue());
|
menuItem.setText((String) e.getNewValue());
|
||||||
break;
|
break;
|
||||||
case "enabled":
|
case "enabled":
|
||||||
menuItem.setEnabled(((Boolean) e.getNewValue()).booleanValue());
|
menuItem.setEnabled((Boolean) e.getNewValue());
|
||||||
break;
|
break;
|
||||||
case Action.SMALL_ICON:
|
case Action.SMALL_ICON:
|
||||||
Icon icon = (Icon) e.getNewValue();
|
Icon icon = (Icon) e.getNewValue();
|
||||||
@ -90,7 +75,7 @@ public class JExtMenu extends JMenu {
|
|||||||
menuItem.repaint();
|
menuItem.repaint();
|
||||||
break;
|
break;
|
||||||
case ExtAction.MNEMONIC:
|
case ExtAction.MNEMONIC:
|
||||||
menuItem.setMnemonic(((Character) e.getNewValue()).charValue());
|
menuItem.setMnemonic((Character) e.getNewValue());
|
||||||
break;
|
break;
|
||||||
case ExtAction.TOOLTIP:
|
case ExtAction.TOOLTIP:
|
||||||
menuItem.setToolTipText((String) e.getNewValue());
|
menuItem.setToolTipText((String) e.getNewValue());
|
||||||
|
@ -1,14 +1,4 @@
|
|||||||
package eva2.gui;
|
package eva2.gui;
|
||||||
/*
|
|
||||||
* Title: EvA2
|
|
||||||
* Description:
|
|
||||||
* Copyright: Copyright (c) 2003
|
|
||||||
* Company: University of Tuebingen, Computer Architecture
|
|
||||||
* @author Holger Ulmer, Felix Streichert, Hannes Planatscher
|
|
||||||
* @version: $Revision: 10 $
|
|
||||||
* $Date: 2006-01-18 11:02:22 +0100 (Wed, 18 Jan 2006) $
|
|
||||||
* $Author: streiche $
|
|
||||||
*/
|
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
@ -63,9 +53,9 @@ public class JExtToolBar extends JToolBar {
|
|||||||
|
|
||||||
String propertyName = e.getPropertyName();
|
String propertyName = e.getPropertyName();
|
||||||
if (propertyName.equals(Action.NAME)) {
|
if (propertyName.equals(Action.NAME)) {
|
||||||
/* Nichts tun! */
|
/* Nichts tun! */
|
||||||
} else if (propertyName.equals("enabled")) {
|
} else if (propertyName.equals("enabled")) {
|
||||||
button.setEnabled(((Boolean) e.getNewValue()).booleanValue());
|
button.setEnabled((Boolean) e.getNewValue());
|
||||||
button.repaint();
|
button.repaint();
|
||||||
} else if (e.getPropertyName().equals(Action.SMALL_ICON)) {
|
} else if (e.getPropertyName().equals(Action.SMALL_ICON)) {
|
||||||
button.setIcon((Icon) e.getNewValue());
|
button.setIcon((Icon) e.getNewValue());
|
||||||
|
@ -15,7 +15,6 @@ import eva2.tools.Serializer;
|
|||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.ActionEvent;
|
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
import java.beans.PropertyEditor;
|
import java.beans.PropertyEditor;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@ -158,37 +157,14 @@ public class OptimizationJobList extends PropertySelectableList<OptimizationJob>
|
|||||||
final ArrayEditor arrayEditor = new ArrayEditor();
|
final ArrayEditor arrayEditor = new ArrayEditor();
|
||||||
arrayEditor.setWithAddButton(false);
|
arrayEditor.setWithAddButton(false);
|
||||||
arrayEditor.setWithSetButton(false);
|
arrayEditor.setWithSetButton(false);
|
||||||
ActionListener al = new ActionListener() {
|
ActionListener al = e -> StatisticalEvaluation.evaluate(jobList, jobList.getObjects(), arrayEditor.getSelectedIndices(),
|
||||||
|
(StatisticsOnSingleDataSet[]) StatisticalEvaluation.statsParams.getOneSampledStats().getSelectedEnum(StatisticsOnSingleDataSet.values()),
|
||||||
|
(StatisticsOnTwoSampledData[]) StatisticalEvaluation.statsParams.getTwoSampledStats().getSelectedEnum(StatisticsOnTwoSampledData.values()));
|
||||||
|
ActionListener sl = e -> arrayEditor.selectDeselectAll();
|
||||||
|
|
||||||
@Override
|
ActionListener cliButtonListener = actionEvent -> System.out.println("Generating CLI call");
|
||||||
public void actionPerformed(ActionEvent e) {
|
|
||||||
StatisticalEvaluation.evaluate(jobList, jobList.getObjects(), arrayEditor.getSelectedIndices(),
|
|
||||||
(StatisticsOnSingleDataSet[]) StatisticalEvaluation.statsParams.getOneSampledStats().getSelectedEnum(StatisticsOnSingleDataSet.values()),
|
|
||||||
(StatisticsOnTwoSampledData[]) StatisticalEvaluation.statsParams.getTwoSampledStats().getSelectedEnum(StatisticsOnTwoSampledData.values()));
|
|
||||||
}
|
|
||||||
};
|
|
||||||
ActionListener sl = new ActionListener() {
|
|
||||||
|
|
||||||
@Override
|
ActionListener sal = e -> jobList.saveSelectedJobs(arrayEditor);
|
||||||
public void actionPerformed(ActionEvent e) {
|
|
||||||
arrayEditor.selectDeselectAll();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
ActionListener cliButtonListener = new ActionListener() {
|
|
||||||
@Override
|
|
||||||
public void actionPerformed(ActionEvent actionEvent) {
|
|
||||||
System.out.println("Generating CLI call");
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
ActionListener sal = new ActionListener() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void actionPerformed(ActionEvent e) {
|
|
||||||
jobList.saveSelectedJobs(arrayEditor);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
arrayEditor.addUpperActionButton("Get CLI", cliButtonListener);
|
arrayEditor.addUpperActionButton("Get CLI", cliButtonListener);
|
||||||
arrayEditor.addUpperActionButton("(De-)Sel. all", sl);
|
arrayEditor.addUpperActionButton("(De-)Sel. all", sl);
|
||||||
@ -209,34 +185,26 @@ public class OptimizationJobList extends PropertySelectableList<OptimizationJob>
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static ActionListener getReuseActionListener(final Component parent, final OptimizationJobList jobList) {
|
private static ActionListener getReuseActionListener(final Component parent, final OptimizationJobList jobList) {
|
||||||
return new ActionListener() {
|
return e -> {
|
||||||
|
List<OptimizationJob> jobs = jobList.getSelectedJobs();
|
||||||
@Override
|
if (jobs.size() == 1) {
|
||||||
public void actionPerformed(ActionEvent e) {
|
OptimizationJob job = jobs.get(0);
|
||||||
List<OptimizationJob> jobs = jobList.getSelectedJobs();
|
AbstractOptimizationParameters curParams = (AbstractOptimizationParameters) ((AbstractModuleAdapter) jobList.module).getOptimizationParameters();
|
||||||
if (jobs.size() == 1) {
|
curParams.setSameParams((AbstractOptimizationParameters) job.getOptimizationParameters());
|
||||||
OptimizationJob job = jobs.get(0);
|
((GenericModuleAdapter) jobList.module).setOptimizationParameters(curParams);
|
||||||
AbstractOptimizationParameters curParams = (AbstractOptimizationParameters) ((AbstractModuleAdapter) jobList.module).getOptimizationParameters();
|
((GenericModuleAdapter) jobList.module).getStatistics().getStatisticsParameters().setMultiRuns(job.getNumRuns());
|
||||||
curParams.setSameParams((AbstractOptimizationParameters) job.getOptimizationParameters());
|
((GenericModuleAdapter) jobList.module).getStatistics().getStatisticsParameters().setFieldSelection(job.getFieldSelection(((GenericModuleAdapter) jobList.module).getStatistics().getStatisticsParameters().getFieldSelection()));
|
||||||
((GenericModuleAdapter) jobList.module).setOptimizationParameters(curParams);
|
} else {
|
||||||
((GenericModuleAdapter) jobList.module).getStatistics().getStatisticsParameters().setMultiRuns(job.getNumRuns());
|
JOptionPane.showMessageDialog(parent, "Select exactly one job to reuse!", "Error", JOptionPane.ERROR_MESSAGE);
|
||||||
((GenericModuleAdapter) jobList.module).getStatistics().getStatisticsParameters().setFieldSelection(job.getFieldSelection(((GenericModuleAdapter) jobList.module).getStatistics().getStatisticsParameters().getFieldSelection()));
|
|
||||||
} else {
|
|
||||||
JOptionPane.showMessageDialog(parent, "Select exactly one job to reuse!", "Error", JOptionPane.ERROR_MESSAGE);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ActionListener getClearSelectedActionListener(final Component parent, final OptimizationJobList jobList) {
|
private static ActionListener getClearSelectedActionListener(final Component parent, final OptimizationJobList jobList) {
|
||||||
return new ActionListener() {
|
return e -> {
|
||||||
|
List<OptimizationJob> jobs = jobList.getSelectedJobs();
|
||||||
@Override
|
for (OptimizationJob j : jobs) {
|
||||||
public void actionPerformed(ActionEvent e) {
|
j.resetJob();
|
||||||
List<OptimizationJob> jobs = jobList.getSelectedJobs();
|
|
||||||
for (OptimizationJob j : jobs) {
|
|
||||||
j.resetJob();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user