Class BarcodeElement

java.lang.Object
org.compiere.print.layout.PrintElement
org.compiere.print.layout.BarcodeElement
All Implemented Interfaces:
ImageObserver, Serializable

public class BarcodeElement extends PrintElement
Barcode Print Element
Version:
$Id: BarcodeElement.java,v 1.2 2006/07/30 00:53:02 jjanke Exp $
Author:
Jorg Janke, Teo Sarca, SC ARHIPAC SERVICE SRL
  • FR [ 1803359 ] Migrate to barbecue 1.1
  • See Also:
    • Constructor Details

      • BarcodeElement

        public BarcodeElement(String code, MPrintFormatItem item)
        Barcode Element Constructor
        Parameters:
        code - barcode data string
        item - format item
    • Method Details

      • isValid

        public boolean isValid()
        Is Barcode Valid
        Returns:
        true if valid
      • calculateSize

        protected boolean calculateSize()
        Layout and Calculate Size.
        Set p_width and p_height.
        Specified by:
        calculateSize in class PrintElement
        Returns:
        true if calculated
      • getScaleFactor

        public float getScaleFactor()
        Get scale factor
        Returns:
        scale factor
      • isAllowOverflow

        public boolean isAllowOverflow()
        Is barcode allow to overflows over next fields
        Returns:
        can this element overflow over the next fields
      • paint

        public void paint(Graphics2D g2D, int pageNo, Point2D pageStart, Properties ctx, boolean isView)
        Paint Element
        Specified by:
        paint in class PrintElement
        Parameters:
        g2D - graphics
        pageNo - page no
        pageStart - page start
        ctx - context
        isView - view
      • paint

        public void paint(Graphics2D g2D, int x, int y)
        Paint element
        Parameters:
        g2D -
        x -
        y -
      • toString

        public String toString()
        String Representation
        Overrides:
        toString in class PrintElement
        Returns:
        info