Java 类net.sf.jasperreports.engine.export.JRXlsAbstractExporter 实例源码

项目:jasperreports    文件:XlsxSheetHelper.java   
/**
 *
 */
public void exportMergedCells(int row, int col, int maxColumnIndex, int rowSpan, int colSpan) 
{
    rowSpan = configuration.isCollapseRowSpan() ? 1 : rowSpan;

    if (rowSpan > 1 || colSpan > 1)
    {
        String ref = 
            JRXlsAbstractExporter.getColumIndexName(col, maxColumnIndex) + (row + 1)
            + ":" + JRXlsAbstractExporter.getColumIndexName(col + colSpan - 1, maxColumnIndex) + (row + rowSpan); //FIXMEXLSX reuse this utility method

        try
        {
            mergedCellsWriter.write("<mergeCell ref=\"" + ref + "\"/>\n");
        }
        catch (IOException e)
        {
            throw new JRRuntimeException(e);
        }
    }
}
项目:jasperreports    文件:XlsxSheetHelper.java   
/**
 *
 */
public void exportHyperlink(int row, int col, int maxColumnIndex, String href, boolean isLocal) 
{
    String ref = 
            JRXlsAbstractExporter.getColumIndexName(col, maxColumnIndex) + (row + 1);

    try
    {
        if(isLocal){
            hyperlinksWriter.write("<hyperlink ref=\"" + ref + "\" location=\"" + (href == null ? null : href.replaceAll("\\W", "")) + "\"/>\n");
        } else {
            hyperlinksWriter.write("<hyperlink ref=\"" + ref + "\" r:id=\"rIdLnk" + sheetRelsHelper.getHyperlink(href) + "\"/>\n");
        }
    }
    catch (IOException e)
    {
        throw new JRRuntimeException(e);
    }
}
项目:jasperreports    文件:XlsxCellHelper.java   
/**
 * 
 *
public XlsxBorderHelper getBorderHelper() 
{
    return borderHelper;
}

/**
 *
 */
public void exportHeader(
        JRExporterGridCell gridCell,
        int rowIndex,
        int colIndex, 
        int maxColIndex,
        JRXlsAbstractExporter.SheetInfo sheetInfo
        ) 
{
    exportHeader(
            gridCell,
            rowIndex, 
            colIndex, 
            maxColIndex, 
            null, 
            null, 
            null, 
            true, 
            false, 
            false, 
            false, 
            false, 
            RotationEnum.NONE, 
            sheetInfo);
}
项目:jasperreports    文件:XlsxBorderHelper.java   
/**
 *
 */
public int getBorder(JRExporterGridCell gridCell, JRXlsAbstractExporter.SheetInfo sheetInfo, LineDirectionEnum direction)
{
    if (Boolean.TRUE.equals(sheetInfo.ignoreCellBackground) || gridCell.getBox() == null)
    {
        return -1;          
    }

    XlsxBorderInfo borderInfo = new XlsxBorderInfo(gridCell.getBox(), direction);
    Integer borderIndex = borderCache.get(borderInfo.getId());
    if (borderIndex == null)
    {
        borderIndex = Integer.valueOf(borderCache.size());
        export(borderInfo);
        borderCache.put(borderInfo.getId(), borderIndex);
    }
    return borderIndex.intValue();
}
项目:jasperreports    文件:XlsxSheetHelper.java   
/**
 *
 */
public void exportRow(int rowHeight, Cut yCut, XlsRowLevelInfo levelInfo) 
{
    if (rowIndex > 0)
    {
        write("</row>\n");
    }
    else
    {
        if (!colsWriter.isEmpty())
        {
            write("<cols>\n");
            colsWriter.writeData(writer);
            write("</cols>\n");
        }
        write("<sheetData>\n");
    }
    rowIndex++;
    boolean isAutoFit = yCut.hasProperty(JRXlsAbstractExporter.PROPERTY_AUTO_FIT_ROW) 
            && (Boolean)yCut.getProperty(JRXlsAbstractExporter.PROPERTY_AUTO_FIT_ROW);
    write("<row r=\"" + rowIndex + "\""  + (isAutoFit ? " customHeight=\"0\" bestFit=\"1\"" : " customHeight=\"1\"") + " ht=\"" + rowHeight + "\"");
    if (levelInfo.getLevelMap().size() > 0)
    {
        write(" outlineLevel=\"" + levelInfo.getLevelMap().size() + "\"");
    }
    write(">\n");
}
项目:jasperreports    文件:XlsxCellHelper.java   
/**
 *
 */
public void exportHeader(
        JRExporterGridCell gridCell,
        int rowIndex,
        int colIndex, 
        int maxColIndex, 
        TextValue textValue,
        String pattern,
        Locale locale,
        boolean isWrapText,
        boolean isHidden,
        boolean isLocked,
        boolean isShrinkToFit,
        boolean isIgnoreTextFormatting, 
        RotationEnum rotation,
        JRXlsAbstractExporter.SheetInfo sheetInfo
        ) 
{
    exportHeader(
            gridCell,
            rowIndex,
            colIndex, 
            maxColIndex, 
            textValue,
            pattern,
            locale,
            isWrapText,
            isHidden,
            isLocked,
            isShrinkToFit,
            isIgnoreTextFormatting, 
            rotation,
            sheetInfo,
            null
            );
}
项目:jasperreports    文件:XlsxCellHelper.java   
/**
 *
 */
public void exportHeader(
    JRExporterGridCell gridCell,
    int rowIndex,
    int colIndex, 
    int maxColIndex,
    JRXlsAbstractExporter.SheetInfo sheetInfo,
    LineDirectionEnum direction
    ) 
{
    exportHeader(
            gridCell,
            rowIndex, 
            colIndex, 
            maxColIndex, 
            null, 
            null, 
            null, 
            true, 
            false, 
            false, 
            false, 
            false, 
            RotationEnum.NONE, 
            sheetInfo,
            direction);
}
项目:jasperreports    文件:XlsxStyleHelper.java   
/**
 * 
 */
public int getCellStyle(
    JRExporterGridCell gridCell, 
    String pattern, 
    Locale locale,
    boolean isWrapText, 
    boolean isHidden, 
    boolean isLocked,
    boolean  isShrinkToFit,
    boolean isIgnoreTextFormatting,
    RotationEnum rotation,
    JRXlsAbstractExporter.SheetInfo sheetInfo,
    LineDirectionEnum direction
    )
{
    XlsxStyleInfo styleInfo = 
        new XlsxStyleInfo(
            formatHelper.getFormat(pattern) + 1,
            fontHelper.getFont(gridCell, locale) + 1,
            borderHelper.getBorder(gridCell, sheetInfo, direction) + 1,
            gridCell,
            isWrapText,
            isHidden,
            isLocked,
            isShrinkToFit,
            isIgnoreTextFormatting, 
            getRotation(rotation),
            sheetInfo,
            direction
            );
    Integer styleIndex = styleCache.get(styleInfo.getId());
    if (styleIndex == null)
    {
        styleIndex = Integer.valueOf(styleCache.size() + 1);
        exportCellStyle(gridCell, styleInfo, styleIndex, sheetInfo);
        styleCache.put(styleInfo.getId(), styleIndex);
    }
    return styleIndex.intValue();
}
项目:PDFReporter-Studio    文件:AExportXlsAction.java   
@Override
protected JRXlsAbstractExporter<?, ?, ?> getExporter(JasperReportsConfiguration jContext,
        JRExportProgressMonitor monitor, File file) {
    JRXlsAbstractExporter<?, ?, ?> exp = createExporter(jContext, monitor);
    exp.setExporterOutput(new SimpleOutputStreamExporterOutput(file));

    return exp;
}
项目:jasperreports    文件:XlsxSheetHelper.java   
/**
 *
 */
public void exportHeader(
        boolean showGridlines, 
        int scale, 
        int rowFreezeIndex, 
        int columnFreezeIndex, 
        int maxColumnFreezeIndex, 
        JasperPrint jasperPrint, 
        Color tabColor)
{
    write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
    write("<worksheet\n");
    write(" xmlns=\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\"\n");
    write(" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\">\n");

    write("<sheetPr>\n");
    if(tabColor != null)
    {
        write("<tabColor rgb=\"FF" + JRColorUtil.getColorHexa(tabColor) + "\"/>\n");
    }
    write("<outlinePr summaryBelow=\"0\"/>\n");

    /* the scale factor takes precedence over fitWidth and fitHeight properties */
    if (
        (scale < 10 || scale > 400)
        && (
            configuration.getFitWidth() != null 
            || configuration.getFitHeight() != null
            || Boolean.TRUE == configuration.isAutoFitPageHeight()
            )
        )
    {
        write("<pageSetUpPr fitToPage=\"1\"/>");
    }

    write("</sheetPr><dimension ref=\"A1\"/><sheetViews><sheetView workbookViewId=\"0\"");

    if(!showGridlines)
    {
        write(" showGridLines=\"0\"");
    }

    if(rowFreezeIndex > 0 || columnFreezeIndex > 0)
    {
        write(">\n<pane" + (columnFreezeIndex > 0 ? (" xSplit=\"" + columnFreezeIndex + "\"") : "") + (rowFreezeIndex > 0 ? (" ySplit=\"" + rowFreezeIndex + "\"") : ""));
        String columnFreezeName = columnFreezeIndex < 0 
                ? "A" 
                : JRXlsAbstractExporter.getColumIndexName(columnFreezeIndex, maxColumnFreezeIndex);
        write(" topLeftCell=\"" + columnFreezeName + (rowFreezeIndex + 1) + "\"");
        String activePane = (rowFreezeIndex > 0 ? "bottom" : "top") + (columnFreezeIndex > 0 ? "Right" : "Left");
        write(" activePane=\"" + activePane + "\" state=\"frozen\"/>\n");
        write("<selection pane=\"" + activePane + "\"");
        write(" activeCell=\"" + columnFreezeName + (rowFreezeIndex + 1) + "\"");
        write(" sqref=\"" + columnFreezeName + (rowFreezeIndex + 1) + "\"");
        write("/>\n");
        write("</sheetView>\n</sheetViews>\n");
    }
    else
    {
        write("/></sheetViews>\n");
    }
    write("<sheetFormatPr defaultRowHeight=\"15\"/>\n");
}
项目:jasperreports    文件:XlsxSheetHelper.java   
private boolean hasHeaderOrFooter(JRXlsAbstractExporter.SheetInfo.SheetPrintSettings printSettings)
{
    return hasHeader(printSettings) || hasFooter(printSettings);
}
项目:jasperreports    文件:XlsxSheetHelper.java   
private boolean hasHeader(JRXlsAbstractExporter.SheetInfo.SheetPrintSettings printSettings)
{
    return (printSettings.getHeaderLeft() != null && !printSettings.getHeaderLeft().trim().isEmpty())
            || (printSettings.getHeaderCenter() != null && !printSettings.getHeaderCenter().trim().isEmpty()) 
            || (printSettings.getHeaderRight() != null && !printSettings.getHeaderRight().trim().isEmpty()); 
}
项目:jasperreports    文件:XlsxSheetHelper.java   
private boolean hasFooter(JRXlsAbstractExporter.SheetInfo.SheetPrintSettings printSettings)
{
    return (printSettings.getFooterLeft() != null && !printSettings.getFooterLeft().trim().isEmpty()) 
            || (printSettings.getFooterCenter() != null && !printSettings.getFooterCenter().trim().isEmpty()) 
            || (printSettings.getFooterRight() != null && !printSettings.getFooterRight().trim().isEmpty()); 
}
项目:jasperreports    文件:XlsxCellHelper.java   
/**
 *
 */
public void exportHeader(
    JRExporterGridCell gridCell,
    int rowIndex,
    int colIndex, 
    int maxColIndex, 
    TextValue textValue,
    String pattern,
    Locale locale,
    boolean isWrapText,
    boolean isHidden,
    boolean isLocked,
    boolean isShrinkToFit,
    boolean isIgnoreTextFormatting, 
    RotationEnum rotation,
    JRXlsAbstractExporter.SheetInfo sheetInfo,
    LineDirectionEnum direction
    ) 
{
    try
    {
        if (textValue != null)
        {
            textValue.handle(textValueHandler);
        }
        else
        {
            textValueHandler.handle((StringTextValue)null);
        }
    }
    catch (JRException e)
    {
        throw new JRRuntimeException(e);
    }

    Integer styleIndex = null;

    if (gridCell.getType() == JRExporterGridCell.TYPE_OCCUPIED_CELL)
    {
        styleIndex = ((ElementGridCell)((OccupiedGridCell)gridCell).getOccupier()).getStyleIndex();
    }

    if (styleIndex == null)
    {
        styleIndex = 
            styleHelper.getCellStyle(
                gridCell, 
                pattern, 
                locale, 
                isWrapText, 
                isHidden, 
                isLocked, 
                isShrinkToFit, 
                isIgnoreTextFormatting,
                rotation,
                sheetInfo,
                direction
                );
        if (
            gridCell.getType() == JRExporterGridCell.TYPE_ELEMENT_CELL
            && gridCell instanceof ElementGridCell
            )
        {
            ((ElementGridCell)gridCell).setStyleIndex(styleIndex);
        }
    }

    write("  <c r=\"" 
        + JRXlsAbstractExporter.getColumIndexName(colIndex, maxColIndex) 
        + (rowIndex + 1) 
        + "\" s=\"" + styleIndex + "\""
        );
    String type = textValueHandler.getType();
    if (type != null)
    {
        write(" t=\"" + type + "\"");
    }
    write(">");
}
项目:jasperreports    文件:XlsxStyleInfo.java   
/**
 *
 */
public XlsxStyleInfo(
    int formatIndex, 
    int fontIndex, 
    int borderIndex, 
    JRExporterGridCell gridCell, 
    boolean isWrapText,
    boolean isHidden,
    boolean isLocked,
    boolean isShrinkToFit,
    boolean isIgnoreTextFormatting,
    int rotation,
    JRXlsAbstractExporter.SheetInfo sheetInfo,
    LineDirectionEnum direction
    )
{
    this.formatIndex = formatIndex;
    this.fontIndex = isIgnoreTextFormatting ? -1 : fontIndex;
    this.borderIndex = isIgnoreTextFormatting ? -1 : borderIndex;

    JRPrintElement element = gridCell.getElement();

    if (!isIgnoreTextFormatting)
    {
        if (element != null && element.getModeValue() == ModeEnum.OPAQUE)
        {
            this.backcolor = JRColorUtil.getColorHexa(element.getBackcolor());
        }
        else if (gridCell.getBackcolor() != null)
        {
            this.backcolor = JRColorUtil.getColorHexa(gridCell.getBackcolor());
        }
    }

    JRTextAlignment align = element instanceof JRTextAlignment ? (JRTextAlignment)element : null;
    if (align != null)
    {
        this.horizontalAlign = getHorizontalAlignment(align.getHorizontalTextAlign(), align.getVerticalTextAlign(), rotation);//FIXMEXLSX use common util
        this.verticalAlign = getVerticalAlignment(align.getHorizontalTextAlign(), align.getVerticalTextAlign(), rotation);//FIXMEXLSX use common util
    }

    this.isWrapText = isShrinkToFit ? false : isWrapText;
    this.isHidden = isHidden;
    this.isLocked = isLocked;
    this.isShrinkToFit = isShrinkToFit;
    this.rotation = rotation;
    if(sheetInfo.whitePageBackground != null)
    {
        this.whitePageBackground = sheetInfo.whitePageBackground;
    }
    if(sheetInfo.ignoreCellBackground != null)
    {
        this.ignoreCellBackground = sheetInfo.ignoreCellBackground;
    }
    if(sheetInfo.ignoreCellBorder != null)
    {
        this.ignoreCellBorder = sheetInfo.ignoreCellBorder;
    }
    this.direction = direction;
}
项目:jasperreports    文件:XlsxStyleHelper.java   
/**
 * 
 */
private void exportCellStyle(
        JRExporterGridCell gridCell, 
        XlsxStyleInfo styleInfo, 
        Integer styleIndex, 
        JRXlsAbstractExporter.SheetInfo sheetInfo)
{
    try
    {
        if (Boolean.TRUE.equals(sheetInfo.ignoreCellBackground) || styleInfo.backcolor == null)
        {
            if (Boolean.TRUE.equals(sheetInfo.whitePageBackground))
            {
                fillsWriter.write("<fill><patternFill patternType=\"solid\"><fgColor rgb=\"FFFFFF\"/></patternFill></fill>\n");
            }
            else
            {
                fillsWriter.write("<fill><patternFill patternType=\"none\"/></fill>\n");
            }
        }
        else
        {
            fillsWriter.write("<fill><patternFill patternType=\"solid\"><fgColor rgb=\"" + styleInfo.backcolor + "\"/></patternFill></fill>\n");
        }

        cellXfsWriter.write(
            "<xf numFmtId=\"" + styleInfo.formatIndex
            + "\" fontId=\"" + styleInfo.fontIndex
            + "\" fillId=\"" + (styleIndex.intValue() + 1)
            + "\" borderId=\"" + styleInfo.borderIndex
            + "\" xfId=\"0\""
            + " applyAlignment=\"1\" applyProtection=\"1\" applyNumberFormat=\"1\" applyFont=\"1\" applyFill=\"1\" applyBorder=\"1\">"
            + "<alignment wrapText=\"" + (styleInfo.isWrapText && !styleInfo.isShrinkToFit) + "\""
            + (styleInfo.horizontalAlign == null ? "" : " horizontal=\"" + styleInfo.horizontalAlign + "\"")
            + (styleInfo.verticalAlign == null ? "" : " vertical=\"" + styleInfo.verticalAlign + "\"")
            + (styleInfo.isShrinkToFit ? " shrinkToFit=\"" + styleInfo.isShrinkToFit + "\"" : "")
            + (styleInfo.rotation != 0 ? " textRotation=\"" + styleInfo.rotation + "\"" : "")
            + "/>"
            );
        cellXfsWriter.write("<protection hidden=\"" + styleInfo.isHidden + "\" locked=\"" + styleInfo.isLocked + "\"/>");
        cellXfsWriter.write("</xf>\n");
    }
    catch (IOException e)
    {
        throw new JRRuntimeException(e);
    }
}
项目:jasperreports    文件:XlsxServlet.java   
@Override
protected JRXlsAbstractExporter getXlsExporter()
{
    return new JRXlsxExporter(DefaultJasperReportsContext.getInstance());
}
项目:jasperreports    文件:XlsServlet.java   
@Override
protected JRXlsAbstractExporter getXlsExporter()
{
    return new JRXlsExporter(DefaultJasperReportsContext.getInstance());
}
项目:PDFReporter-Studio    文件:AExportXlsAction.java   
protected abstract JRXlsAbstractExporter<?, ?, ?> createExporter(JasperReportsConfiguration jContext,
JRExportProgressMonitor monitor);
项目:ireport-fork    文件:XlsExportParametersPanel.java   
public void store() {

        Preferences pref = IReportManager.getPreferences();

        pref.putBoolean(JExcelApiExporterParameter.PROPERTY_CREATE_CUSTOM_PALETTE,  jCheckBoxCreateCustomPalette.isSelected() );
        pref.put(JExcelApiExporterParameter.PROPERTY_PASSWORD, jTextFieldPassword.getText());

        pref.putBoolean(JRXlsAbstractExporterParameter.PROPERTY_COLLAPSE_ROW_SPAN,  jCheckBoxCollapseRowSpan.isSelected() );
        pref.putBoolean(JRXlsAbstractExporterParameter.PROPERTY_DETECT_CELL_TYPE,  jCheckBoxAutoDetectCellType.isSelected() );
        pref.putBoolean(JRXlsAbstractExporterParameter.PROPERTY_FONT_SIZE_FIX_ENABLED,  jCheckBoxFontSizeFixEnabled.isSelected() );
        pref.putBoolean(JRXlsAbstractExporterParameter.PROPERTY_IGNORE_CELL_BORDER,  jCheckBoxIgnoreCellBorder.isSelected() );
        pref.putBoolean(JRXlsAbstractExporterParameter.PROPERTY_IGNORE_CELL_BACKGROUND,  jCheckBoxIgnoreCellBackground.isSelected() );
        pref.putBoolean(JRXlsAbstractExporterParameter.PROPERTY_IGNORE_GRAPHICS,  jCheckBoxIgnoreGraphics.isSelected() );
        pref.putBoolean(JRXlsAbstractExporterParameter.PROPERTY_IMAGE_BORDER_FIX_ENABLED,  jCheckBoxImageBorderFixEnabled.isSelected() );
        pref.putBoolean(JRXlsAbstractExporterParameter.PROPERTY_ONE_PAGE_PER_SHEET,  jCheckBoxOnePagePerSheet.isSelected() );
        pref.putBoolean(JRXlsAbstractExporterParameter.PROPERTY_REMOVE_EMPTY_SPACE_BETWEEN_COLUMNS,  jCheckBoxRemoveEmptySpaceBetweenColumns.isSelected() );
        pref.putBoolean(JRXlsAbstractExporterParameter.PROPERTY_REMOVE_EMPTY_SPACE_BETWEEN_ROWS,  jCheckBoxRemoveEmptySpaceBetweenRows.isSelected() );
        pref.putBoolean(JRXlsAbstractExporterParameter.PROPERTY_WHITE_PAGE_BACKGROUND,  jCheckBoxWhitePageBackground.isSelected() );

        SpinnerNumberModel model = (SpinnerNumberModel)jSpinnerMaximumRowsPerSheet.getModel();
        pref.putInt(JRXlsAbstractExporterParameter.PROPERTY_MAXIMUM_ROWS_PER_SHEET, model.getNumber().intValue());

        pref.putBoolean(JRPropertiesUtil.PROPERTY_PREFIX + "export.xls.useSheetNames",  jCheckBoxUseSheetNames.isSelected() );
        pref.put(JRPropertiesUtil.PROPERTY_PREFIX + "export.xls.sheetNames", jTextArea1.getText().trim());


        pref.put(JRXlsAbstractExporter.PROPERTY_FREEZE_COLUMN,  jTextFieldColumn.getText() );
        pref.putInt(JRXlsAbstractExporter.PROPERTY_FREEZE_ROW,  ((SpinnerNumberModel)jSpinnerFreezeRow.getModel()).getNumber().intValue() );

        pref.putBoolean(JRXlsAbstractExporterParameter.PROPERTY_FONT_SIZE_FIX_ENABLED, jCheckBoxFixFontSize.isSelected());


//        if (jComboBoxColumnEdge.getSelectedIndex() > 0)
//        {
//            pref.put(JRXlsAbstractExporter.PROPERTY_FREEZE_COLUMN_EDGE, (String) ((Tag)jComboBoxColumnEdge.getSelectedItem()).getValue());
//        }
//        else
//        {
//            pref.remove(JRXlsAbstractExporter.PROPERTY_FREEZE_COLUMN_EDGE);
//        }

//        if (jComboBoxRowEdge.getSelectedIndex() > 0)
//        {
//            pref.put(JRXlsAbstractExporter.PROPERTY_FREEZE_ROW_EDGE, (String) ((Tag)jComboBoxRowEdge.getSelectedItem()).getValue());
//            System.out.println("Saved " + (String) ((Tag)jComboBoxRowEdge.getSelectedItem()).getValue());
//        }
//        else
//        {
//            pref.remove(JRXlsAbstractExporter.PROPERTY_FREEZE_ROW_EDGE);
//        }
    }
项目:jasperreports    文件:AbstractXlsServlet.java   
/**
 *
 */
protected abstract JRXlsAbstractExporter<XlsReportConfiguration, XlsExporterConfiguration, JRXlsExporterContext> getXlsExporter();
项目:ireport-fork    文件:XlsExportParametersPanel.java   
public void load() {
    setInit(true);
    Preferences pref = IReportManager.getPreferences();

    JRPropertiesUtil jrPropUtils = IRLocalJasperReportsContext.getUtilities();

    jCheckBoxCreateCustomPalette.setSelected( pref.getBoolean(JExcelApiExporterParameter.PROPERTY_CREATE_CUSTOM_PALETTE, jrPropUtils.getBooleanProperty(JExcelApiExporterParameter.PROPERTY_CREATE_CUSTOM_PALETTE)));
    jTextFieldPassword.setText(  pref.get(JExcelApiExporterParameter.PROPERTY_PASSWORD, jrPropUtils.getProperty(JExcelApiExporterParameter.PROPERTY_PASSWORD)));

    jCheckBoxCollapseRowSpan.setSelected( pref.getBoolean(JRXlsAbstractExporterParameter.PROPERTY_COLLAPSE_ROW_SPAN, jrPropUtils.getBooleanProperty(JRXlsAbstractExporterParameter.PROPERTY_COLLAPSE_ROW_SPAN)));

    jCheckBoxAutoDetectCellType.setSelected( pref.getBoolean(JRXlsAbstractExporterParameter.PROPERTY_DETECT_CELL_TYPE, jrPropUtils.getBooleanProperty(JRXlsAbstractExporterParameter.PROPERTY_COLLAPSE_ROW_SPAN)));
    jCheckBoxFontSizeFixEnabled.setSelected( pref.getBoolean(JRXlsAbstractExporterParameter.PROPERTY_FONT_SIZE_FIX_ENABLED, jrPropUtils.getBooleanProperty(JRXlsAbstractExporterParameter.PROPERTY_COLLAPSE_ROW_SPAN)));
    jCheckBoxIgnoreCellBorder.setSelected( pref.getBoolean(JRXlsAbstractExporterParameter.PROPERTY_IGNORE_CELL_BORDER, jrPropUtils.getBooleanProperty(JRXlsAbstractExporterParameter.PROPERTY_COLLAPSE_ROW_SPAN)));
    jCheckBoxIgnoreCellBackground.setSelected( pref.getBoolean(JRXlsAbstractExporterParameter.PROPERTY_IGNORE_CELL_BACKGROUND, jrPropUtils.getBooleanProperty(JRXlsAbstractExporterParameter.PROPERTY_IGNORE_CELL_BACKGROUND)));

    jCheckBoxIgnoreGraphics.setSelected( pref.getBoolean(JRXlsAbstractExporterParameter.PROPERTY_IGNORE_GRAPHICS, jrPropUtils.getBooleanProperty(JRXlsAbstractExporterParameter.PROPERTY_IGNORE_GRAPHICS)));
    jCheckBoxImageBorderFixEnabled.setSelected( pref.getBoolean(JRXlsAbstractExporterParameter.PROPERTY_IMAGE_BORDER_FIX_ENABLED, jrPropUtils.getBooleanProperty(JRXlsAbstractExporterParameter.PROPERTY_IMAGE_BORDER_FIX_ENABLED)));
    jCheckBoxOnePagePerSheet.setSelected( pref.getBoolean(JRXlsAbstractExporterParameter.PROPERTY_ONE_PAGE_PER_SHEET, jrPropUtils.getBooleanProperty(JRXlsAbstractExporterParameter.PROPERTY_ONE_PAGE_PER_SHEET)));
    jCheckBoxRemoveEmptySpaceBetweenColumns.setSelected( pref.getBoolean(JRXlsAbstractExporterParameter.PROPERTY_REMOVE_EMPTY_SPACE_BETWEEN_COLUMNS, jrPropUtils.getBooleanProperty(JRXlsAbstractExporterParameter.PROPERTY_REMOVE_EMPTY_SPACE_BETWEEN_COLUMNS)));
    jCheckBoxRemoveEmptySpaceBetweenRows.setSelected( pref.getBoolean(JRXlsAbstractExporterParameter.PROPERTY_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, jrPropUtils.getBooleanProperty(JRXlsAbstractExporterParameter.PROPERTY_REMOVE_EMPTY_SPACE_BETWEEN_ROWS)));
    jCheckBoxWhitePageBackground.setSelected( pref.getBoolean(JRXlsAbstractExporterParameter.PROPERTY_WHITE_PAGE_BACKGROUND, jrPropUtils.getBooleanProperty(JRXlsAbstractExporterParameter.PROPERTY_WHITE_PAGE_BACKGROUND)));

    SpinnerNumberModel model = (SpinnerNumberModel)jSpinnerMaximumRowsPerSheet.getModel();
    model.setValue( pref.getInt(JRXlsAbstractExporterParameter.PROPERTY_MAXIMUM_ROWS_PER_SHEET, jrPropUtils.getIntegerProperty(JRXlsAbstractExporterParameter.PROPERTY_MAXIMUM_ROWS_PER_SHEET)));

    jCheckBoxUseSheetNames.setSelected( pref.getBoolean(JRPropertiesUtil.PROPERTY_PREFIX + "export.xls.useSheetNames", false));

    // freeze pane...
    String columnIndex = jrPropUtils.getProperty(JRXlsAbstractExporter.PROPERTY_FREEZE_COLUMN);
    if (columnIndex == null) columnIndex = "";
    jTextFieldColumn.setText( pref.get(JRXlsAbstractExporter.PROPERTY_FREEZE_COLUMN, columnIndex));
    ((SpinnerNumberModel)jSpinnerFreezeRow.getModel()).setValue( pref.getInt(JRXlsAbstractExporter.PROPERTY_FREEZE_ROW, jrPropUtils.getIntegerProperty(JRXlsAbstractExporter.PROPERTY_FREEZE_ROW,0)));

    //com.jaspersoft.ireport.designer.utils.Misc.setComboBoxTag(true, pref.get(JRXlsAbstractExporter.PROPERTY_FREEZE_COLUMN_EDGE, jrPropUtils.getProperty(JRXlsAbstractExporter.PROPERTY_FREEZE_COLUMN_EDGE)), jComboBoxColumnEdge);
    //com.jaspersoft.ireport.designer.utils.Misc.setComboBoxTag(true, pref.get(JRXlsAbstractExporter.PROPERTY_FREEZE_ROW_EDGE, jrPropUtils.getProperty(JRXlsAbstractExporter.PROPERTY_FREEZE_ROW_EDGE)), jComboBoxRowEdge);


    jTextArea1.setText(pref.get(JRPropertiesUtil.PROPERTY_PREFIX + "export.xls.sheetNames", jrPropUtils.getProperty(JRXlsAbstractExporterParameter.PROPERTY_MAXIMUM_ROWS_PER_SHEET)));


    jCheckBoxFixFontSize.setSelected( pref.getBoolean(JRXlsAbstractExporterParameter.PROPERTY_FONT_SIZE_FIX_ENABLED, jrPropUtils.getBooleanProperty(JRXlsAbstractExporterParameter.PROPERTY_FONT_SIZE_FIX_ENABLED)));


    setInit(false);
}