BF [ 1673590 ] report table - barcode overflows over next fields

This commit is contained in:
teo_sarca 2007-03-04 21:29:45 +00:00
parent 579de45d1e
commit 983af06ab8
2 changed files with 17 additions and 0 deletions

View File

@ -48,12 +48,15 @@ public class BarcodeElement extends PrintElement
createBarcode(code, item);
if (m_barcode == null)
m_valid = false;
m_allowOverflow = item.isHeightOneLine(); // teo_sarca, [ 1673590 ]
} // BarcodeElement
/** Valid */
private boolean m_valid = true;
/** Barcode */
private Barcode m_barcode = null;
/** Allow this field to overflow over next fields */// teo_sarca, [ 1673590 ]
private boolean m_allowOverflow = true;
/**
* Create Barcode
@ -175,6 +178,13 @@ public class BarcodeElement extends PrintElement
return true;
} // calculateSize
/**
* @author teo_sarca - [ 1673590 ] report table - barcode overflows over next fields
* @return can this element overflow over the next fields
*/
public boolean isAllowOverflow() { //
return m_allowOverflow;
}
/**
* Paint Element

View File

@ -307,6 +307,13 @@ public class TableElement extends PrintElement
dataSizes[row][col].addBelow(
new Dimension((int)((BarcodeElement)dataItem).getWidth(),
(int)((BarcodeElement)dataItem).getHeight()));
// Check if the overflow is allowed - teo_sarca, [ 1673590 ]
if (!((BarcodeElement)dataItem).isAllowOverflow()) {
float width = (float)Math.ceil(dataSizes[row][col].getWidth());
if (colWidth < width)
colWidth = width;
}
continue;
}
// No Width Limitations