FR [ 1803359 ] Migrate to barbecue 1.1

This commit is contained in:
teo_sarca 2007-10-08 19:08:01 +00:00
parent 423f259502
commit 631739feac
5 changed files with 135 additions and 105 deletions

View File

@ -42,7 +42,7 @@
<classpathentry exported="true" kind="lib" path="tools/lib/commons-logging.jar"/>
<classpathentry exported="true" kind="lib" path="tools/lib/commons-net-1.4.0.jar"/>
<classpathentry exported="true" kind="lib" path="tools/lib/jgraph.jar"/>
<classpathentry kind="lib" path="tools/lib/barbecue-1.0.6d.jar"/>
<classpathentry kind="lib" path="tools/lib/barbecue-1.1.jar"/>
<classpathentry kind="lib" path="tools/lib/jcommon-1.0.5.jar"/>
<classpathentry kind="lib" path="tools/lib/jfreechart-1.0.2.jar"/>
<classpathentry kind="lib" path="tools/lib/postgresql.jar"/>
@ -73,7 +73,6 @@
<classpathentry kind="src" path="migration/src"/>
<classpathentry excluding="org/compiere/interfaces/" kind="src" path="JasperReports/src"/>
<classpathentry excluding="org/compiere/utils/DigestOfFile.java" kind="src" path="JasperReportsWebApp/src"/>
<classpathentry kind="lib" path="JasperReportsTools/lib/barbecue-1.1.jar"/>
<classpathentry kind="lib" path="JasperReportsTools/lib/jasperreports-1.3.0.jar"/>
<classpathentry kind="src" path="webCM/src/main/servlet"/>
<classpathentry kind="lib" path="tools/lib/swinglabs-0.8.0.jar"/>

View File

@ -69,7 +69,6 @@
<pathelement path="../JasperReportsTools/lib/commons-collections-3.1.jar"/>
<pathelement path="../JasperReportsTools/lib/commons-logging-1.4.jar"/>
<pathelement path="../JasperReportsTools/lib/commons-beanutils-1.7.jar"/>
<pathelement path="../JasperReportsTools/lib/barbecue-1.1.jar"/>
<pathelement path="../JasperReportsTools/lib/xercesImpl.jar"/>
<pathelement path="../JasperReportsTools/lib/xml-apis.jar"/>
<pathelement path="../tools/lib/postgresql.jar"/>
@ -147,9 +146,6 @@
<zipfileset src="../JasperReportsTools/lib/commons-beanutils-1.7.jar" >
<patternset refid="manifest.exclude"/>
</zipfileset>
<zipfileset src="../JasperReportsTools/lib/barbecue-1.1.jar" >
<patternset refid="manifest.exclude"/>
</zipfileset>
<zipfileset src="../JasperReportsTools/lib/xercesImpl.jar" >
<patternset refid="manifest.exclude"/>
</zipfileset>

View File

@ -16,19 +16,26 @@
*****************************************************************************/
package org.compiere.print.layout;
import java.awt.*;
import java.awt.geom.*;
import java.util.*;
import org.compiere.print.*;
import java.awt.Graphics2D;
import java.awt.geom.Point2D;
import java.util.Properties;
import net.sourceforge.barbecue.*;
import net.sourceforge.barbecue.linear.code128.*;
import net.sourceforge.barbecue.Barcode;
import net.sourceforge.barbecue.BarcodeFactory;
import net.sourceforge.barbecue.linear.ean.UCCEAN128Barcode;
import net.sourceforge.barbecue.output.OutputException;
import org.compiere.print.MPrintFont;
import org.compiere.print.MPrintFormatItem;
/**
* Barcode Print Element
*
* @author Jorg Janke
* @version $Id: BarcodeElement.java,v 1.2 2006/07/30 00:53:02 jjanke Exp $
*
* @author Teo Sarca, SC ARHIPAC SERVICE SRL
* <li>FR [ 1803359 ] Migrate to barbecue 1.1
*/
public class BarcodeElement extends PrintElement
{
@ -209,7 +216,10 @@ public class BarcodeElement extends PrintElement
x += (p_maxWidth - p_width) / 2;
int y = (int)location.y;
m_barcode.draw(g2D, x, y);
try {
m_barcode.draw(g2D, x, y);
} catch (OutputException e) {
}
} // paint
/**

View File

@ -16,17 +16,36 @@
*****************************************************************************/
package org.compiere.print.layout;
import java.awt.*;
import java.awt.font.*;
import java.awt.geom.*;
import java.text.*;
import java.util.*;
import java.util.logging.*;
import java.util.regex.*;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.font.FontRenderContext;
import java.awt.font.LineBreakMeasurer;
import java.awt.font.TextAttribute;
import java.awt.font.TextLayout;
import java.awt.geom.AffineTransform;
import java.awt.geom.Point2D;
import java.text.AttributedCharacterIterator;
import java.text.AttributedString;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Properties;
import java.util.logging.Level;
import java.util.regex.Pattern;
import org.compiere.model.*;
import org.compiere.print.*;
import org.compiere.util.*;
import net.sourceforge.barbecue.output.OutputException;
import org.compiere.model.MQuery;
import org.compiere.print.MPrintFormatItem;
import org.compiere.print.MPrintTableFormat;
import org.compiere.util.KeyNamePair;
import org.compiere.util.NamePair;
import org.compiere.util.Util;
import org.compiere.util.ValueNamePair;
/**
* Table Print Element.
@ -47,6 +66,9 @@ import org.compiere.util.*;
* </pre>
* @author Jorg Janke
* @version $Id: TableElement.java,v 1.2 2006/07/30 00:53:02 jjanke Exp $
*
* @author Teo Sarca, SC ARHIPAC SERVICE SRL
* <li>FR [ 1803359 ] Migrate to barbecue 1.1
*/
public class TableElement extends PrintElement
{
@ -1371,7 +1393,10 @@ public class TableElement extends PrintElement
}
else if (printItems[index] instanceof BarcodeElement)
{
((BarcodeElement)printItems[index]).getBarcode().draw(g2D, curX, (int)penY);
try {
((BarcodeElement)printItems[index]).getBarcode().draw(g2D, curX, (int)penY);
} catch (OutputException e) {
}
}
else if (printItems[index] instanceof Boolean)
{

View File

@ -207,7 +207,7 @@
<patternset refid="manifest.exclude"/>
</zipfileset>
<!-- Barcode, ftp -->
<zipfileset src="lib/barbecue-1.0.6d.jar" >
<zipfileset src="lib/barbecue-1.1.jar" >
<patternset refid="manifest.exclude"/>
</zipfileset>
<zipfileset src="lib/commons-net-1.4.0.jar" >
@ -283,7 +283,7 @@
<patternset refid="manifest.exclude"/>
</zipfileset>
<!-- Barcode, ftp -->
<zipfileset src="lib/barbecue-1.0.6d.jar" >
<zipfileset src="lib/barbecue-1.1.jar" >
<patternset refid="manifest.exclude"/>
</zipfileset>
<zipfileset src="lib/commons-net-1.4.0.jar" >