From 0832f4784ab8315f34bb3b212ea1600d4ecc404e Mon Sep 17 00:00:00 2001 From: Rob Faust Date: Mon, 4 Dec 2023 20:06:22 -0600 Subject: [PATCH] Code cleanup --- build.gradle | 2 +- .../api/model/components/AComponent.java | 12 ++++---- .../api/model/components/AContainer.java | 9 ++---- .../api/model/components/AFontComponent.java | 8 +++--- .../api/model/components/CAddressBlock.java | 10 +++---- .../api/model/components/CDataCommand.java | 4 +-- .../api/model/components/CImage.java | 6 ++-- .../api/model/components/CLabel.java | 28 +++++++++++-------- .../api/model/components/CLayer.java | 4 +-- .../labelzoom/api/model/components/CLine.java | 6 ++-- .../api/model/components/CRectangle.java | 6 ++-- .../api/model/components/CStaticText.java | 2 +- .../api/model/components/CVariableText.java | 12 ++++---- .../model/components/barcodes/ABarcode.java | 8 +++--- .../barcodes/linear/ALinearBarcode.java | 8 +++--- .../barcodes/linear/CBarcodeAnsiCodabar.java | 10 +++---- .../barcodes/linear/CBarcodeCode11.java | 6 ++-- .../barcodes/linear/CBarcodeCode128.java | 6 ++-- .../barcodes/linear/CBarcodeCode39.java | 6 ++-- .../barcodes/linear/CBarcodeCode93.java | 4 +-- .../barcodes/linear/CBarcodeEAN13.java | 2 +- .../barcodes/linear/CBarcodeEAN8.java | 2 +- .../linear/CBarcodeIndustrial2of5.java | 2 +- .../linear/CBarcodeInterleaved2of5.java | 2 +- .../barcodes/linear/CBarcodeLogmars.java | 2 +- .../barcodes/linear/CBarcodeMsi.java | 2 +- .../barcodes/linear/CBarcodePlanetCode.java | 2 +- .../barcodes/linear/CBarcodePlessey.java | 2 +- .../barcodes/linear/CBarcodePostal.java | 2 +- .../barcodes/linear/CBarcodeStandard2of5.java | 2 +- .../barcodes/linear/CBarcodeUPCA.java | 2 +- .../barcodes/linear/CBarcodeUPCE.java | 2 +- .../linear/CBarcodeUpcEanExtensions.java | 2 +- .../barcodes/twod/CBarcodeAztec.java | 3 +- .../barcodes/twod/CBarcodeDataMatrix.java | 2 +- .../barcodes/twod/CBarcodeMaxicode.java | 4 +-- .../barcodes/twod/CBarcodePDF417.java | 3 +- .../barcodes/twod/CBarcodeQRCode.java | 4 +-- 38 files changed, 100 insertions(+), 99 deletions(-) diff --git a/build.gradle b/build.gradle index b72bf9a..1d540a7 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ plugins { } group = 'com.labelzoom.api' -version = '1.0.8' +version = '1.0.9' repositories { mavenCentral() diff --git a/src/main/java/com/labelzoom/api/model/components/AComponent.java b/src/main/java/com/labelzoom/api/model/components/AComponent.java index a6c0017..2016121 100644 --- a/src/main/java/com/labelzoom/api/model/components/AComponent.java +++ b/src/main/java/com/labelzoom/api/model/components/AComponent.java @@ -20,22 +20,22 @@ public abstract class AComponent implements Cloneable { @Setter - protected int left; + private int left; @Setter - protected int top; + private int top; - protected float rotation = 0; + private float rotation = 0; public void setRotation(float rotation) { this.rotation = rotation % 360; } @Setter - protected boolean reverse = false; + private boolean reverse = false; @Setter - protected Justification justification = Justification.Left; + private Justification justification = Justification.Left; @Setter - protected PositioningMode positioningMode = PositioningMode.Origin; + private PositioningMode positioningMode = PositioningMode.Origin; /** * Parameterless constructor diff --git a/src/main/java/com/labelzoom/api/model/components/AContainer.java b/src/main/java/com/labelzoom/api/model/components/AContainer.java index 0e32e25..1be98d7 100644 --- a/src/main/java/com/labelzoom/api/model/components/AContainer.java +++ b/src/main/java/com/labelzoom/api/model/components/AContainer.java @@ -21,7 +21,7 @@ @Getter public abstract class AContainer extends AComponent { - protected List children = new ArrayList<>(); // Using ArrayList because that's what Jackson uses + private final List children = new ArrayList<>(); // Using ArrayList because that's what Jackson uses /** * Parameterless constructor @@ -37,12 +37,9 @@ protected AContainer(final AContainer original) super(original); // Clone children - if (original.children != null) + for (final AComponent component : original.children) { - for (final AComponent component : original.children) - { - children.add(component.clone()); - } + children.add(component.clone()); } } } diff --git a/src/main/java/com/labelzoom/api/model/components/AFontComponent.java b/src/main/java/com/labelzoom/api/model/components/AFontComponent.java index ab7950c..48ec812 100644 --- a/src/main/java/com/labelzoom/api/model/components/AFontComponent.java +++ b/src/main/java/com/labelzoom/api/model/components/AFontComponent.java @@ -18,13 +18,13 @@ @Getter @Setter public abstract class AFontComponent extends AComponent { - protected float horizontalScaling = 1.0f; + private float horizontalScaling = 1.0f; - protected float fontSize = 10.0f; + private float fontSize = 10.0f; - protected String font = "0"; + private String font = "0"; - protected boolean blankWhenNull = false; + private boolean blankWhenNull = false; /** * Parameterless constructor diff --git a/src/main/java/com/labelzoom/api/model/components/CAddressBlock.java b/src/main/java/com/labelzoom/api/model/components/CAddressBlock.java index 4dc9840..ca82033 100644 --- a/src/main/java/com/labelzoom/api/model/components/CAddressBlock.java +++ b/src/main/java/com/labelzoom/api/model/components/CAddressBlock.java @@ -18,15 +18,15 @@ @Getter @Setter public class CAddressBlock extends AFontComponent { - protected boolean useLocalizedAddressFormat = true; + private boolean useLocalizedAddressFormat = true; - protected int staticAddressFormat = 1; + private int staticAddressFormat = 1; - protected boolean showContactName = false; + private boolean showContactName = false; - protected boolean showCountry = false; + private boolean showCountry = false; - protected String addressId; + private String addressId; /** * Parameterless constructor diff --git a/src/main/java/com/labelzoom/api/model/components/CDataCommand.java b/src/main/java/com/labelzoom/api/model/components/CDataCommand.java index d277c54..a6b07c7 100644 --- a/src/main/java/com/labelzoom/api/model/components/CDataCommand.java +++ b/src/main/java/com/labelzoom/api/model/components/CDataCommand.java @@ -18,9 +18,9 @@ @Getter @Setter public class CDataCommand implements Cloneable { - protected String language; + private String language; - protected String dataCommand; + private String dataCommand; /** * Parameterless constructor diff --git a/src/main/java/com/labelzoom/api/model/components/CImage.java b/src/main/java/com/labelzoom/api/model/components/CImage.java index e8ea6fc..a2c6def 100644 --- a/src/main/java/com/labelzoom/api/model/components/CImage.java +++ b/src/main/java/com/labelzoom/api/model/components/CImage.java @@ -21,11 +21,11 @@ @Getter @Setter public class CImage extends AComponent { - protected BufferedImage image; + private BufferedImage image; - protected float horizontalScaling = 1; + private float horizontalScaling = 1; - protected float verticalScaling = 1; + private float verticalScaling = 1; /** * Parameterless constructor diff --git a/src/main/java/com/labelzoom/api/model/components/CLabel.java b/src/main/java/com/labelzoom/api/model/components/CLabel.java index 8d0e01b..10b98a9 100644 --- a/src/main/java/com/labelzoom/api/model/components/CLabel.java +++ b/src/main/java/com/labelzoom/api/model/components/CLabel.java @@ -21,33 +21,33 @@ public class CLabel { // Fields @Getter @Setter - protected int width; + private int width; @Getter @Setter - protected int height; + private int height; @Getter @Setter - protected boolean isHighRes = false; + private boolean isHighRes = false; @Getter @Setter - protected PageOrientation orientation = PageOrientation.Portrait; + private PageOrientation orientation = PageOrientation.Portrait; @Getter @Setter - protected List layers = new ArrayList<>(); // Using ArrayList because that's what Jackson uses + private List layers = new ArrayList<>(); // Using ArrayList because that's what Jackson uses - protected final Map layerMap = new TreeMap<>(); + private final Map layerMap = new TreeMap<>(); @Getter @Setter - protected CDataCommand dataCommand; + private CDataCommand dataCommand; @Getter @Setter - protected String schemaLocation; + private String schemaLocation; @Getter @Setter - protected String schemaVersion = "v1"; + private String schemaVersion = "v1"; @Getter @Setter - protected UUID id = UUID.randomUUID(); + private UUID id = UUID.randomUUID(); // Static/constants public static final String DEFAULT_LAYER_NAME = "background"; @@ -170,7 +170,13 @@ public CLabel clone(final boolean cloneData) public void addElement(final AComponent component) { - getLayerMap().get(DEFAULT_LAYER_NAME).getElements().add(component); + if (layers.isEmpty()) + { + final CLayer mainContainer = new CLayer(); + mainContainer.setName(DEFAULT_LAYER_NAME); + layers.add(mainContainer); + } + layers.get(0).getElements().add(component); } /** diff --git a/src/main/java/com/labelzoom/api/model/components/CLayer.java b/src/main/java/com/labelzoom/api/model/components/CLayer.java index bb1d61c..284adb2 100644 --- a/src/main/java/com/labelzoom/api/model/components/CLayer.java +++ b/src/main/java/com/labelzoom/api/model/components/CLayer.java @@ -21,9 +21,9 @@ @Getter @Setter public class CLayer { - protected String name; + private String name; - protected List elements = new ArrayList<>(); // Using ArrayList because that's what Jackson uses + private List elements = new ArrayList<>(); // Using ArrayList because that's what Jackson uses /** * Parameterless constructor diff --git a/src/main/java/com/labelzoom/api/model/components/CLine.java b/src/main/java/com/labelzoom/api/model/components/CLine.java index 4f8f83b..a479409 100644 --- a/src/main/java/com/labelzoom/api/model/components/CLine.java +++ b/src/main/java/com/labelzoom/api/model/components/CLine.java @@ -23,11 +23,11 @@ public enum Orientation Horizontal, Vertical; } - protected Orientation orientation; + private Orientation orientation; - protected int thickness; + private int thickness; - protected int length; + private int length; /** * Parameterless constructor diff --git a/src/main/java/com/labelzoom/api/model/components/CRectangle.java b/src/main/java/com/labelzoom/api/model/components/CRectangle.java index fd91d72..f9eb917 100644 --- a/src/main/java/com/labelzoom/api/model/components/CRectangle.java +++ b/src/main/java/com/labelzoom/api/model/components/CRectangle.java @@ -18,11 +18,11 @@ @Getter @Setter public class CRectangle extends AComponent { - protected int width; + private int width; - protected int height; + private int height; - protected int thickness; + private int thickness; /** * Parameterless constructor diff --git a/src/main/java/com/labelzoom/api/model/components/CStaticText.java b/src/main/java/com/labelzoom/api/model/components/CStaticText.java index 2dd23b9..2140b23 100644 --- a/src/main/java/com/labelzoom/api/model/components/CStaticText.java +++ b/src/main/java/com/labelzoom/api/model/components/CStaticText.java @@ -18,7 +18,7 @@ @Getter @Setter public class CStaticText extends AFontComponent { - protected String text; + private String text; /** * Parameterless constructor diff --git a/src/main/java/com/labelzoom/api/model/components/CVariableText.java b/src/main/java/com/labelzoom/api/model/components/CVariableText.java index 5d6bd3b..8c1ab22 100644 --- a/src/main/java/com/labelzoom/api/model/components/CVariableText.java +++ b/src/main/java/com/labelzoom/api/model/components/CVariableText.java @@ -18,17 +18,17 @@ @Getter @Setter public class CVariableText extends AFontComponent implements IDynamicField { - protected String expression; + private String expression; - protected String fieldValue; + private String fieldValue; - protected boolean autoSize = true; + private boolean autoSize = true; - protected int width = 0; + private int width = 0; - protected int height = 0; + private int height = 0; - protected HorizontalAlignment horizontalAlignment = HorizontalAlignment.Left; + private HorizontalAlignment horizontalAlignment = HorizontalAlignment.Left; public enum HorizontalAlignment { diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/ABarcode.java b/src/main/java/com/labelzoom/api/model/components/barcodes/ABarcode.java index e8b83c9..06a29a5 100644 --- a/src/main/java/com/labelzoom/api/model/components/barcodes/ABarcode.java +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/ABarcode.java @@ -23,13 +23,13 @@ @Getter @Setter public abstract class ABarcode extends AComponent implements IDynamicField { - protected String expression; + private String expression; - protected String fieldValue; + private String fieldValue; - protected BarcodeStyle barcodeStyle = BarcodeStyle.Unknown; + private BarcodeStyle barcodeStyle = BarcodeStyle.Unknown; - protected boolean blankWhenNull = false; + private boolean blankWhenNull = false; @Getter public enum BarcodeStyle diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/ALinearBarcode.java b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/ALinearBarcode.java index 3d8dc79..5eed41e 100644 --- a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/ALinearBarcode.java +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/ALinearBarcode.java @@ -22,13 +22,13 @@ @Getter @Setter public abstract class ALinearBarcode extends ABarcode { - protected ZebraBarcodeSize barcodeSize; + private ZebraBarcodeSize barcodeSize; - protected int height; + private int height; - protected boolean humanReadableEnabled; + private boolean humanReadableEnabled; - protected HumanReadableStyle humanReadablePosition; + private HumanReadableStyle humanReadablePosition; @Getter public enum ZebraBarcodeSize diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeAnsiCodabar.java b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeAnsiCodabar.java index ac6ec47..017ccec 100644 --- a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeAnsiCodabar.java +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeAnsiCodabar.java @@ -24,13 +24,13 @@ @Getter @Setter public class CBarcodeAnsiCodabar extends ALinearBarcode implements IBarcodeWithCheckDigit, IBarcodeWithWideToNarrowRatio { - protected boolean checkDigitEnabled = false; + private boolean checkDigitEnabled = false; - protected char startCharacter = 'A'; + private char startCharacter = 'A'; - protected char stopCharacter = 'A'; + private char stopCharacter = 'A'; - protected float wideToNarrowRatio = 3.0f; + private float wideToNarrowRatio = 3.0f; /** * Parameterless constructor @@ -44,7 +44,7 @@ public class CBarcodeAnsiCodabar extends ALinearBarcode implements IBarcodeWithC protected CBarcodeAnsiCodabar(final CBarcodeAnsiCodabar original, final boolean cloneData) { super(original, cloneData); - barcodeStyle = BarcodeStyle.ANSICodabar; + setBarcodeStyle(BarcodeStyle.ANSICodabar); if (original != null) { this.checkDigitEnabled = original.checkDigitEnabled; diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeCode11.java b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeCode11.java index 25ced2f..8cceec0 100644 --- a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeCode11.java +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeCode11.java @@ -24,9 +24,9 @@ @Getter @Setter public class CBarcodeCode11 extends ALinearBarcode implements IBarcodeWithCheckDigit, IBarcodeWithWideToNarrowRatio { - protected boolean checkDigitEnabled = false; + private boolean checkDigitEnabled = false; - protected float wideToNarrowRatio = 3.0f; + private float wideToNarrowRatio = 3.0f; /** * Parameterless constructor @@ -40,7 +40,7 @@ public class CBarcodeCode11 extends ALinearBarcode implements IBarcodeWithCheckD protected CBarcodeCode11(final CBarcodeCode11 original, final boolean cloneData) { super(original, cloneData); - barcodeStyle = BarcodeStyle.Code11; + setBarcodeStyle(BarcodeStyle.Code11); if (original != null) { this.checkDigitEnabled = original.checkDigitEnabled; diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeCode128.java b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeCode128.java index 3c97e42..3b73da4 100644 --- a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeCode128.java +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeCode128.java @@ -23,9 +23,9 @@ @Getter @Setter public class CBarcodeCode128 extends ALinearBarcode implements IBarcodeWithCheckDigit { - protected boolean checkDigitEnabled = false; + private boolean checkDigitEnabled = false; - protected char uccCaseMode = 'N'; + private char uccCaseMode = 'N'; /** * Parameterless constructor @@ -39,7 +39,7 @@ public class CBarcodeCode128 extends ALinearBarcode implements IBarcodeWithCheck protected CBarcodeCode128(final CBarcodeCode128 original, final boolean cloneData) { super(original, cloneData); - barcodeStyle = BarcodeStyle.Code128; + setBarcodeStyle(BarcodeStyle.Code128); if (original != null) { this.checkDigitEnabled = original.checkDigitEnabled; diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeCode39.java b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeCode39.java index 49157d1..59d187d 100644 --- a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeCode39.java +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeCode39.java @@ -24,9 +24,9 @@ @Getter @Setter public class CBarcodeCode39 extends ALinearBarcode implements IBarcodeWithCheckDigit, IBarcodeWithWideToNarrowRatio { - protected boolean checkDigitEnabled = false; + private boolean checkDigitEnabled = false; - protected float wideToNarrowRatio = 3.0f; + private float wideToNarrowRatio = 3.0f; /** * Parameterless constructor @@ -40,7 +40,7 @@ public class CBarcodeCode39 extends ALinearBarcode implements IBarcodeWithCheckD protected CBarcodeCode39(final CBarcodeCode39 original, final boolean cloneData) { super(original, cloneData); - barcodeStyle = BarcodeStyle.Code39; + setBarcodeStyle(BarcodeStyle.Code39); if (original != null) { this.checkDigitEnabled = original.checkDigitEnabled; diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeCode93.java b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeCode93.java index 3688f59..b0fe04b 100644 --- a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeCode93.java +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeCode93.java @@ -23,7 +23,7 @@ @Getter @Setter public class CBarcodeCode93 extends ALinearBarcode implements IBarcodeWithCheckDigit { - protected boolean checkDigitEnabled = false; + private boolean checkDigitEnabled = false; /** * Parameterless constructor @@ -37,7 +37,7 @@ public class CBarcodeCode93 extends ALinearBarcode implements IBarcodeWithCheckD protected CBarcodeCode93(final CBarcodeCode93 original, final boolean cloneData) { super(original, cloneData); - barcodeStyle = BarcodeStyle.Code93; + setBarcodeStyle(BarcodeStyle.Code93); if (original != null) { this.checkDigitEnabled = original.checkDigitEnabled; diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeEAN13.java b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeEAN13.java index 87053e3..d0a1d2b 100644 --- a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeEAN13.java +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeEAN13.java @@ -31,7 +31,7 @@ public class CBarcodeEAN13 extends ALinearBarcode protected CBarcodeEAN13(final CBarcodeEAN13 original, final boolean cloneData) { super(original, cloneData); - barcodeStyle = BarcodeStyle.EAN_13; + setBarcodeStyle(BarcodeStyle.EAN_13); } @Override diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeEAN8.java b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeEAN8.java index 0b023c7..d510fb0 100644 --- a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeEAN8.java +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeEAN8.java @@ -31,7 +31,7 @@ public class CBarcodeEAN8 extends ALinearBarcode protected CBarcodeEAN8(final CBarcodeEAN8 original, final boolean cloneData) { super(original, cloneData); - barcodeStyle = BarcodeStyle.EAN_8; + setBarcodeStyle(BarcodeStyle.EAN_8); } @Override diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeIndustrial2of5.java b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeIndustrial2of5.java index 3a0df81..0cf2215 100644 --- a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeIndustrial2of5.java +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeIndustrial2of5.java @@ -37,7 +37,7 @@ public class CBarcodeIndustrial2of5 extends ALinearBarcode implements IBarcodeWi protected CBarcodeIndustrial2of5(final CBarcodeIndustrial2of5 original, final boolean cloneData) { super(original, cloneData); - barcodeStyle = BarcodeStyle.Industrial2of5; + setBarcodeStyle(BarcodeStyle.Industrial2of5); if (original != null) { this.wideToNarrowRatio = original.wideToNarrowRatio; diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeInterleaved2of5.java b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeInterleaved2of5.java index 76d0cef..7bdcbc8 100644 --- a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeInterleaved2of5.java +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeInterleaved2of5.java @@ -40,7 +40,7 @@ public class CBarcodeInterleaved2of5 extends ALinearBarcode implements IBarcodeW protected CBarcodeInterleaved2of5(final CBarcodeInterleaved2of5 original, final boolean cloneData) { super(original, cloneData); - barcodeStyle = BarcodeStyle.Interleaved2of5; + setBarcodeStyle(BarcodeStyle.Interleaved2of5); if (original != null) { this.checkDigitEnabled = original.checkDigitEnabled; diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeLogmars.java b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeLogmars.java index 237edb6..e4528b3 100644 --- a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeLogmars.java +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeLogmars.java @@ -37,7 +37,7 @@ public class CBarcodeLogmars extends ALinearBarcode implements IBarcodeWithWideT protected CBarcodeLogmars(final CBarcodeLogmars original, final boolean cloneData) { super(original, cloneData); - barcodeStyle = BarcodeStyle.LOGMARS; + setBarcodeStyle(BarcodeStyle.LOGMARS); if (original != null) { this.wideToNarrowRatio = original.wideToNarrowRatio; diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeMsi.java b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeMsi.java index 0b7ec48..b6b8375 100644 --- a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeMsi.java +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeMsi.java @@ -41,7 +41,7 @@ public class CBarcodeMsi extends ALinearBarcode implements IBarcodeWithWideToNar protected CBarcodeMsi(final CBarcodeMsi original, final boolean cloneData) { super(original, cloneData); - barcodeStyle = BarcodeStyle.MSI; + setBarcodeStyle(BarcodeStyle.MSI); if (original != null) { this.checkDigit = original.checkDigit; diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodePlanetCode.java b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodePlanetCode.java index a89f444..77123f7 100644 --- a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodePlanetCode.java +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodePlanetCode.java @@ -31,7 +31,7 @@ public class CBarcodePlanetCode extends ALinearBarcode protected CBarcodePlanetCode(final CBarcodePlanetCode original, final boolean cloneData) { super(original, cloneData); - barcodeStyle = BarcodeStyle.PlanetCode; + setBarcodeStyle(BarcodeStyle.PlanetCode); } @Override diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodePlessey.java b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodePlessey.java index cd6a58f..d3633a1 100644 --- a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodePlessey.java +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodePlessey.java @@ -40,7 +40,7 @@ public class CBarcodePlessey extends ALinearBarcode implements IBarcodeWithCheck protected CBarcodePlessey(final CBarcodePlessey original, final boolean cloneData) { super(original, cloneData); - barcodeStyle = BarcodeStyle.Plessey; + setBarcodeStyle(BarcodeStyle.Plessey); if (original != null) { this.checkDigitEnabled = original.checkDigitEnabled; diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodePostal.java b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodePostal.java index 4514b84..e4d7c49 100644 --- a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodePostal.java +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodePostal.java @@ -39,7 +39,7 @@ public class CBarcodePostal extends ALinearBarcode implements IBarcodeWithWideTo protected CBarcodePostal(final CBarcodePostal original, final boolean cloneData) { super(original, cloneData); - barcodeStyle = BarcodeStyle.PostNet; + setBarcodeStyle(BarcodeStyle.PostNet); if (original != null) { this.postalCodeType = original.postalCodeType; diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeStandard2of5.java b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeStandard2of5.java index 3c154ba..7e8ddca 100644 --- a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeStandard2of5.java +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeStandard2of5.java @@ -36,7 +36,7 @@ public class CBarcodeStandard2of5 extends ALinearBarcode protected CBarcodeStandard2of5(final CBarcodeStandard2of5 original, final boolean cloneData) { super(original, cloneData); - barcodeStyle = BarcodeStyle.Standard2of5; + setBarcodeStyle(BarcodeStyle.Standard2of5); if (original != null) { this.wideToNarrowRatio = original.wideToNarrowRatio; diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeUPCA.java b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeUPCA.java index d5311a2..54763ba 100644 --- a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeUPCA.java +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeUPCA.java @@ -36,7 +36,7 @@ public class CBarcodeUPCA extends ALinearBarcode implements IBarcodeWithCheckDig protected CBarcodeUPCA(final CBarcodeUPCA original, final boolean cloneData) { super(original, cloneData); - barcodeStyle = BarcodeStyle.UPC_A; + setBarcodeStyle(BarcodeStyle.UPC_A); if (original != null) { this.checkDigitEnabled = original.checkDigitEnabled; diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeUPCE.java b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeUPCE.java index 3ef06f0..c8766b9 100644 --- a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeUPCE.java +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeUPCE.java @@ -36,7 +36,7 @@ public class CBarcodeUPCE extends ALinearBarcode implements IBarcodeWithCheckDig protected CBarcodeUPCE(final CBarcodeUPCE original, final boolean cloneData) { super(original, cloneData); - barcodeStyle = BarcodeStyle.UPC_E; + setBarcodeStyle(BarcodeStyle.UPC_E); if (original != null) { this.checkDigitEnabled = original.checkDigitEnabled; diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeUpcEanExtensions.java b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeUpcEanExtensions.java index f5136da..9a90853 100644 --- a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeUpcEanExtensions.java +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/CBarcodeUpcEanExtensions.java @@ -32,7 +32,7 @@ public class CBarcodeUpcEanExtensions extends ALinearBarcode protected CBarcodeUpcEanExtensions(final CBarcodeUpcEanExtensions original, final boolean cloneData) { super(original, cloneData); - barcodeStyle = BarcodeStyle.UPC_EAN; + setBarcodeStyle(BarcodeStyle.UPC_EAN); } @Override diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/twod/CBarcodeAztec.java b/src/main/java/com/labelzoom/api/model/components/barcodes/twod/CBarcodeAztec.java index 0df843f..e1ae926 100644 --- a/src/main/java/com/labelzoom/api/model/components/barcodes/twod/CBarcodeAztec.java +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/twod/CBarcodeAztec.java @@ -39,10 +39,9 @@ public class CBarcodeAztec extends A2DBarcode protected CBarcodeAztec(final CBarcodeAztec original, final boolean cloneData) { super(original, cloneData); - barcodeStyle = BarcodeStyle.Aztec; + setBarcodeStyle(BarcodeStyle.Aztec); if (original != null) { - rotation = original.rotation; magnificationFactor = original.magnificationFactor; ecicIndicator = original.ecicIndicator; errorControlIndicator = original.errorControlIndicator; diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/twod/CBarcodeDataMatrix.java b/src/main/java/com/labelzoom/api/model/components/barcodes/twod/CBarcodeDataMatrix.java index 018e3d8..06636b3 100644 --- a/src/main/java/com/labelzoom/api/model/components/barcodes/twod/CBarcodeDataMatrix.java +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/twod/CBarcodeDataMatrix.java @@ -42,7 +42,7 @@ public class CBarcodeDataMatrix extends A2DBarcode protected CBarcodeDataMatrix(final CBarcodeDataMatrix original, final boolean cloneData) { super(original, cloneData); - barcodeStyle = ABarcode.BarcodeStyle.DataMatrix; + setBarcodeStyle(ABarcode.BarcodeStyle.DataMatrix); if (original != null) { symbolHeight = original.symbolHeight; diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/twod/CBarcodeMaxicode.java b/src/main/java/com/labelzoom/api/model/components/barcodes/twod/CBarcodeMaxicode.java index c2fcd51..c09e6e3 100644 --- a/src/main/java/com/labelzoom/api/model/components/barcodes/twod/CBarcodeMaxicode.java +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/twod/CBarcodeMaxicode.java @@ -39,8 +39,8 @@ public class CBarcodeMaxicode extends A2DBarcode protected CBarcodeMaxicode(final CBarcodeMaxicode original, final boolean cloneData) { super(original, cloneData); - barcodeStyle = BarcodeStyle.UPSMaxiCode; - rotation = 0; // ZPL doesn't support rotating QR codes + setBarcodeStyle(BarcodeStyle.UPSMaxiCode); + setRotation(0); // ZPL doesn't support rotating Maxicodes if (original != null) { mode = original.mode; diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/twod/CBarcodePDF417.java b/src/main/java/com/labelzoom/api/model/components/barcodes/twod/CBarcodePDF417.java index c04dbd0..208464a 100644 --- a/src/main/java/com/labelzoom/api/model/components/barcodes/twod/CBarcodePDF417.java +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/twod/CBarcodePDF417.java @@ -37,10 +37,9 @@ public class CBarcodePDF417 extends A2DBarcode protected CBarcodePDF417(final CBarcodePDF417 original, final boolean cloneData) { super(original, cloneData); - barcodeStyle = BarcodeStyle.PDF417; + setBarcodeStyle(BarcodeStyle.PDF417); if (original != null) { - rotation = original.rotation; rowHeight = original.rowHeight; securityLevel = original.securityLevel; columns = original.columns; diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/twod/CBarcodeQRCode.java b/src/main/java/com/labelzoom/api/model/components/barcodes/twod/CBarcodeQRCode.java index 3edd656..11475cd 100644 --- a/src/main/java/com/labelzoom/api/model/components/barcodes/twod/CBarcodeQRCode.java +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/twod/CBarcodeQRCode.java @@ -36,8 +36,8 @@ public class CBarcodeQRCode extends A2DBarcode protected CBarcodeQRCode(final CBarcodeQRCode original, final boolean cloneData) { super(original, cloneData); - barcodeStyle = ABarcode.BarcodeStyle.QRCode; - rotation = 0; // ZPL doesn't support rotating QR codes + setBarcodeStyle(ABarcode.BarcodeStyle.QRCode); + setRotation(0); // ZPL doesn't support rotating QR codes if (original != null) { model = original.model;