Package org.pentaho.reporting.engine.classic.extensions.modules.sbarcodes

Examples of org.pentaho.reporting.engine.classic.extensions.modules.sbarcodes.BarcodeWrapper


    e.getStyle().setStyleProperty(TextStyleKeys.FONTSIZE, 8);
    e.getStyle().setStyleProperty(TextStyleKeys.FONT, "Tahoma");

    final Object value = e.getElementType().getValue(new DebugExpressionRuntime(), e);
    assertTrue(value instanceof BarcodeWrapper);
    final BarcodeWrapper w = (BarcodeWrapper) value;
    w.setStyleSheet(e.getStyle());
    final Barcode barcode = w.getBarcode();
    final Field barWidth = Barcode.class.getDeclaredField("barWidth");
    barWidth.setAccessible(true);
    final Field barHeight = Barcode.class.getDeclaredField("barHeight");
    barHeight.setAccessible(true);
    assertEquals(1, barWidth.get(barcode));
    assertEquals(18, barHeight.get(barcode));
    assertEquals(new Dimension(132, 18), w.getPreferredSize());
  }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.extensions.modules.sbarcodes.BarcodeWrapper

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.