From 87873e974cb1961fd366ce3b8f0053ccda52e947 Mon Sep 17 00:00:00 2001 From: Thomas Oster <thomas.oster@rwth-aachen.de> Date: Sun, 16 Sep 2012 23:29:53 +0200 Subject: [PATCH] AutoFocus is part of the LaserCutter Interface --- src/com/t_oster/liblasercut/LaserCutter.java | 10 ++++++++++ src/com/t_oster/liblasercut/drivers/EpilogCutter.java | 1 + 2 files changed, 11 insertions(+) diff --git a/src/com/t_oster/liblasercut/LaserCutter.java b/src/com/t_oster/liblasercut/LaserCutter.java index c585eb9..22176e7 100644 --- a/src/com/t_oster/liblasercut/LaserCutter.java +++ b/src/com/t_oster/liblasercut/LaserCutter.java @@ -98,6 +98,16 @@ public abstract class LaserCutter implements Cloneable */ public abstract void sendJob(LaserJob job, ProgressListener pl) throws IllegalJobException, Exception; + /** + * If you lasercutter supports autofocus, override this method, + * to let programs like VisiCut know, that they don't need to focus. + * @return + */ + public boolean isAutoFocus() + { + return false; + } + /** * This calls sendJob(job, pl) with a default progress listener, which * just dumps everythong on the command line diff --git a/src/com/t_oster/liblasercut/drivers/EpilogCutter.java b/src/com/t_oster/liblasercut/drivers/EpilogCutter.java index 9f5adda..61e4e50 100644 --- a/src/com/t_oster/liblasercut/drivers/EpilogCutter.java +++ b/src/com/t_oster/liblasercut/drivers/EpilogCutter.java @@ -86,6 +86,7 @@ abstract class EpilogCutter extends LaserCutter this.hostname = hostname; } + @Override public boolean isAutoFocus() { return this.autofocus; -- GitLab