From 9567030a46a43274f9ac88d9a676f3d6aac91766 Mon Sep 17 00:00:00 2001 From: TheAssassin Date: Mon, 15 Apr 2024 01:10:26 +0200 Subject: [PATCH] Move properties into separate package This cleanup makes working with them more convenient. --- ...loatMinMaxPowerSpeedFrequencyProperty.java | 173 ------------------ .../thomas_oster/liblasercut/LaserCutter.java | 4 + .../liblasercut/Raster3dPart.java | 2 + .../liblasercut/RasterBuilder.java | 2 + .../thomas_oster/liblasercut/RasterPart.java | 2 + .../liblasercut/RasterizableJobPart.java | 2 + .../liblasercut/VectorCommand.java | 2 + .../thomas_oster/liblasercut/VectorPart.java | 2 + .../liblasercut/drivers/Dummy.java | 4 +- .../liblasercut/drivers/EpilogCutter.java | 5 +- .../drivers/EpilogEngraveProperty.java | 2 +- .../drivers/FloatPowerSpeedProperty.java | 2 +- .../drivers/FullSpectrumCutter.java | 2 +- .../drivers/GenericGcodeDriver.java | 4 +- .../liblasercut/drivers/GoldCutHPGL.java | 2 +- .../liblasercut/drivers/IModelaMill.java | 2 +- .../liblasercut/drivers/IModelaProperty.java | 2 +- .../liblasercut/drivers/K3EngraverDriver.java | 6 +- .../liblasercut/drivers/K40NanoDriver.java | 6 +- .../liblasercut/drivers/LaosCutter.java | 2 +- .../drivers/LaosCutterProperty.java | 2 +- .../drivers/LaosEngraveProperty.java | 2 +- .../drivers/LaserToolsTechnicsCutter.java | 3 +- .../liblasercut/drivers/Lasersaur.java | 2 +- .../drivers/MakeBlockXYPlotterProperty.java | 2 +- .../liblasercut/drivers/Ruida.java | 15 +- .../liblasercut/drivers/SampleDriver.java | 4 +- .../liblasercut/examples/PhotoPrint.java | 4 +- .../VectorPartScriptInterface.java | 2 +- .../AbstractLaserProperty.java | 2 +- ...FloatPowerSpeedFocusFrequencyProperty.java | 2 +- .../FloatPowerSpeedFocusProperty.java | 2 +- .../FloatPowerSpeedFrequencyProperty.java | 2 +- .../{ => properties}/LaserProperty.java | 4 +- .../PowerSpeedFocusFrequencyProperty.java | 2 +- .../PowerSpeedFocusProperty.java | 2 +- .../vectoroptimizers/OptimizerUtils.java | 2 +- .../vectoroptimizers/VectorOptimizer.java | 2 +- .../liblasercut/RasterizableJobPartTest.java | 3 + .../liblasercut/drivers/AllDriversTest.java | 2 +- .../drivers/EpilogHelixCutterTest.java | 2 +- .../drivers/EpilogZingCutterTest.java | 2 +- .../liblasercut/drivers/LaserCutterTest.java | 2 +- .../laserscript/ScriptInterpreterTest.java | 6 +- .../InnerFirstVectorOptimizerTest.java | 2 +- 45 files changed, 72 insertions(+), 231 deletions(-) delete mode 100644 src/main/java/de/thomas_oster/liblasercut/FloatMinMaxPowerSpeedFrequencyProperty.java rename src/main/java/de/thomas_oster/liblasercut/{ => properties}/AbstractLaserProperty.java (99%) rename src/main/java/de/thomas_oster/liblasercut/{ => properties}/FloatPowerSpeedFocusFrequencyProperty.java (99%) rename src/main/java/de/thomas_oster/liblasercut/{ => properties}/FloatPowerSpeedFocusProperty.java (99%) rename src/main/java/de/thomas_oster/liblasercut/{ => properties}/FloatPowerSpeedFrequencyProperty.java (98%) rename src/main/java/de/thomas_oster/liblasercut/{ => properties}/LaserProperty.java (94%) rename src/main/java/de/thomas_oster/liblasercut/{ => properties}/PowerSpeedFocusFrequencyProperty.java (98%) rename src/main/java/de/thomas_oster/liblasercut/{ => properties}/PowerSpeedFocusProperty.java (99%) diff --git a/src/main/java/de/thomas_oster/liblasercut/FloatMinMaxPowerSpeedFrequencyProperty.java b/src/main/java/de/thomas_oster/liblasercut/FloatMinMaxPowerSpeedFrequencyProperty.java deleted file mode 100644 index 4a759441..00000000 --- a/src/main/java/de/thomas_oster/liblasercut/FloatMinMaxPowerSpeedFrequencyProperty.java +++ /dev/null @@ -1,173 +0,0 @@ -/** - * This file is part of LibLaserCut. - * Copyright (C) 2011 - 2014 Thomas Oster - * Copyright (C) 2018 - 2023 Klaus Kämpf - * - * LibLaserCut is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * LibLaserCut 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with LibLaserCut. If not, see . - * - **/ - -package de.thomas_oster.liblasercut; - -import java.util.Arrays; -import java.util.LinkedList; - -/* - * Add 'min power' to FloatPowerSpeedFrequencyProperty - */ - -public class FloatMinMaxPowerSpeedFrequencyProperty extends FloatPowerSpeedFrequencyProperty { - - private float min_power = 10.0f; - private static final String MIN_POWER = "min power"; - - public FloatMinMaxPowerSpeedFrequencyProperty() - { - super(); - } - - public FloatMinMaxPowerSpeedFrequencyProperty(LaserProperty o) - { - for (String k : o.getPropertyKeys()) - { - Object p; - p = o.getProperty(k); - if (p != null) { - this.setProperty(k, p); - } - } - } - - /** - * Get the value of min power - * - * @return float - */ - public float getMinPower() - { - return min_power; - } - - /** - * Set the value of min power - * - * @param min power - */ - public void setMinPower(float power) - { - power = power < 0 ? 0 : power; - power = power > 100 ? 100 : power; - if (power > this.getPower()) { /* minimum must not be larger than maximum */ - this.setPower(power); /* increase max power, so that user can first enter min, then max power */ - } - this.min_power = power; - } - - @Override - public String[] getPropertyKeys() - { - LinkedList result = new LinkedList(); - result.add(MIN_POWER); - result.addAll(Arrays.asList(super.getPropertyKeys())); - return result.toArray(new String[0]); - } - - @Override - public Object getProperty(String name) - { - if (MIN_POWER.equals(name)) { - return (Float) this.getMinPower(); - } - else { - return super.getProperty(name); - } - } - - @Override - public Object getMinimumValue(String name) - { - if (MIN_POWER.equals(name)) { - return 0f; - } - else { - return super.getProperty(name); - } - } - - @Override - public Object getMaximumValue(String name) - { - if (MIN_POWER.equals(name)) { - return 100f; - } - else { - return super.getProperty(name); - } - } - - @Override - public void setProperty(String name, Object value) - { - if (MIN_POWER.equals(name)) { - this.setMinPower((Float) value); - } - else { - super.setProperty(name, value); - } - } - - @Override - public FloatMinMaxPowerSpeedFrequencyProperty clone() - { - FloatMinMaxPowerSpeedFrequencyProperty result = new FloatMinMaxPowerSpeedFrequencyProperty(); - Object p; - for (String s:this.getPropertyKeys()) - { - p = this.getProperty(s); - if (p != null) { - result.setProperty(s, p); - } - } - return result; - } - - @Override - public boolean equals(Object obj) { - if (obj == null) { - return false; - } - if (!(obj instanceof FloatMinMaxPowerSpeedFrequencyProperty)) { - return false; - } - final FloatMinMaxPowerSpeedFrequencyProperty other = (FloatMinMaxPowerSpeedFrequencyProperty) obj; - if (this.min_power != other.min_power) { - return false; - } - return super.equals(other); - } - - @Override - public int hashCode() { - int hash = 5; - hash = 97 * hash + (int)min_power; - hash = 97 * hash + super.hashCode(); - return hash; - } - - public String toString() - { - return "FloatMinMaxPowerSpeedFrequencyProperty(min power="+getMinPower()+", max power="+getPower()+", speed="+getSpeed()+", frequency="+getFrequency()+")"; - } - -} diff --git a/src/main/java/de/thomas_oster/liblasercut/LaserCutter.java b/src/main/java/de/thomas_oster/liblasercut/LaserCutter.java index 61d55733..c783d935 100644 --- a/src/main/java/de/thomas_oster/liblasercut/LaserCutter.java +++ b/src/main/java/de/thomas_oster/liblasercut/LaserCutter.java @@ -24,6 +24,10 @@ import de.thomas_oster.liblasercut.platform.Point; import de.thomas_oster.liblasercut.platform.Util; +import de.thomas_oster.liblasercut.properties.LaserProperty; +import de.thomas_oster.liblasercut.properties.PowerSpeedFocusFrequencyProperty; +import de.thomas_oster.liblasercut.properties.PowerSpeedFocusProperty; + import java.io.OutputStream; import java.util.LinkedList; diff --git a/src/main/java/de/thomas_oster/liblasercut/Raster3dPart.java b/src/main/java/de/thomas_oster/liblasercut/Raster3dPart.java index 4f0e7e24..2bc305f1 100644 --- a/src/main/java/de/thomas_oster/liblasercut/Raster3dPart.java +++ b/src/main/java/de/thomas_oster/liblasercut/Raster3dPart.java @@ -19,6 +19,8 @@ package de.thomas_oster.liblasercut; import de.thomas_oster.liblasercut.platform.Point; +import de.thomas_oster.liblasercut.properties.LaserProperty; + import java.util.List; /** diff --git a/src/main/java/de/thomas_oster/liblasercut/RasterBuilder.java b/src/main/java/de/thomas_oster/liblasercut/RasterBuilder.java index efc9b010..5ae9570a 100644 --- a/src/main/java/de/thomas_oster/liblasercut/RasterBuilder.java +++ b/src/main/java/de/thomas_oster/liblasercut/RasterBuilder.java @@ -20,6 +20,8 @@ package de.thomas_oster.liblasercut; import de.thomas_oster.liblasercut.VectorCommand.CmdType; +import de.thomas_oster.liblasercut.properties.AbstractLaserProperty; + import java.util.Iterator; /** diff --git a/src/main/java/de/thomas_oster/liblasercut/RasterPart.java b/src/main/java/de/thomas_oster/liblasercut/RasterPart.java index 8a5eeb81..1ee9772d 100644 --- a/src/main/java/de/thomas_oster/liblasercut/RasterPart.java +++ b/src/main/java/de/thomas_oster/liblasercut/RasterPart.java @@ -19,6 +19,8 @@ package de.thomas_oster.liblasercut; import de.thomas_oster.liblasercut.platform.Point; +import de.thomas_oster.liblasercut.properties.LaserProperty; + import java.util.List; /** diff --git a/src/main/java/de/thomas_oster/liblasercut/RasterizableJobPart.java b/src/main/java/de/thomas_oster/liblasercut/RasterizableJobPart.java index 5bae7e9c..c0580bd6 100644 --- a/src/main/java/de/thomas_oster/liblasercut/RasterizableJobPart.java +++ b/src/main/java/de/thomas_oster/liblasercut/RasterizableJobPart.java @@ -19,6 +19,8 @@ package de.thomas_oster.liblasercut; import de.thomas_oster.liblasercut.platform.Point; +import de.thomas_oster.liblasercut.properties.LaserProperty; + import java.util.List; /** diff --git a/src/main/java/de/thomas_oster/liblasercut/VectorCommand.java b/src/main/java/de/thomas_oster/liblasercut/VectorCommand.java index 899147e8..6557a8b8 100644 --- a/src/main/java/de/thomas_oster/liblasercut/VectorCommand.java +++ b/src/main/java/de/thomas_oster/liblasercut/VectorCommand.java @@ -22,6 +22,8 @@ */ package de.thomas_oster.liblasercut; +import de.thomas_oster.liblasercut.properties.LaserProperty; + /** * * @author Thomas Oster diff --git a/src/main/java/de/thomas_oster/liblasercut/VectorPart.java b/src/main/java/de/thomas_oster/liblasercut/VectorPart.java index 1540ff6b..40aa8af5 100644 --- a/src/main/java/de/thomas_oster/liblasercut/VectorPart.java +++ b/src/main/java/de/thomas_oster/liblasercut/VectorPart.java @@ -18,6 +18,8 @@ */ package de.thomas_oster.liblasercut; +import de.thomas_oster.liblasercut.properties.LaserProperty; + import java.util.LinkedList; import java.util.List; diff --git a/src/main/java/de/thomas_oster/liblasercut/drivers/Dummy.java b/src/main/java/de/thomas_oster/liblasercut/drivers/Dummy.java index 2039be2a..573cc16b 100644 --- a/src/main/java/de/thomas_oster/liblasercut/drivers/Dummy.java +++ b/src/main/java/de/thomas_oster/liblasercut/drivers/Dummy.java @@ -22,8 +22,8 @@ import de.thomas_oster.liblasercut.JobPart; import de.thomas_oster.liblasercut.LaserCutter; import de.thomas_oster.liblasercut.LaserJob; -import de.thomas_oster.liblasercut.PowerSpeedFocusFrequencyProperty; -import de.thomas_oster.liblasercut.PowerSpeedFocusProperty; +import de.thomas_oster.liblasercut.properties.PowerSpeedFocusFrequencyProperty; +import de.thomas_oster.liblasercut.properties.PowerSpeedFocusProperty; import de.thomas_oster.liblasercut.ProgressListener; import de.thomas_oster.liblasercut.ProgressListenerDummy; import de.thomas_oster.liblasercut.Raster3dPart; diff --git a/src/main/java/de/thomas_oster/liblasercut/drivers/EpilogCutter.java b/src/main/java/de/thomas_oster/liblasercut/drivers/EpilogCutter.java index 839856b5..7af02250 100644 --- a/src/main/java/de/thomas_oster/liblasercut/drivers/EpilogCutter.java +++ b/src/main/java/de/thomas_oster/liblasercut/drivers/EpilogCutter.java @@ -26,7 +26,10 @@ import de.thomas_oster.liblasercut.*; import de.thomas_oster.liblasercut.platform.Point; -import de.thomas_oster.liblasercut.platform.Util; +import de.thomas_oster.liblasercut.properties.LaserProperty; +import de.thomas_oster.liblasercut.properties.PowerSpeedFocusFrequencyProperty; +import de.thomas_oster.liblasercut.properties.PowerSpeedFocusProperty; + import java.io.*; import java.net.InetSocketAddress; import java.net.Socket; diff --git a/src/main/java/de/thomas_oster/liblasercut/drivers/EpilogEngraveProperty.java b/src/main/java/de/thomas_oster/liblasercut/drivers/EpilogEngraveProperty.java index 17cb9196..81af4f82 100644 --- a/src/main/java/de/thomas_oster/liblasercut/drivers/EpilogEngraveProperty.java +++ b/src/main/java/de/thomas_oster/liblasercut/drivers/EpilogEngraveProperty.java @@ -18,7 +18,7 @@ */ package de.thomas_oster.liblasercut.drivers; -import de.thomas_oster.liblasercut.PowerSpeedFocusProperty; +import de.thomas_oster.liblasercut.properties.PowerSpeedFocusProperty; import java.util.Arrays; import java.util.LinkedList; diff --git a/src/main/java/de/thomas_oster/liblasercut/drivers/FloatPowerSpeedProperty.java b/src/main/java/de/thomas_oster/liblasercut/drivers/FloatPowerSpeedProperty.java index 05abe49d..30c62ab8 100644 --- a/src/main/java/de/thomas_oster/liblasercut/drivers/FloatPowerSpeedProperty.java +++ b/src/main/java/de/thomas_oster/liblasercut/drivers/FloatPowerSpeedProperty.java @@ -18,7 +18,7 @@ */ package de.thomas_oster.liblasercut.drivers; -import de.thomas_oster.liblasercut.LaserProperty; +import de.thomas_oster.liblasercut.properties.LaserProperty; /** * Based upon PowerSpeedFocusProperty by Thomas Oster diff --git a/src/main/java/de/thomas_oster/liblasercut/drivers/FullSpectrumCutter.java b/src/main/java/de/thomas_oster/liblasercut/drivers/FullSpectrumCutter.java index 874a8b43..dba58827 100644 --- a/src/main/java/de/thomas_oster/liblasercut/drivers/FullSpectrumCutter.java +++ b/src/main/java/de/thomas_oster/liblasercut/drivers/FullSpectrumCutter.java @@ -23,7 +23,7 @@ import de.thomas_oster.liblasercut.JobPart; import de.thomas_oster.liblasercut.LaserCutter; import de.thomas_oster.liblasercut.LaserJob; -import de.thomas_oster.liblasercut.LaserProperty; +import de.thomas_oster.liblasercut.properties.LaserProperty; import de.thomas_oster.liblasercut.ProgressListener; import de.thomas_oster.liblasercut.VectorCommand; import de.thomas_oster.liblasercut.VectorPart; diff --git a/src/main/java/de/thomas_oster/liblasercut/drivers/GenericGcodeDriver.java b/src/main/java/de/thomas_oster/liblasercut/drivers/GenericGcodeDriver.java index 24693f8a..5c3b593e 100644 --- a/src/main/java/de/thomas_oster/liblasercut/drivers/GenericGcodeDriver.java +++ b/src/main/java/de/thomas_oster/liblasercut/drivers/GenericGcodeDriver.java @@ -18,12 +18,12 @@ */ package de.thomas_oster.liblasercut.drivers; -import de.thomas_oster.liblasercut.FloatPowerSpeedFocusProperty; +import de.thomas_oster.liblasercut.properties.FloatPowerSpeedFocusProperty; import de.thomas_oster.liblasercut.IllegalJobException; import de.thomas_oster.liblasercut.JobPart; import de.thomas_oster.liblasercut.LaserCutter; import de.thomas_oster.liblasercut.LaserJob; -import de.thomas_oster.liblasercut.LaserProperty; +import de.thomas_oster.liblasercut.properties.LaserProperty; import de.thomas_oster.liblasercut.OptionSelector; import de.thomas_oster.liblasercut.ProgressListener; import de.thomas_oster.liblasercut.ProgressListenerDummy; diff --git a/src/main/java/de/thomas_oster/liblasercut/drivers/GoldCutHPGL.java b/src/main/java/de/thomas_oster/liblasercut/drivers/GoldCutHPGL.java index 5b31246d..106be36d 100644 --- a/src/main/java/de/thomas_oster/liblasercut/drivers/GoldCutHPGL.java +++ b/src/main/java/de/thomas_oster/liblasercut/drivers/GoldCutHPGL.java @@ -25,7 +25,7 @@ import de.thomas_oster.liblasercut.JobPart; import de.thomas_oster.liblasercut.LaserCutter; import de.thomas_oster.liblasercut.LaserJob; -import de.thomas_oster.liblasercut.LaserProperty; +import de.thomas_oster.liblasercut.properties.LaserProperty; import de.thomas_oster.liblasercut.ProgressListener; import de.thomas_oster.liblasercut.ProgressListenerDummy; import de.thomas_oster.liblasercut.RasterizableJobPart; diff --git a/src/main/java/de/thomas_oster/liblasercut/drivers/IModelaMill.java b/src/main/java/de/thomas_oster/liblasercut/drivers/IModelaMill.java index 8e64a5de..8b795011 100644 --- a/src/main/java/de/thomas_oster/liblasercut/drivers/IModelaMill.java +++ b/src/main/java/de/thomas_oster/liblasercut/drivers/IModelaMill.java @@ -23,7 +23,7 @@ import de.thomas_oster.liblasercut.JobPart; import de.thomas_oster.liblasercut.LaserCutter; import de.thomas_oster.liblasercut.LaserJob; -import de.thomas_oster.liblasercut.LaserProperty; +import de.thomas_oster.liblasercut.properties.LaserProperty; import de.thomas_oster.liblasercut.ProgressListener; import de.thomas_oster.liblasercut.ProgressListenerDummy; import de.thomas_oster.liblasercut.Raster3dPart; diff --git a/src/main/java/de/thomas_oster/liblasercut/drivers/IModelaProperty.java b/src/main/java/de/thomas_oster/liblasercut/drivers/IModelaProperty.java index 9516f57d..5c7a1898 100644 --- a/src/main/java/de/thomas_oster/liblasercut/drivers/IModelaProperty.java +++ b/src/main/java/de/thomas_oster/liblasercut/drivers/IModelaProperty.java @@ -19,7 +19,7 @@ package de.thomas_oster.liblasercut.drivers; -import de.thomas_oster.liblasercut.LaserProperty; +import de.thomas_oster.liblasercut.properties.LaserProperty; import de.thomas_oster.liblasercut.platform.Util; /** diff --git a/src/main/java/de/thomas_oster/liblasercut/drivers/K3EngraverDriver.java b/src/main/java/de/thomas_oster/liblasercut/drivers/K3EngraverDriver.java index cc310f72..fc8d459b 100644 --- a/src/main/java/de/thomas_oster/liblasercut/drivers/K3EngraverDriver.java +++ b/src/main/java/de/thomas_oster/liblasercut/drivers/K3EngraverDriver.java @@ -21,13 +21,13 @@ package de.thomas_oster.liblasercut.drivers; import de.thomas_oster.liblasercut.ByteArrayList; -import de.thomas_oster.liblasercut.FloatPowerSpeedFocusProperty; +import de.thomas_oster.liblasercut.properties.FloatPowerSpeedFocusProperty; import de.thomas_oster.liblasercut.IllegalJobException; import de.thomas_oster.liblasercut.JobPart; import de.thomas_oster.liblasercut.LaserCutter; import de.thomas_oster.liblasercut.LaserJob; -import de.thomas_oster.liblasercut.LaserProperty; -import de.thomas_oster.liblasercut.PowerSpeedFocusFrequencyProperty; +import de.thomas_oster.liblasercut.properties.LaserProperty; +import de.thomas_oster.liblasercut.properties.PowerSpeedFocusFrequencyProperty; import de.thomas_oster.liblasercut.ProgressListener; import de.thomas_oster.liblasercut.ProgressListenerDummy; import de.thomas_oster.liblasercut.Raster3dPart; diff --git a/src/main/java/de/thomas_oster/liblasercut/drivers/K40NanoDriver.java b/src/main/java/de/thomas_oster/liblasercut/drivers/K40NanoDriver.java index af7858d1..5be3e6a5 100644 --- a/src/main/java/de/thomas_oster/liblasercut/drivers/K40NanoDriver.java +++ b/src/main/java/de/thomas_oster/liblasercut/drivers/K40NanoDriver.java @@ -19,12 +19,12 @@ package de.thomas_oster.liblasercut.drivers; -import de.thomas_oster.liblasercut.AbstractLaserProperty; +import de.thomas_oster.liblasercut.properties.AbstractLaserProperty; import de.thomas_oster.liblasercut.IllegalJobException; import de.thomas_oster.liblasercut.JobPart; import de.thomas_oster.liblasercut.LaserCutter; import de.thomas_oster.liblasercut.LaserJob; -import de.thomas_oster.liblasercut.LaserProperty; +import de.thomas_oster.liblasercut.properties.LaserProperty; import de.thomas_oster.liblasercut.ProgressListener; import de.thomas_oster.liblasercut.RasterBuilder; import de.thomas_oster.liblasercut.RasterElement; @@ -32,7 +32,7 @@ import de.thomas_oster.liblasercut.VectorCommand; import de.thomas_oster.liblasercut.VectorPart; import de.thomas_oster.liblasercut.utils.LinefeedPrintStream; -import java.io.FileOutputStream; + import java.io.OutputStream; import java.io.PrintStream; diff --git a/src/main/java/de/thomas_oster/liblasercut/drivers/LaosCutter.java b/src/main/java/de/thomas_oster/liblasercut/drivers/LaosCutter.java index a143c418..5d673b14 100644 --- a/src/main/java/de/thomas_oster/liblasercut/drivers/LaosCutter.java +++ b/src/main/java/de/thomas_oster/liblasercut/drivers/LaosCutter.java @@ -23,7 +23,7 @@ import de.thomas_oster.liblasercut.JobPart; import de.thomas_oster.liblasercut.LaserCutter; import de.thomas_oster.liblasercut.LaserJob; -import de.thomas_oster.liblasercut.LaserProperty; +import de.thomas_oster.liblasercut.properties.LaserProperty; import de.thomas_oster.liblasercut.ProgressListener; import de.thomas_oster.liblasercut.Raster3dPart; import de.thomas_oster.liblasercut.RasterPart; diff --git a/src/main/java/de/thomas_oster/liblasercut/drivers/LaosCutterProperty.java b/src/main/java/de/thomas_oster/liblasercut/drivers/LaosCutterProperty.java index 95857c13..7b3ccd71 100644 --- a/src/main/java/de/thomas_oster/liblasercut/drivers/LaosCutterProperty.java +++ b/src/main/java/de/thomas_oster/liblasercut/drivers/LaosCutterProperty.java @@ -18,7 +18,7 @@ */ package de.thomas_oster.liblasercut.drivers; -import de.thomas_oster.liblasercut.FloatPowerSpeedFocusFrequencyProperty; +import de.thomas_oster.liblasercut.properties.FloatPowerSpeedFocusFrequencyProperty; import java.util.Arrays; import java.util.LinkedList; diff --git a/src/main/java/de/thomas_oster/liblasercut/drivers/LaosEngraveProperty.java b/src/main/java/de/thomas_oster/liblasercut/drivers/LaosEngraveProperty.java index cbdf9701..5489b1c9 100644 --- a/src/main/java/de/thomas_oster/liblasercut/drivers/LaosEngraveProperty.java +++ b/src/main/java/de/thomas_oster/liblasercut/drivers/LaosEngraveProperty.java @@ -19,7 +19,7 @@ package de.thomas_oster.liblasercut.drivers; -import de.thomas_oster.liblasercut.LaserProperty; +import de.thomas_oster.liblasercut.properties.LaserProperty; import java.util.Arrays; import java.util.LinkedList; diff --git a/src/main/java/de/thomas_oster/liblasercut/drivers/LaserToolsTechnicsCutter.java b/src/main/java/de/thomas_oster/liblasercut/drivers/LaserToolsTechnicsCutter.java index 0add1cc1..f8e642d2 100644 --- a/src/main/java/de/thomas_oster/liblasercut/drivers/LaserToolsTechnicsCutter.java +++ b/src/main/java/de/thomas_oster/liblasercut/drivers/LaserToolsTechnicsCutter.java @@ -23,7 +23,7 @@ import de.thomas_oster.liblasercut.JobPart; import de.thomas_oster.liblasercut.LaserCutter; import de.thomas_oster.liblasercut.LaserJob; -import de.thomas_oster.liblasercut.LaserProperty; +import de.thomas_oster.liblasercut.properties.LaserProperty; import de.thomas_oster.liblasercut.ProgressListener; import de.thomas_oster.liblasercut.ProgressListenerDummy; import de.thomas_oster.liblasercut.Raster3dPart; @@ -44,7 +44,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; -import java.util.Iterator; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; diff --git a/src/main/java/de/thomas_oster/liblasercut/drivers/Lasersaur.java b/src/main/java/de/thomas_oster/liblasercut/drivers/Lasersaur.java index 5aea22f3..5012d604 100644 --- a/src/main/java/de/thomas_oster/liblasercut/drivers/Lasersaur.java +++ b/src/main/java/de/thomas_oster/liblasercut/drivers/Lasersaur.java @@ -22,7 +22,7 @@ import de.thomas_oster.liblasercut.JobPart; import de.thomas_oster.liblasercut.LaserCutter; import de.thomas_oster.liblasercut.LaserJob; -import de.thomas_oster.liblasercut.LaserProperty; +import de.thomas_oster.liblasercut.properties.LaserProperty; import de.thomas_oster.liblasercut.ProgressListener; import de.thomas_oster.liblasercut.ProgressListenerDummy; import de.thomas_oster.liblasercut.RasterizableJobPart; diff --git a/src/main/java/de/thomas_oster/liblasercut/drivers/MakeBlockXYPlotterProperty.java b/src/main/java/de/thomas_oster/liblasercut/drivers/MakeBlockXYPlotterProperty.java index 1f211d21..5d74049d 100644 --- a/src/main/java/de/thomas_oster/liblasercut/drivers/MakeBlockXYPlotterProperty.java +++ b/src/main/java/de/thomas_oster/liblasercut/drivers/MakeBlockXYPlotterProperty.java @@ -23,7 +23,7 @@ package de.thomas_oster.liblasercut.drivers; -import de.thomas_oster.liblasercut.PowerSpeedFocusFrequencyProperty; +import de.thomas_oster.liblasercut.properties.PowerSpeedFocusFrequencyProperty; import java.util.Arrays; import java.util.LinkedList; diff --git a/src/main/java/de/thomas_oster/liblasercut/drivers/Ruida.java b/src/main/java/de/thomas_oster/liblasercut/drivers/Ruida.java index d6f90d52..98e8ddaf 100644 --- a/src/main/java/de/thomas_oster/liblasercut/drivers/Ruida.java +++ b/src/main/java/de/thomas_oster/liblasercut/drivers/Ruida.java @@ -25,27 +25,20 @@ package de.thomas_oster.liblasercut.drivers; import de.thomas_oster.liblasercut.*; -import de.thomas_oster.liblasercut.platform.Point; import de.thomas_oster.liblasercut.platform.Util; import de.thomas_oster.liblasercut.VectorCommand.CmdType; -import java.io.ByteArrayOutputStream; + import java.io.InputStreamReader; -import java.io.DataOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; -import java.io.InputStreamReader; import java.io.OutputStream; import java.io.InputStream; import java.io.PrintStream; import java.lang.Math; import java.net.BindException; -import java.nio.ByteBuffer; -import java.nio.ByteOrder; import java.nio.charset.Charset; import java.util.Arrays; -import java.util.ArrayList; -import java.util.Collections; import java.util.Enumeration; import java.util.List; import java.util.Locale; @@ -54,15 +47,15 @@ import java.net.InetAddress; import java.net.DatagramPacket; import java.net.DatagramSocket; -import java.net.Socket; import java.net.SocketTimeoutException; import java.net.InetSocketAddress; -import java.net.UnknownHostException; -import java.net.URI; import java.net.URISyntaxException; /* for serial/usb i/o */ import java.util.concurrent.TimeUnit; + +import de.thomas_oster.liblasercut.properties.FloatMinMaxPowerSpeedFrequencyProperty; +import de.thomas_oster.liblasercut.properties.LaserProperty; import purejavacomm.CommPort; import purejavacomm.CommPortIdentifier; import purejavacomm.NoSuchPortException; diff --git a/src/main/java/de/thomas_oster/liblasercut/drivers/SampleDriver.java b/src/main/java/de/thomas_oster/liblasercut/drivers/SampleDriver.java index d863f7fc..b1e351a5 100644 --- a/src/main/java/de/thomas_oster/liblasercut/drivers/SampleDriver.java +++ b/src/main/java/de/thomas_oster/liblasercut/drivers/SampleDriver.java @@ -23,8 +23,8 @@ import de.thomas_oster.liblasercut.JobPart; import de.thomas_oster.liblasercut.LaserCutter; import de.thomas_oster.liblasercut.LaserJob; -import de.thomas_oster.liblasercut.LaserProperty; -import de.thomas_oster.liblasercut.PowerSpeedFocusFrequencyProperty; +import de.thomas_oster.liblasercut.properties.LaserProperty; +import de.thomas_oster.liblasercut.properties.PowerSpeedFocusFrequencyProperty; import de.thomas_oster.liblasercut.ProgressListener; import de.thomas_oster.liblasercut.VectorCommand; import de.thomas_oster.liblasercut.VectorPart; diff --git a/src/main/java/de/thomas_oster/liblasercut/examples/PhotoPrint.java b/src/main/java/de/thomas_oster/liblasercut/examples/PhotoPrint.java index 5ec8eb35..8cf6f45f 100644 --- a/src/main/java/de/thomas_oster/liblasercut/examples/PhotoPrint.java +++ b/src/main/java/de/thomas_oster/liblasercut/examples/PhotoPrint.java @@ -22,8 +22,8 @@ import de.thomas_oster.liblasercut.BlackWhiteRaster.DitherAlgorithm; import de.thomas_oster.liblasercut.IllegalJobException; import de.thomas_oster.liblasercut.LaserJob; -import de.thomas_oster.liblasercut.PowerSpeedFocusFrequencyProperty; -import de.thomas_oster.liblasercut.PowerSpeedFocusProperty; +import de.thomas_oster.liblasercut.properties.PowerSpeedFocusFrequencyProperty; +import de.thomas_oster.liblasercut.properties.PowerSpeedFocusProperty; import de.thomas_oster.liblasercut.RasterPart; import de.thomas_oster.liblasercut.VectorPart; import de.thomas_oster.liblasercut.drivers.EpilogZing; diff --git a/src/main/java/de/thomas_oster/liblasercut/laserscript/VectorPartScriptInterface.java b/src/main/java/de/thomas_oster/liblasercut/laserscript/VectorPartScriptInterface.java index ec8fb2f3..12d96f3d 100644 --- a/src/main/java/de/thomas_oster/liblasercut/laserscript/VectorPartScriptInterface.java +++ b/src/main/java/de/thomas_oster/liblasercut/laserscript/VectorPartScriptInterface.java @@ -18,7 +18,7 @@ */ package de.thomas_oster.liblasercut.laserscript; -import de.thomas_oster.liblasercut.LaserProperty; +import de.thomas_oster.liblasercut.properties.LaserProperty; import de.thomas_oster.liblasercut.VectorPart; import java.awt.geom.AffineTransform; diff --git a/src/main/java/de/thomas_oster/liblasercut/AbstractLaserProperty.java b/src/main/java/de/thomas_oster/liblasercut/properties/AbstractLaserProperty.java similarity index 99% rename from src/main/java/de/thomas_oster/liblasercut/AbstractLaserProperty.java rename to src/main/java/de/thomas_oster/liblasercut/properties/AbstractLaserProperty.java index decee1a3..2d85d62f 100644 --- a/src/main/java/de/thomas_oster/liblasercut/AbstractLaserProperty.java +++ b/src/main/java/de/thomas_oster/liblasercut/properties/AbstractLaserProperty.java @@ -17,7 +17,7 @@ */ -package de.thomas_oster.liblasercut; +package de.thomas_oster.liblasercut.properties; import java.util.ArrayList; import java.util.HashMap; diff --git a/src/main/java/de/thomas_oster/liblasercut/FloatPowerSpeedFocusFrequencyProperty.java b/src/main/java/de/thomas_oster/liblasercut/properties/FloatPowerSpeedFocusFrequencyProperty.java similarity index 99% rename from src/main/java/de/thomas_oster/liblasercut/FloatPowerSpeedFocusFrequencyProperty.java rename to src/main/java/de/thomas_oster/liblasercut/properties/FloatPowerSpeedFocusFrequencyProperty.java index e738b346..0f00c081 100644 --- a/src/main/java/de/thomas_oster/liblasercut/FloatPowerSpeedFocusFrequencyProperty.java +++ b/src/main/java/de/thomas_oster/liblasercut/properties/FloatPowerSpeedFocusFrequencyProperty.java @@ -16,7 +16,7 @@ along with LibLaserCut. If not, see . */ -package de.thomas_oster.liblasercut; +package de.thomas_oster.liblasercut.properties; /** * The LaserProperty holds all the parameters for parts of the LaserJob. diff --git a/src/main/java/de/thomas_oster/liblasercut/FloatPowerSpeedFocusProperty.java b/src/main/java/de/thomas_oster/liblasercut/properties/FloatPowerSpeedFocusProperty.java similarity index 99% rename from src/main/java/de/thomas_oster/liblasercut/FloatPowerSpeedFocusProperty.java rename to src/main/java/de/thomas_oster/liblasercut/properties/FloatPowerSpeedFocusProperty.java index 50919e8d..c7b9d899 100644 --- a/src/main/java/de/thomas_oster/liblasercut/FloatPowerSpeedFocusProperty.java +++ b/src/main/java/de/thomas_oster/liblasercut/properties/FloatPowerSpeedFocusProperty.java @@ -16,7 +16,7 @@ along with LibLaserCut. If not, see . */ -package de.thomas_oster.liblasercut; +package de.thomas_oster.liblasercut.properties; /** * The LaserProperty holds all the parameters for parts of the LaserJob. diff --git a/src/main/java/de/thomas_oster/liblasercut/FloatPowerSpeedFrequencyProperty.java b/src/main/java/de/thomas_oster/liblasercut/properties/FloatPowerSpeedFrequencyProperty.java similarity index 98% rename from src/main/java/de/thomas_oster/liblasercut/FloatPowerSpeedFrequencyProperty.java rename to src/main/java/de/thomas_oster/liblasercut/properties/FloatPowerSpeedFrequencyProperty.java index a82957ca..76c5e7d8 100644 --- a/src/main/java/de/thomas_oster/liblasercut/FloatPowerSpeedFrequencyProperty.java +++ b/src/main/java/de/thomas_oster/liblasercut/properties/FloatPowerSpeedFrequencyProperty.java @@ -16,7 +16,7 @@ along with LibLaserCut. If not, see . */ -package de.thomas_oster.liblasercut; +package de.thomas_oster.liblasercut.properties; /** * The LaserProperty holds all the parameters for parts of the LaserJob. diff --git a/src/main/java/de/thomas_oster/liblasercut/LaserProperty.java b/src/main/java/de/thomas_oster/liblasercut/properties/LaserProperty.java similarity index 94% rename from src/main/java/de/thomas_oster/liblasercut/LaserProperty.java rename to src/main/java/de/thomas_oster/liblasercut/properties/LaserProperty.java index c6313cbe..c66b1af7 100644 --- a/src/main/java/de/thomas_oster/liblasercut/LaserProperty.java +++ b/src/main/java/de/thomas_oster/liblasercut/properties/LaserProperty.java @@ -16,7 +16,9 @@ along with LibLaserCut. If not, see . */ -package de.thomas_oster.liblasercut; +package de.thomas_oster.liblasercut.properties; + +import de.thomas_oster.liblasercut.Customizable; /** * The LaserProperty holds all the parameters for parts of the LaserJob. diff --git a/src/main/java/de/thomas_oster/liblasercut/PowerSpeedFocusFrequencyProperty.java b/src/main/java/de/thomas_oster/liblasercut/properties/PowerSpeedFocusFrequencyProperty.java similarity index 98% rename from src/main/java/de/thomas_oster/liblasercut/PowerSpeedFocusFrequencyProperty.java rename to src/main/java/de/thomas_oster/liblasercut/properties/PowerSpeedFocusFrequencyProperty.java index e1cb976a..391782c3 100644 --- a/src/main/java/de/thomas_oster/liblasercut/PowerSpeedFocusFrequencyProperty.java +++ b/src/main/java/de/thomas_oster/liblasercut/properties/PowerSpeedFocusFrequencyProperty.java @@ -16,7 +16,7 @@ along with LibLaserCut. If not, see . */ -package de.thomas_oster.liblasercut; +package de.thomas_oster.liblasercut.properties; /** * The LaserProperty holds all the parameters for parts of the LaserJob. diff --git a/src/main/java/de/thomas_oster/liblasercut/PowerSpeedFocusProperty.java b/src/main/java/de/thomas_oster/liblasercut/properties/PowerSpeedFocusProperty.java similarity index 99% rename from src/main/java/de/thomas_oster/liblasercut/PowerSpeedFocusProperty.java rename to src/main/java/de/thomas_oster/liblasercut/properties/PowerSpeedFocusProperty.java index a1402f34..23dc2617 100644 --- a/src/main/java/de/thomas_oster/liblasercut/PowerSpeedFocusProperty.java +++ b/src/main/java/de/thomas_oster/liblasercut/properties/PowerSpeedFocusProperty.java @@ -16,7 +16,7 @@ along with LibLaserCut. If not, see . */ -package de.thomas_oster.liblasercut; +package de.thomas_oster.liblasercut.properties; /** * The LaserProperty holds all the parameters for parts of the LaserJob. diff --git a/src/main/java/de/thomas_oster/liblasercut/vectoroptimizers/OptimizerUtils.java b/src/main/java/de/thomas_oster/liblasercut/vectoroptimizers/OptimizerUtils.java index 614a04e3..f849fa03 100644 --- a/src/main/java/de/thomas_oster/liblasercut/vectoroptimizers/OptimizerUtils.java +++ b/src/main/java/de/thomas_oster/liblasercut/vectoroptimizers/OptimizerUtils.java @@ -18,7 +18,7 @@ */ package de.thomas_oster.liblasercut.vectoroptimizers; -import de.thomas_oster.liblasercut.LaserProperty; +import de.thomas_oster.liblasercut.properties.LaserProperty; import de.thomas_oster.liblasercut.platform.Point; import de.thomas_oster.liblasercut.vectoroptimizers.VectorOptimizer.Element; import java.util.ArrayList; diff --git a/src/main/java/de/thomas_oster/liblasercut/vectoroptimizers/VectorOptimizer.java b/src/main/java/de/thomas_oster/liblasercut/vectoroptimizers/VectorOptimizer.java index 324deaf3..4a775c54 100644 --- a/src/main/java/de/thomas_oster/liblasercut/vectoroptimizers/VectorOptimizer.java +++ b/src/main/java/de/thomas_oster/liblasercut/vectoroptimizers/VectorOptimizer.java @@ -18,7 +18,7 @@ */ package de.thomas_oster.liblasercut.vectoroptimizers; -import de.thomas_oster.liblasercut.LaserProperty; +import de.thomas_oster.liblasercut.properties.LaserProperty; import de.thomas_oster.liblasercut.VectorCommand; import de.thomas_oster.liblasercut.VectorPart; import de.thomas_oster.liblasercut.platform.Point; diff --git a/src/test/java/de/thomas_oster/liblasercut/RasterizableJobPartTest.java b/src/test/java/de/thomas_oster/liblasercut/RasterizableJobPartTest.java index e40e87ab..a5f919b5 100644 --- a/src/test/java/de/thomas_oster/liblasercut/RasterizableJobPartTest.java +++ b/src/test/java/de/thomas_oster/liblasercut/RasterizableJobPartTest.java @@ -19,6 +19,9 @@ package de.thomas_oster.liblasercut; import de.thomas_oster.liblasercut.platform.Point; +import de.thomas_oster.liblasercut.properties.AbstractLaserProperty; +import de.thomas_oster.liblasercut.properties.FloatPowerSpeedFocusProperty; +import de.thomas_oster.liblasercut.properties.LaserProperty; import de.thomas_oster.liblasercut.utils.BufferedImageAdapter; import java.awt.image.BufferedImage; import java.util.List; diff --git a/src/test/java/de/thomas_oster/liblasercut/drivers/AllDriversTest.java b/src/test/java/de/thomas_oster/liblasercut/drivers/AllDriversTest.java index 7e1e7d73..6b52980f 100644 --- a/src/test/java/de/thomas_oster/liblasercut/drivers/AllDriversTest.java +++ b/src/test/java/de/thomas_oster/liblasercut/drivers/AllDriversTest.java @@ -22,7 +22,7 @@ import de.thomas_oster.liblasercut.IllegalJobException; import de.thomas_oster.liblasercut.LaserCutter; import de.thomas_oster.liblasercut.LaserJob; -import de.thomas_oster.liblasercut.LaserProperty; +import de.thomas_oster.liblasercut.properties.LaserProperty; import de.thomas_oster.liblasercut.LibInfo; import de.thomas_oster.liblasercut.Raster3dPart; import de.thomas_oster.liblasercut.RasterPart; diff --git a/src/test/java/de/thomas_oster/liblasercut/drivers/EpilogHelixCutterTest.java b/src/test/java/de/thomas_oster/liblasercut/drivers/EpilogHelixCutterTest.java index 2fcd566d..a148349d 100644 --- a/src/test/java/de/thomas_oster/liblasercut/drivers/EpilogHelixCutterTest.java +++ b/src/test/java/de/thomas_oster/liblasercut/drivers/EpilogHelixCutterTest.java @@ -19,8 +19,8 @@ package de.thomas_oster.liblasercut.drivers; import de.thomas_oster.liblasercut.*; -import de.thomas_oster.liblasercut.platform.Point; import de.thomas_oster.liblasercut.platform.Util; +import de.thomas_oster.liblasercut.properties.LaserProperty; import org.junit.Test; import java.util.Arrays; diff --git a/src/test/java/de/thomas_oster/liblasercut/drivers/EpilogZingCutterTest.java b/src/test/java/de/thomas_oster/liblasercut/drivers/EpilogZingCutterTest.java index 82d5b0c2..ae6ab50a 100644 --- a/src/test/java/de/thomas_oster/liblasercut/drivers/EpilogZingCutterTest.java +++ b/src/test/java/de/thomas_oster/liblasercut/drivers/EpilogZingCutterTest.java @@ -21,7 +21,7 @@ import static org.junit.Assert.assertEquals; import de.thomas_oster.liblasercut.LaserJob; -import de.thomas_oster.liblasercut.LaserProperty; +import de.thomas_oster.liblasercut.properties.LaserProperty; import de.thomas_oster.liblasercut.VectorPart; import de.thomas_oster.liblasercut.platform.Util; import java.util.Arrays; diff --git a/src/test/java/de/thomas_oster/liblasercut/drivers/LaserCutterTest.java b/src/test/java/de/thomas_oster/liblasercut/drivers/LaserCutterTest.java index 9addf6d8..add0bd93 100644 --- a/src/test/java/de/thomas_oster/liblasercut/drivers/LaserCutterTest.java +++ b/src/test/java/de/thomas_oster/liblasercut/drivers/LaserCutterTest.java @@ -20,7 +20,7 @@ import de.thomas_oster.liblasercut.GreyRaster; import de.thomas_oster.liblasercut.LaserJob; -import de.thomas_oster.liblasercut.LaserProperty; +import de.thomas_oster.liblasercut.properties.LaserProperty; import de.thomas_oster.liblasercut.RasterPart; import de.thomas_oster.liblasercut.VectorPart; import de.thomas_oster.liblasercut.platform.Point; diff --git a/src/test/java/de/thomas_oster/liblasercut/laserscript/ScriptInterpreterTest.java b/src/test/java/de/thomas_oster/liblasercut/laserscript/ScriptInterpreterTest.java index 73e192a3..1d79ca26 100644 --- a/src/test/java/de/thomas_oster/liblasercut/laserscript/ScriptInterpreterTest.java +++ b/src/test/java/de/thomas_oster/liblasercut/laserscript/ScriptInterpreterTest.java @@ -18,11 +18,9 @@ */ package de.thomas_oster.liblasercut.laserscript; -import de.thomas_oster.liblasercut.PowerSpeedFocusProperty; +import de.thomas_oster.liblasercut.properties.PowerSpeedFocusProperty; import de.thomas_oster.liblasercut.VectorPart; -import de.thomas_oster.liblasercut.laserscript.ScriptInterface; -import de.thomas_oster.liblasercut.laserscript.ScriptInterpreter; -import de.thomas_oster.liblasercut.laserscript.VectorPartScriptInterface; + import java.awt.geom.AffineTransform; import java.io.File; import java.io.IOException; diff --git a/src/test/java/de/thomas_oster/liblasercut/vectoroptimizers/InnerFirstVectorOptimizerTest.java b/src/test/java/de/thomas_oster/liblasercut/vectoroptimizers/InnerFirstVectorOptimizerTest.java index 68117eb7..ef29b7c3 100644 --- a/src/test/java/de/thomas_oster/liblasercut/vectoroptimizers/InnerFirstVectorOptimizerTest.java +++ b/src/test/java/de/thomas_oster/liblasercut/vectoroptimizers/InnerFirstVectorOptimizerTest.java @@ -18,7 +18,7 @@ */ package de.thomas_oster.liblasercut.vectoroptimizers; -import de.thomas_oster.liblasercut.PowerSpeedFocusProperty; +import de.thomas_oster.liblasercut.properties.PowerSpeedFocusProperty; import de.thomas_oster.liblasercut.platform.Point; import de.thomas_oster.liblasercut.platform.Rectangle; import de.thomas_oster.liblasercut.vectoroptimizers.VectorOptimizer.Element;