use of jxl.write.WriteException in project cubrid-manager by CUBRID.
the class ExportHostStatusDialog method saveAllData.
private boolean saveAllData() {
String fileName = saveExcelPath.getText() + saveExcelName.getText() + ".xls";
WorkbookSettings workbookSettings = new WorkbookSettings();
workbookSettings.setEncoding(fileCharsetCombo.getText());
boolean isOK = true;
try {
wwb = Workbook.createWorkbook(new File(fileName), workbookSettings);
/*System info*/
saveTableData(com.cubrid.cubridmanager.ui.host.Messages.titleServerInfo, editor.getDbServerInfoText().getText(), com.cubrid.cubridmanager.ui.host.Messages.titleServerInfo, 0);
/*DB info*/
saveDBInfoData(editor.getDatabaseTable(), com.cubrid.cubridmanager.ui.host.Messages.titleDBInfo, 1);
/*DB volume info*/
saveTableData(editor.getVolumeTableViewer().getTable(), com.cubrid.cubridmanager.ui.host.Messages.titleVolumeInfo, 2);
/*Broker info*/
saveTableData(editor.getBrokerTableViewer().getTable(), com.cubrid.cubridmanager.ui.host.Messages.titleBrokerInfo, 3);
/*System status*/
saveTableData(editor.getServerTableViewer().getTable(), com.cubrid.cubridmanager.ui.host.Messages.titleSystemInfo, 4);
wwb.write();
} catch (IOException e) {
isOK = false;
LOGGER.error("Export to error", e);
} catch (RowsExceededException e) {
isOK = false;
LOGGER.error("Export to error", e);
} catch (WriteException e) {
isOK = false;
LOGGER.error("Export to error", e);
} finally {
if (wwb != null) {
try {
wwb.close();
} catch (Exception ex) {
LOGGER.error("close excel stream error", ex);
}
}
}
return isOK;
}
use of jxl.write.WriteException in project cubrid-manager by CUBRID.
the class BrokerLogTopMergeProgress method getNormalCell.
/**
* getNormalCell
*
* @return WritableCellFormat
*/
public static WritableCellFormat getNormalCell() {
// FIXME move this logic to core module
WritableFont font = new WritableFont(WritableFont.TIMES, 11);
WritableCellFormat format = new WritableCellFormat(font);
try {
format.setAlignment(jxl.format.Alignment.CENTRE);
format.setVerticalAlignment(jxl.format.VerticalAlignment.CENTRE);
format.setBorder(Border.ALL, BorderLineStyle.THIN, Colour.BLACK);
format.setWrap(true);
} catch (WriteException e) {
LOGGER.error(e.getMessage(), e);
}
return format;
}
use of jxl.write.WriteException in project cubrid-manager by CUBRID.
the class BrokerLogTopMergeProgress method getSQLCell.
/**
* getSQLCell
*
* @return WritableCellFormat
*/
public static WritableCellFormat getSQLCell() {
// FIXME move this logic to core module
WritableFont font = new WritableFont(WritableFont.TIMES, 11);
WritableCellFormat format = new WritableCellFormat(font);
try {
format.setAlignment(jxl.format.Alignment.LEFT);
format.setVerticalAlignment(jxl.format.VerticalAlignment.TOP);
format.setBorder(Border.ALL, BorderLineStyle.THIN, Colour.BLACK);
format.setWrap(true);
} catch (WriteException e) {
LOGGER.error(e.getMessage(), e);
}
return format;
}
use of jxl.write.WriteException in project cubrid-manager by CUBRID.
the class ExportTableDefinitionLayoutType method getNormalRightAlignCellStyle.
/**
* GetNormalRightAlignCellStyle
*
* @return
*/
public static WritableCellFormat getNormalRightAlignCellStyle() {
WritableFont font = new WritableFont(WritableFont.ARIAL, 10);
WritableCellFormat format = new WritableCellFormat(font);
try {
format.setAlignment(jxl.format.Alignment.RIGHT);
format.setVerticalAlignment(jxl.format.VerticalAlignment.TOP);
format.setBorder(Border.ALL, BorderLineStyle.THIN, Colour.BLACK);
format.setWrap(true);
} catch (WriteException e) {
LOGGER.error("", e);
}
return format;
}
use of jxl.write.WriteException in project cubrid-manager by CUBRID.
the class ExportTableDefinitionLayoutType method getNormalCenterAlignCellStyle.
/**
* GetNormalCell
*
* @return WritableCellFormat
*/
public static WritableCellFormat getNormalCenterAlignCellStyle() {
WritableFont font = new WritableFont(WritableFont.ARIAL, 10);
WritableCellFormat format = new WritableCellFormat(font);
try {
format.setAlignment(jxl.format.Alignment.CENTRE);
format.setVerticalAlignment(jxl.format.VerticalAlignment.CENTRE);
format.setBorder(Border.ALL, BorderLineStyle.THIN, Colour.BLACK);
format.setWrap(true);
} catch (WriteException e) {
LOGGER.error("", e);
}
return format;
}
Aggregations