Package it.stefanobertini.zebra.beans

Examples of it.stefanobertini.zebra.beans.Position


        assertCommand(output, command);
    }

    @Test
    public void testRelXY() {
        Move command = new Move(new Position(1, 2), true);

        CommandOutputBuilder output = new CommandOutputBuilder();
        output.printLn("! U1 RXY 1 2");

        assertCommand(output, command);
View Full Code Here


        assertCommand(output, command);
    }

    @Test(expected = ValidationException.class)
    public void testBadY() {
        Move command = new Move(new Position(0, -1));

        command.getCommandByteArray();
    }
View Full Code Here

import it.stefanobertini.zebra.enums.Orientation;

public class ScaleToFit extends ScaleText {

    public ScaleToFit(String name, int fontWidth, int fontHeight) {
        super(Orientation.horizontal, name, fontWidth, fontHeight, new Position(0, 0), "");
    }
View Full Code Here

    public Move(double distance, Orientation orientation) {
        this(distance, orientation, false);
    }

    public Move(double distance, Orientation orientation, boolean relative) {
        Position position = new Position();

        if (Orientation.horizontal.equals(orientation)) {
            position.setX(distance);
        } else {
            position.setY(distance);
        }
        this.relative = relative;
        this.position = position;
        this.orientation = orientation;
    }
View Full Code Here

public class TextTest {

    @Test
    public void test() {
  Text command = new Text(TextRotation.horizontal, new Font("4", 0), new Position(200, 100), "TEXT");

  CommandOutputBuilder output = new CommandOutputBuilder();
  output.printLn("TEXT 4 0 200 100 TEXT");

  assertCommand(output, command);
View Full Code Here

    public void test1() {

  QRCodeDataInterface data;
  data = new QRCodeAutomaticData(QRCodeErrorCorrectionLevel.standard, QRCodeMaskNumber.none, "QR Code");

  QRCode command = new QRCode(Orientation.horizontal, new Position(10, 100), QRCodeModelType.model2, 10, data);

  CommandOutputBuilder output = new CommandOutputBuilder();
  output.printLn("BARCODE QR 10 100 M 2 U 10");
  output.printLn("MA,QR Code");
  output.printLn("ENDQR");
View Full Code Here

  QRCodeManualData data;
  data = new QRCodeManualData(QRCodeErrorCorrectionLevel.ultraHighReliability, QRCodeMaskNumber.mask0);
  data.addData(new QRCodeManualDataItem(QRCodeCharacterMode.numeric, "0123456789012345"));

  QRCode command = new QRCode(Orientation.horizontal, new Position(10, 100), QRCodeModelType.model2, 10, data);

  CommandOutputBuilder output = new CommandOutputBuilder();
  output.printLn("BARCODE QR 10 100 M 2 U 10");
  output.printLn("H0M,N0123456789012345");
  output.printLn("ENDQR");
View Full Code Here

  QRCodeManualData data;
  data = new QRCodeManualData(QRCodeErrorCorrectionLevel.ultraHighReliability, QRCodeMaskNumber.mask0);
  data.addData(new QRCodeManualDataItem(QRCodeCharacterMode.alphanumeric, "AC-42"));

  QRCode command = new QRCode(Orientation.horizontal, new Position(10, 100), QRCodeModelType.model2, 10, data);

  CommandOutputBuilder output = new CommandOutputBuilder();
  output.printLn("BARCODE QR 10 100 M 2 U 10");
  output.printLn("H0M,AAC-42");
  output.printLn("ENDQR");
View Full Code Here

  data.addData(new QRCodeManualDataItem(QRCodeCharacterMode.alphanumeric, "QR code"));
  data.addData(new QRCodeManualDataItem(QRCodeCharacterMode.numeric, "0123456789012345"));
  data.addData(new QRCodeManualDataItem(QRCodeCharacterMode.alphanumeric, "QRCODE"));
  data.addData(new QRCodeManualDataItem(QRCodeCharacterMode.binary, "qrcode"));

  QRCode command = new QRCode(Orientation.horizontal, new Position(10, 100), QRCodeModelType.model2, 10, data);

  CommandOutputBuilder output = new CommandOutputBuilder();
  output.printLn("BARCODE QR 10 100 M 2 U 10");
  output.printLn("LM,AQR code,N0123456789012345,AQRCODE,B0006qrcode");
  output.printLn("ENDQR");
View Full Code Here

  List<String> data = new ArrayList<String>();
  data.add("PDF Data");
  data.add("ABCDE12345");

  Pdf417 command = new Pdf417(Orientation.horizontal, new Position(10, 20), 3, 12, 3, 2, data);

  CommandOutputBuilder output = new CommandOutputBuilder();
  output.printLn("BARCODE PDF-417 10 20 XD 3 YD 12 C 3 S 2");
  output.printLn("PDF Data");
  output.printLn("ABCDE12345");
View Full Code Here

TOP

Related Classes of it.stefanobertini.zebra.beans.Position

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.