Search in sources :

Example 16 with WritableCellFormat

use of jxl.write.WritableCellFormat 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;
}
Also used : WriteException(jxl.write.WriteException) WritableFont(jxl.write.WritableFont) WritableCellFormat(jxl.write.WritableCellFormat)

Example 17 with WritableCellFormat

use of jxl.write.WritableCellFormat 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;
}
Also used : WriteException(jxl.write.WriteException) WritableFont(jxl.write.WritableFont) WritableCellFormat(jxl.write.WritableCellFormat)

Example 18 with WritableCellFormat

use of jxl.write.WritableCellFormat in project cubrid-manager by CUBRID.

the class ExportTableDefinitionLayoutType method getNormalLeftAlignCellStyle.

/**
	 * GetNormalLeftAlignCellStyle
	 *
	 * @return WritableCellFormat
	 */
public static WritableCellFormat getNormalLeftAlignCellStyle() {
    WritableFont font = new WritableFont(WritableFont.ARIAL, 10);
    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);
    }
    return format;
}
Also used : WriteException(jxl.write.WriteException) WritableFont(jxl.write.WritableFont) WritableCellFormat(jxl.write.WritableCellFormat)

Example 19 with WritableCellFormat

use of jxl.write.WritableCellFormat in project cubrid-manager by CUBRID.

the class ExportTableDefinitionLayoutType method getBoldCenterAlignCellStyle.

/**
	 * GetNormalCell
	 *
	 * @return WritableCellFormat
	 */
public static WritableCellFormat getBoldCenterAlignCellStyle() {
    WritableFont font = new WritableFont(WritableFont.ARIAL, 10);
    WritableCellFormat format = new WritableCellFormat(font);
    try {
        font.setBoldStyle(WritableFont.BOLD);
        format.setAlignment(jxl.format.Alignment.CENTRE);
        format.setVerticalAlignment(jxl.format.VerticalAlignment.CENTRE);
        format.setBorder(Border.ALL, BorderLineStyle.THIN, Colour.BLACK);
        format.setBackground(jxl.format.Colour.GREY_25_PERCENT);
        format.setWrap(true);
    } catch (WriteException e) {
        LOGGER.error("", e);
    }
    return format;
}
Also used : WriteException(jxl.write.WriteException) WritableFont(jxl.write.WritableFont) WritableCellFormat(jxl.write.WritableCellFormat)

Example 20 with WritableCellFormat

use of jxl.write.WritableCellFormat in project cubrid-manager by CUBRID.

the class RunSQLEventHandler method getNormalCell.

/**
	 * Return the normal cell format.
	 *
	 * @return WritableCellFormat
	 */
public static WritableCellFormat getNormalCell() {
    // FIXME logic code move to core module
    WritableFont font = new WritableFont(WritableFont.TIMES, 12);
    WritableCellFormat format = new WritableCellFormat(font);
    try {
        format.setAlignment(jxl.format.Alignment.LEFT);
        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;
}
Also used : WriteException(jxl.write.WriteException) WritableFont(jxl.write.WritableFont) WritableCellFormat(jxl.write.WritableCellFormat)

Aggregations

WritableCellFormat (jxl.write.WritableCellFormat)24 WritableFont (jxl.write.WritableFont)17 WriteException (jxl.write.WriteException)17 WritableSheet (jxl.write.WritableSheet)10 WorkbookSettings (jxl.WorkbookSettings)6 WritableWorkbook (jxl.write.WritableWorkbook)6 Label (jxl.write.Label)3 TableItem (org.eclipse.swt.widgets.TableItem)3 File (java.io.File)2 IOException (java.io.IOException)2 InvocationTargetException (java.lang.reflect.InvocationTargetException)2 List (java.util.List)2 SqlRunnerFailed (com.cubrid.common.ui.common.sqlrunner.model.SqlRunnerFailed)1 CubridDatabase (com.cubrid.common.ui.spi.model.CubridDatabase)1 DatabaseEditorConfig (com.cubrid.common.ui.spi.model.DatabaseEditorConfig)1 DatabaseInfo (com.cubrid.cubridmanager.core.cubrid.database.model.DatabaseInfo)1 CUBRIDResultSetMetaDataProxy (com.cubrid.jdbc.proxy.driver.CUBRIDResultSetMetaDataProxy)1 FileNotFoundException (java.io.FileNotFoundException)1 UnsupportedEncodingException (java.io.UnsupportedEncodingException)1 SQLException (java.sql.SQLException)1