Skip to content

Commit

Permalink
Move properties into separate package
Browse files Browse the repository at this point in the history
This cleanup makes working with them more convenient.
  • Loading branch information
TheAssassin authored and mgmax committed Apr 20, 2024
1 parent 365301a commit 7d20ee0
Show file tree
Hide file tree
Showing 45 changed files with 73 additions and 59 deletions.
4 changes: 4 additions & 0 deletions src/main/java/de/thomas_oster/liblasercut/LaserCutter.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/de/thomas_oster/liblasercut/Raster3dPart.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/de/thomas_oster/liblasercut/RasterBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/de/thomas_oster/liblasercut/RasterPart.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/de/thomas_oster/liblasercut/VectorCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
*/
package de.thomas_oster.liblasercut;

import de.thomas_oster.liblasercut.properties.LaserProperty;

/**
*
* @author Thomas Oster <[email protected]>
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/de/thomas_oster/liblasercut/VectorPart.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
*/
package de.thomas_oster.liblasercut;

import de.thomas_oster.liblasercut.properties.LaserProperty;

import java.util.LinkedList;
import java.util.List;

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/de/thomas_oster/liblasercut/drivers/Dummy.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@

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;
import de.thomas_oster.liblasercut.RasterPart;
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
15 changes: 4 additions & 11 deletions src/main/java/de/thomas_oster/liblasercut/drivers/Ruida.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

package de.thomas_oster.liblasercut;
package de.thomas_oster.liblasercut.properties;

import java.util.ArrayList;
import java.util.HashMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*
**/

package de.thomas_oster.liblasercut;
package de.thomas_oster.liblasercut.properties;

import java.util.Arrays;
import java.util.LinkedList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
along with LibLaserCut. If not, see <http://www.gnu.org/licenses/>.
*/
package de.thomas_oster.liblasercut;
package de.thomas_oster.liblasercut.properties;

/**
* The LaserProperty holds all the parameters for parts of the LaserJob.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
along with LibLaserCut. If not, see <http://www.gnu.org/licenses/>.
*/
package de.thomas_oster.liblasercut;
package de.thomas_oster.liblasercut.properties;

/**
* The LaserProperty holds all the parameters for parts of the LaserJob.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
along with LibLaserCut. If not, see <http://www.gnu.org/licenses/>.
*/
package de.thomas_oster.liblasercut;
package de.thomas_oster.liblasercut.properties;

/**
* The LaserProperty holds all the parameters for parts of the LaserJob.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
along with LibLaserCut. If not, see <http://www.gnu.org/licenses/>.
*/
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.
Expand Down
Loading

0 comments on commit 7d20ee0

Please sign in to comment.