diff options
Diffstat (limited to 'src/de/lmu/ifi/dbs/elki/visualization/gui/ResultVisualizer.java')
-rw-r--r-- | src/de/lmu/ifi/dbs/elki/visualization/gui/ResultVisualizer.java | 82 |
1 files changed, 27 insertions, 55 deletions
diff --git a/src/de/lmu/ifi/dbs/elki/visualization/gui/ResultVisualizer.java b/src/de/lmu/ifi/dbs/elki/visualization/gui/ResultVisualizer.java index 28988d4a..aa5cd2b4 100644 --- a/src/de/lmu/ifi/dbs/elki/visualization/gui/ResultVisualizer.java +++ b/src/de/lmu/ifi/dbs/elki/visualization/gui/ResultVisualizer.java @@ -1,26 +1,27 @@ package de.lmu.ifi.dbs.elki.visualization.gui; -/* -This file is part of ELKI: -Environment for Developing KDD-Applications Supported by Index-Structures - -Copyright (C) 2011 -Ludwig-Maximilians-Universität München -Lehr- und Forschungseinheit für Datenbanksysteme -ELKI Development Team - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ +/* + This file is part of ELKI: + Environment for Developing KDD-Applications Supported by Index-Structures + + Copyright (C) 2011 + Ludwig-Maximilians-Universität München + Lehr- und Forschungseinheit für Datenbanksysteme + ELKI Development Team + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + */ import javax.swing.JFrame; @@ -32,13 +33,10 @@ import de.lmu.ifi.dbs.elki.result.ResultHandler; import de.lmu.ifi.dbs.elki.result.ResultUtil; import de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizer; import de.lmu.ifi.dbs.elki.utilities.optionhandling.OptionID; -import de.lmu.ifi.dbs.elki.utilities.optionhandling.constraints.GreaterEqualConstraint; import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.Parameterization; -import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter; import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.StringParameter; -import de.lmu.ifi.dbs.elki.visualization.gui.overview.OverviewPlot; -import de.lmu.ifi.dbs.elki.visualization.visualizers.VisualizerContext; -import de.lmu.ifi.dbs.elki.visualization.visualizers.VisualizerParameterizer; +import de.lmu.ifi.dbs.elki.visualization.VisualizerContext; +import de.lmu.ifi.dbs.elki.visualization.VisualizerParameterizer; /** * Handler to process and visualize a Result. @@ -69,15 +67,6 @@ public class ResultVisualizer implements ResultHandler { public static final OptionID WINDOW_TITLE_ID = OptionID.getOrCreateOptionID("vis.window.title", "Title to use for visualization window."); /** - * Parameter for the maximum number of dimensions, - * - * <p> - * Code: -vis.maxdim - * </p> - */ - public static final OptionID MAXDIM_ID = OptionID.getOrCreateOptionID("vis.maxdim", "Maximum number of dimensions to display."); - - /** * Stores the set title. */ String title; @@ -88,11 +77,6 @@ public class ResultVisualizer implements ResultHandler { protected final static String DEFAULT_TITLE = "ELKI Result Visualization"; /** - * Stores the maximum number of dimensions to show. - */ - int maxdim = OverviewPlot.MAX_DIMENSIONS_DEFAULT; - - /** * Visualization manager. */ VisualizerParameterizer manager; @@ -101,13 +85,11 @@ public class ResultVisualizer implements ResultHandler { * Constructor. * * @param title - * @param maxdim * @param manager */ - public ResultVisualizer(String title, int maxdim, VisualizerParameterizer manager) { + public ResultVisualizer(String title, VisualizerParameterizer manager) { super(); this.title = title; - this.maxdim = maxdim; this.manager = manager; } @@ -132,10 +114,9 @@ public class ResultVisualizer implements ResultHandler { @Override public void run() { try { - ResultWindow window = new ResultWindow(title, db, top, maxdim, context); + ResultWindow window = new ResultWindow(title, top, context); window.setVisible(true); window.setExtendedState(window.getExtendedState() | JFrame.MAXIMIZED_BOTH); - window.update(); window.showOverview(); } catch(Throwable e) { @@ -159,11 +140,6 @@ public class ResultVisualizer implements ResultHandler { String title; /** - * Stores the maximum number of dimensions to show. - */ - int maxdim = OverviewPlot.MAX_DIMENSIONS_DEFAULT; - - /** * Visualization manager. */ VisualizerParameterizer manager; @@ -176,16 +152,12 @@ public class ResultVisualizer implements ResultHandler { title = titleP.getValue(); } - IntParameter maxdimP = new IntParameter(MAXDIM_ID, new GreaterEqualConstraint(1), OverviewPlot.MAX_DIMENSIONS_DEFAULT); - if(config.grab(maxdimP)) { - maxdim = maxdimP.getValue(); - } manager = config.tryInstantiate(VisualizerParameterizer.class); } @Override protected ResultVisualizer makeInstance() { - return new ResultVisualizer(title, maxdim, manager); + return new ResultVisualizer(title, manager); } } }
\ No newline at end of file |