Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
@SuppressWarnings("serial")
public class GridExporter<T> implements Serializable {

private static final Logger LOGGER = LoggerFactory.getLogger(ExcelInputStreamFactory.class);
private static final Logger LOGGER = LoggerFactory.getLogger(GridExporter.class);

private boolean excelExportEnabled = true;
private boolean docxExportEnabled = true;
Expand Down Expand Up @@ -167,7 +167,7 @@ public static <T> GridExporter<T> createFor(

private JustifyContentMode getJustifyContentMode() {
JustifyContentMode justifyContentMode;
if (this.buttonsAlignment == ButtonsAlignment.LEFT) {
if (buttonsAlignment == ButtonsAlignment.LEFT) {
justifyContentMode = JustifyContentMode.START;
} else {
justifyContentMode = JustifyContentMode.END;
Expand All @@ -193,7 +193,7 @@ Object extractValueFromColumn(T item, Column<T> column) {
// if there is a key, assume that the property can be retrieved from it
if (value == null && column.getKey() != null) {
Optional<PropertyDefinition<T, ?>> propertyDefinition =
this.propertySet.getProperty(column.getKey());
propertySet.getProperty(column.getKey());
if (propertyDefinition.isPresent()) {
value = propertyDefinition.get().getGetter().apply(item);
} else {
Expand All @@ -219,7 +219,7 @@ else if (r.getValueProviders().containsKey("name")) {

// at this point if the value is still null then take the only value from ColumPathRenderer VP
if (value == null && column.getRenderer() instanceof Renderer) {
Renderer<T> renderer = (Renderer<T>) column.getRenderer();
Renderer<T> renderer = column.getRenderer();
if (renderer instanceof ColumnPathRenderer) {
try {
Field provider = ColumnPathRenderer.class.getDeclaredField("provider");
Expand Down Expand Up @@ -458,7 +458,7 @@ public void setNumberColumnFormat(
* value of the column so it can be converted to a Double, and then allows to specify the excel
* format to be applied to the cell when exported to excel with a provider, so the resulting cell
* is not a string but a number that can be used in formulas.
*
*
* @param column
* @param decimalFormat
* @param excelFormatProvider
Expand Down Expand Up @@ -594,15 +594,15 @@ public void setFooterToolbarItems(List<FooterToolbarItem> footerToolbarItems) {

/**
* Charset to use when exporting the CSV file.
*
*
* @return CSV file charset or default one.
*/
public Charset getCsvCharset() {
return csvCharset == null ? Charset.defaultCharset() : csvCharset.get();
}

public void setCsvCharset(SerializableSupplier<Charset> charset) {
this.csvCharset = charset;
csvCharset = charset;
}

}