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);
|
createBarcode(code, item);
|
||||||
if (m_barcode == null)
|
if (m_barcode == null)
|
||||||
m_valid = false;
|
m_valid = false;
|
||||||
|
m_allowOverflow = item.isHeightOneLine(); // teo_sarca, [ 1673590 ]
|
||||||
} // BarcodeElement
|
} // BarcodeElement
|
||||||
|
|
||||||
/** Valid */
|
/** Valid */
|
||||||
private boolean m_valid = true;
|
private boolean m_valid = true;
|
||||||
/** Barcode */
|
/** Barcode */
|
||||||
private Barcode m_barcode = null;
|
private Barcode m_barcode = null;
|
||||||
|
/** Allow this field to overflow over next fields */// teo_sarca, [ 1673590 ]
|
||||||
|
private boolean m_allowOverflow = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create Barcode
|
* Create Barcode
|
||||||
|
@ -175,6 +178,13 @@ public class BarcodeElement extends PrintElement
|
||||||
return true;
|
return true;
|
||||||
} // calculateSize
|
} // 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
|
* Paint Element
|
||||||
|
|
|
@ -307,6 +307,13 @@ public class TableElement extends PrintElement
|
||||||
dataSizes[row][col].addBelow(
|
dataSizes[row][col].addBelow(
|
||||||
new Dimension((int)((BarcodeElement)dataItem).getWidth(),
|
new Dimension((int)((BarcodeElement)dataItem).getWidth(),
|
||||||
(int)((BarcodeElement)dataItem).getHeight()));
|
(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;
|
continue;
|
||||||
}
|
}
|
||||||
// No Width Limitations
|
// No Width Limitations
|
||||||
|
|
Loading…
Reference in New Issue