Class BarcodeWrapper
- java.lang.Object
-
- org.pentaho.reporting.engine.classic.extensions.modules.sbarcodes.BarcodeWrapper
-
- All Implemented Interfaces:
org.pentaho.reporting.engine.classic.core.util.ReportDrawable
public class BarcodeWrapper extends Object implements org.pentaho.reporting.engine.classic.core.util.ReportDrawable
This class is used to wrap a barbecue barcode element in order to offer the methoddraw(java.awt.Graphics2D, java.awt.geom.Rectangle2D)
which is requested by the reporting engine for automatic support using drawable-fields.
-
-
Constructor Summary
Constructors Constructor Description BarcodeWrapper(net.sourceforge.barbecue.Barcode barcode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
draw(Graphics2D g2, Rectangle2D bounds)
net.sourceforge.barbecue.Barcode
getBarcode()
org.pentaho.reporting.engine.classic.core.imagemap.ImageMap
getImageMap(Rectangle2D bounds)
Returns an optional image-map for the entry.Dimension
getPreferredSize()
boolean
isPreserveAspectRatio()
void
setConfiguration(org.pentaho.reporting.libraries.base.config.Configuration config)
Provides the current report configuration of the current report process to the drawable.void
setResourceBundleFactory(org.pentaho.reporting.engine.classic.core.ResourceBundleFactory bundleFactory)
Defines the resource-bundle factory that can be used to localize the drawing process.void
setStyleSheet(org.pentaho.reporting.engine.classic.core.style.StyleSheet style)
Provides the computed stylesheet of the report element that contained this drawable.
-
-
-
Method Detail
-
getBarcode
public net.sourceforge.barbecue.Barcode getBarcode()
-
isPreserveAspectRatio
public boolean isPreserveAspectRatio()
-
getPreferredSize
public Dimension getPreferredSize()
-
draw
public void draw(Graphics2D g2, Rectangle2D bounds)
- Specified by:
draw
in interfaceorg.pentaho.reporting.engine.classic.core.util.ReportDrawable
-
setConfiguration
public void setConfiguration(org.pentaho.reporting.libraries.base.config.Configuration config)
Provides the current report configuration of the current report process to the drawable. The report configuration can be used to configure the drawing process through the report.- Specified by:
setConfiguration
in interfaceorg.pentaho.reporting.engine.classic.core.util.ReportDrawable
- Parameters:
config
- the report configuration.
-
setStyleSheet
public void setStyleSheet(org.pentaho.reporting.engine.classic.core.style.StyleSheet style)
Provides the computed stylesheet of the report element that contained this drawable. The stylesheet is immutable.- Specified by:
setStyleSheet
in interfaceorg.pentaho.reporting.engine.classic.core.util.ReportDrawable
- Parameters:
style
- the stylesheet.
-
setResourceBundleFactory
public void setResourceBundleFactory(org.pentaho.reporting.engine.classic.core.ResourceBundleFactory bundleFactory)
Defines the resource-bundle factory that can be used to localize the drawing process.- Specified by:
setResourceBundleFactory
in interfaceorg.pentaho.reporting.engine.classic.core.util.ReportDrawable
- Parameters:
bundleFactory
- the resource-bundle factory.
-
getImageMap
public org.pentaho.reporting.engine.classic.core.imagemap.ImageMap getImageMap(Rectangle2D bounds)
Returns an optional image-map for the entry.- Specified by:
getImageMap
in interfaceorg.pentaho.reporting.engine.classic.core.util.ReportDrawable
- Parameters:
bounds
- the bounds for which the image map is computed.- Returns:
- the computed image-map or null if there is no image-map available.
-
-