@Test public void checkAlignLeftRight() { PrintPayload payload = new PrintPayload(); TextRow row = payload.appendLeftRight(30, "Left", "Right"); assertThat(row.getText()).isEqualTo("Left Right"); }
public TextRow appendLeftRight(int columns, String left, String right) { String space = getSpaces(columns - left.length() - right.length()); return append(left + space + right); }
PrintPayload implements Jsonable { public TextRow appendLeftRight(int columns, String left, String right) { String space = getSpaces(columns - left.length() - right.length()); return append(left + space + right); } }
PrintPayload implements Jsonable { public TextRow appendLeftRight(int columns, String left, String right) { String space = getSpaces(columns - left.length() - right.length()); return append(left + space + right); } PrintPayload();  PrintPayload(String printerId); }
PrintPayload implements Jsonable { public TextRow appendLeftRight(int columns, String left, String right) { String space = getSpaces(columns - left.length() - right.length()); return append(left + space + right); } PrintPayload();  PrintPayload(String printerId); TextRow append(String text); TextRow append(String text, PrinterFont printerFont); void append(PrintPayload toAppendPayload); void appendEmptyLine(); TextRow appendLineOfChar(int columns, String character); TextRow appendLeftRight(int columns, String left, String right); ImageRow append(Bitmap image); ImageRow append(Bitmap image, boolean scaleToFit); PrintRow[] getRows(); int getCodePage(); void setCodePage(int codePage); String getLanguage(); void setLanguage(String languageCode); void setPrinterId(String printerId); String getPrinterId(); boolean hasPrinterId(); @Override String toJson(); static PrintPayload fromJson(String json); }
PrintPayload implements Jsonable { public TextRow appendLeftRight(int columns, String left, String right) { String space = getSpaces(columns - left.length() - right.length()); return append(left + space + right); } PrintPayload();  PrintPayload(String printerId); TextRow append(String text); TextRow append(String text, PrinterFont printerFont); void append(PrintPayload toAppendPayload); void appendEmptyLine(); TextRow appendLineOfChar(int columns, String character); TextRow appendLeftRight(int columns, String left, String right); ImageRow append(Bitmap image); ImageRow append(Bitmap image, boolean scaleToFit); PrintRow[] getRows(); int getCodePage(); void setCodePage(int codePage); String getLanguage(); void setLanguage(String languageCode); void setPrinterId(String printerId); String getPrinterId(); boolean hasPrinterId(); @Override String toJson(); static PrintPayload fromJson(String json);  }