public static boolean isVertical(BarcodeComponent barcode) { int orientation = barcode.getOrientation(); return orientation == BarcodeComponent.ORIENTATION_LEFT || orientation == BarcodeComponent.ORIENTATION_RIGHT; }