diff --git a/opt4j-viewer/src/main/java/org/opt4j/viewer/ArchiveWidget.java b/opt4j-viewer/src/main/java/org/opt4j/viewer/ArchiveWidget.java index a40d55d8..67d102e2 100644 --- a/opt4j-viewer/src/main/java/org/opt4j/viewer/ArchiveWidget.java +++ b/opt4j-viewer/src/main/java/org/opt4j/viewer/ArchiveWidget.java @@ -20,7 +20,6 @@ * SOFTWARE. *******************************************************************************/ - package org.opt4j.viewer; import java.awt.BorderLayout; @@ -259,18 +258,22 @@ public void stateChanged(ChangeEvent e) { @Override public void columnAdded(TableColumnModelEvent arg0) { + // nothing to be done } @Override public void columnMarginChanged(ChangeEvent arg0) { + // nothing to be done } @Override public void columnMoved(TableColumnModelEvent arg0) { + // nothing to be done } @Override public void columnRemoved(TableColumnModelEvent arg0) { + // nothing to be done } @Override @@ -342,7 +345,7 @@ protected void sortIndividiualMouseListeners() { */ @Override public synchronized void init(Viewport viewport) { - + // nothing to be done } protected boolean updateOrder() { diff --git a/opt4j-viewer/src/main/java/org/opt4j/viewer/ConvergencePlotData.java b/opt4j-viewer/src/main/java/org/opt4j/viewer/ConvergencePlotData.java index aefe96fd..1054cfcf 100644 --- a/opt4j-viewer/src/main/java/org/opt4j/viewer/ConvergencePlotData.java +++ b/opt4j-viewer/src/main/java/org/opt4j/viewer/ConvergencePlotData.java @@ -19,7 +19,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. *******************************************************************************/ - + package org.opt4j.viewer; import java.awt.geom.Point2D; @@ -79,7 +79,7 @@ protected static class PlotDataObjective { protected final List meanValues = new CopyOnWriteArrayList(); protected final int MAXVALUES = 2000; - final Set currentIteration = new HashSet(); + protected final Set currentIteration = new HashSet(); PlotDataObjective(Objective objective) { this.objective = objective; @@ -98,7 +98,7 @@ public void update(Objectives objectives) { } } - protected synchronized void simplify(List values) { + protected synchronized void simplify(List values) { if (values.size() > MAXVALUES) { List copy = new ArrayList(values); @@ -167,17 +167,15 @@ public void complete(int iteration) { } } - private void addValue(double min, List points, int iteration) { - if (!Double.isInfinite(min)) { - if (points.isEmpty() || points.get(points.size() - 1).getY() != min) { - if (!points.isEmpty()) { - Point2D.Double steppoint = new Point2D.Double(iteration, points.get(points.size() - 1).getY()); - points.add(steppoint); - } - - Point2D.Double point = new Point2D.Double(iteration, min); - points.add(point); + private void addValue(double min, List points, int iteration) { + if (!Double.isInfinite(min) && (points.isEmpty() || points.get(points.size() - 1).getY() != min)) { + if (!points.isEmpty()) { + Point2D.Double steppoint = new Point2D.Double(iteration, points.get(points.size() - 1).getY()); + points.add(steppoint); } + + Point2D.Double point = new Point2D.Double(iteration, min); + points.add(point); } } } diff --git a/opt4j-viewer/src/main/java/org/opt4j/viewer/ConvergencePlotWidget.java b/opt4j-viewer/src/main/java/org/opt4j/viewer/ConvergencePlotWidget.java index 11bddec3..d2f3234a 100644 --- a/opt4j-viewer/src/main/java/org/opt4j/viewer/ConvergencePlotWidget.java +++ b/opt4j-viewer/src/main/java/org/opt4j/viewer/ConvergencePlotWidget.java @@ -211,7 +211,7 @@ public JPanel getPanel() { */ @Override public void init(Viewport viewport) { - + // nothing to be done } /* diff --git a/opt4j-viewer/src/main/java/org/opt4j/viewer/ParetoPlotWidget.java b/opt4j-viewer/src/main/java/org/opt4j/viewer/ParetoPlotWidget.java index a492a43a..98bb9953 100644 --- a/opt4j-viewer/src/main/java/org/opt4j/viewer/ParetoPlotWidget.java +++ b/opt4j-viewer/src/main/java/org/opt4j/viewer/ParetoPlotWidget.java @@ -217,7 +217,7 @@ public void registerAtObjectivesMonitor(ObjectivesMonitor objectivesMonitor) { */ @Override public void init(Viewport viewport) { - + // nothing to be done } /* diff --git a/opt4j-viewer/src/main/java/org/opt4j/viewer/PopulationWidget.java b/opt4j-viewer/src/main/java/org/opt4j/viewer/PopulationWidget.java index dcb015eb..296e35ef 100644 --- a/opt4j-viewer/src/main/java/org/opt4j/viewer/PopulationWidget.java +++ b/opt4j-viewer/src/main/java/org/opt4j/viewer/PopulationWidget.java @@ -252,7 +252,7 @@ protected final JTable getTable() { */ @Override public synchronized void init(Viewport viewport) { - + // nothing to be done } /* diff --git a/opt4j-viewer/src/main/java/org/opt4j/viewer/StatusBar.java b/opt4j-viewer/src/main/java/org/opt4j/viewer/StatusBar.java index 5e5ac1d6..4c801caa 100644 --- a/opt4j-viewer/src/main/java/org/opt4j/viewer/StatusBar.java +++ b/opt4j-viewer/src/main/java/org/opt4j/viewer/StatusBar.java @@ -168,6 +168,7 @@ public void iterationComplete(int iteration) { */ @Override public void optimizationStarted(Optimizer optimizer) { + // nothing to be done } /* diff --git a/opt4j-viewer/src/main/java/org/opt4j/viewer/Viewer.java b/opt4j-viewer/src/main/java/org/opt4j/viewer/Viewer.java index 68012736..12c409bc 100644 --- a/opt4j-viewer/src/main/java/org/opt4j/viewer/Viewer.java +++ b/opt4j-viewer/src/main/java/org/opt4j/viewer/Viewer.java @@ -168,6 +168,7 @@ public void windowClosing(WindowEvent e) { break; default: control.doStop(); + break; } frame.dispose(); } diff --git a/opt4j-viewer/src/main/java/org/opt4j/viewer/Viewport.java b/opt4j-viewer/src/main/java/org/opt4j/viewer/Viewport.java index b649824e..43b29527 100644 --- a/opt4j-viewer/src/main/java/org/opt4j/viewer/Viewport.java +++ b/opt4j-viewer/src/main/java/org/opt4j/viewer/Viewport.java @@ -56,14 +56,6 @@ public class Viewport { protected final Map widgets = new HashMap(); - /** - * Constructs a {@link Viewport} for {@link Widget}s. - * - */ - public Viewport() { - - } - /** * Initialization. This method has to be called once after construction. */