diff --git a/java_console/.idea/libraries/surfaceplotter.xml b/java_console/.idea/libraries/surfaceplotter.xml deleted file mode 100644 index 125a69ec07..0000000000 --- a/java_console/.idea/libraries/surfaceplotter.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/java_console/build.xml b/java_console/build.xml index d78602f3f8..6732cedb3d 100644 --- a/java_console/build.xml +++ b/java_console/build.xml @@ -26,7 +26,6 @@ lib/SteelSeries-3.9.30.jar lib/annotations.jar lib/miglayout-4.0.jar - lib/surfaceplotter-2.0.1.jar ../java_tools/configuration_definition/lib/antlr-4.9.3-complete.jar lib/javacan-core.jar @@ -167,7 +166,6 @@ - diff --git a/java_console/lib/surfaceplotter-2.0.1-sources.jar b/java_console/lib/surfaceplotter-2.0.1-sources.jar deleted file mode 100644 index 3cf4e8ce5d..0000000000 Binary files a/java_console/lib/surfaceplotter-2.0.1-sources.jar and /dev/null differ diff --git a/java_console/lib/surfaceplotter-2.0.1.jar b/java_console/lib/surfaceplotter-2.0.1.jar deleted file mode 100644 index 02ef403794..0000000000 Binary files a/java_console/lib/surfaceplotter-2.0.1.jar and /dev/null differ diff --git a/java_console/ui/src/main/java/com/rusefi/ui/ChartHelper.java b/java_console/ui/src/main/java/com/rusefi/ui/ChartHelper.java deleted file mode 100644 index 15b6a3f282..0000000000 --- a/java_console/ui/src/main/java/com/rusefi/ui/ChartHelper.java +++ /dev/null @@ -1,146 +0,0 @@ -package com.rusefi.ui; - -import com.rusefi.FileLog; -import com.rusefi.models.Range; -import com.rusefi.models.XYData; -import com.rusefi.ui.util.UiUtils; -import com.rusefi.ui.util.JTextFieldWithWidth; -//import net.ericaro.surfaceplotter.DefaultSurfaceModel; -//import net.ericaro.surfaceplotter.JSurfacePanel; -//import net.ericaro.surfaceplotter.Mapper; -//import net.ericaro.surfaceplotter.surface.SurfaceModel; - -import javax.swing.*; -import java.awt.*; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; - -import static com.rusefi.models.Utils.parseIntWithReason; - -/** - * Date: 1/22/13 - * Andrey Belomutskiy, (c) 2013-2020 - */ -/* -public class ChartHelper { - private ChartHelper() { - } - - public static JPanel create3DControl(final XYData data, SurfaceModel surfaceModel, String title) { - final JPanel result = new JPanel(new BorderLayout()); - result.setBorder(BorderFactory.createLineBorder(Color.red)); - - final JSurfacePanel jsp = new JSurfacePanel(surfaceModel); - jsp.setTitleText(title); - jsp.setConfigurationVisible(true); - jsp.getSurface().setXLabel("RPM"); - jsp.getSurface().setYLabel("MAF voltage"); - result.add(BorderLayout.CENTER, jsp); - - JButton saveImageButton = UiUtils.createSaveImageButton(); - saveImageButton.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - String fileName = FileLog.getDate() + "_3d.png"; - - UiUtils.saveImageWithPrompt(fileName, result, jsp); - } - }); - - JPanel upperPanel = new JPanel(new FlowLayout()); - upperPanel.add(saveImageButton); - result.add(upperPanel, BorderLayout.NORTH); - - JPanel bottomPanel = new JPanel(new FlowLayout()); - bottomPanel.add(new JLabel("RPM: ")); - - final JTextField xField = new JTextFieldWithWidth("1200", 150); - final JTextField yField = new JTextFieldWithWidth("50", 150); - bottomPanel.add(xField); - bottomPanel.add(yField); - - final JLabel currentValue = new JLabel(); - bottomPanel.add(currentValue); - - result.add(bottomPanel, BorderLayout.SOUTH); - - ActionListener updateValue = new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - int rpm = parseIntWithReason(xField.getText(), "CH xField"); - - double y = Double.parseDouble(yField.getText()); - - currentValue.setText("" + data.getValue(rpm, y)); - } - }; - xField.addActionListener(updateValue); - yField.addActionListener(updateValue); - - updateValue.actionPerformed(null); - - return result; - } - - public static DefaultSurfaceModel createDefaultSurfaceModel(final XYData data) { - return createDefaultSurfaceModel(data, null); - } - - public static DefaultSurfaceModel createDefaultSurfaceModel(final XYData data, final XYData data2) { - Range xRange = new Range((float) data.getMinXValue(), (float) data.getMaxXValue()); - Range yRange = new Range((float) data.getMinYValue(), (float) data.getMaxYValue()); - - return createDefaultSurfaceModel(data, xRange, yRange, data2); - } - - public static DefaultSurfaceModel createDefaultSurfaceModel(final XYData data, Range xRange, Range yRange) { - return createDefaultSurfaceModel(data, xRange, yRange, null); - } - - public static DefaultSurfaceModel createDefaultSurfaceModel(final XYData data, Range xRange, Range yRange, final XYData data2) { - final DefaultSurfaceModel sm = new DefaultSurfaceModel(); - - sm.setPlotFunction2(false); - - sm.setCalcDivisions(50); - sm.setDispDivisions(50); - sm.setContourLines(10); - - sm.setXMin(xRange.getMin()); - sm.setXMax(xRange.getMax()); - setYRange(yRange, sm); - - sm.setBoxed(true); - sm.setDisplayXY(true); - sm.setExpectDelay(false); - sm.setAutoScaleZ(true); - sm.setDisplayZ(true); - sm.setMesh(true); - sm.setPlotType(SurfaceModel.PlotType.SURFACE); - if (data2 == null) - sm.setFirstFunctionOnly(true); - else - sm.setBothFunction(true); - - sm.setPlotColor(data2 != null ? SurfaceModel.PlotColor.FOG : SurfaceModel.PlotColor.SPECTRUM); - sm.setMapper(new Mapper() { - public float f1(float x, float y) { - return data.getValue(x, y); - } - - public float f2(float x, float y) { - if (data2 == null) - return 0; - return data2.getValue(x, y); - } - }); - sm.plot().execute(); - return sm; - } - - public static void setYRange(Range yRange, DefaultSurfaceModel sm) { - sm.setYMin(yRange.getMin()); - sm.setYMax(yRange.getMax()); - } -} -*/ \ No newline at end of file