BF [ 1673590 ] report table - barcode overflows over next fields
This commit is contained in:
parent
579de45d1e
commit
983af06ab8
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue