当前位置: 首页>>代码示例>>Java>>正文


Java Cell.setHorizontalAlignment方法代码示例

本文整理汇总了Java中org.odftoolkit.simple.table.Cell.setHorizontalAlignment方法的典型用法代码示例。如果您正苦于以下问题:Java Cell.setHorizontalAlignment方法的具体用法?Java Cell.setHorizontalAlignment怎么用?Java Cell.setHorizontalAlignment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.odftoolkit.simple.table.Cell的用法示例。


在下文中一共展示了Cell.setHorizontalAlignment方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addAdmonition

import org.odftoolkit.simple.table.Cell; //导入方法依赖的package包/类
private void addAdmonition(AsciiElement element) {
    this.setTitle(element, FontStyle.ITALIC, HorizontalAlignmentType.LEFT, 12, new Color("#7a2518"), odtDocument);

    Table table = odtDocument.addTable(1, 2);
    Cell rowOColumn0 = table.getCellByPosition(0, 0);
    String caption = getSpecificProperty(element.getjObj(), "caption", String.class);
    rowOColumn0.setDisplayText(caption.toUpperCase());
    rowOColumn0.setHorizontalAlignment(HorizontalAlignmentType.CENTER);
    rowOColumn0.setVerticalAlignment(VerticalAlignmentType.MIDDLE);

    Cell rowOColumn1 = table.getCellByPosition(1, 0);
    if (element.getNOfBlocks() == 0)
        rowOColumn1.setStringValue(element.getContent());
    else {
        this.buildODTDocument(element.getChildren(), rowOColumn1);
    }

    Column column = table.getColumnByIndex(0);
    column.setUseOptimalWidth(true);
    column.setWidth(32.0);
}
 
开发者ID:asciidocfx,项目名称:AsciidocFX,代码行数:22,代码来源:ODFConverter.java

示例2: putHeader

import org.odftoolkit.simple.table.Cell; //导入方法依赖的package包/类
public static Cell putHeader(final Row row, int cellIndex, String header) {

		Cell cell = row.getCellByIndex(cellIndex);
		cell.setStringValue(header);
		cell.setBorders(CellBordersType.ALL_FOUR, getBlackBorder());
		cell.setCellBackgroundColor(ExportConstants.CALC_COL_GRAY10);
		cell.setFont(getBoldFont(10));
		cell.setVerticalAlignment(ExportConstants.ALIGN_VER_MIDDLE);
		cell.setHorizontalAlignment(ExportConstants.ALIGH_HOR_CENTER);
		cell.setTextWrapped(true);
		return cell;
	}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:13,代码来源:CalcUtils.java

示例3: putMainTitle

import org.odftoolkit.simple.table.Cell; //导入方法依赖的package包/类
public static void putMainTitle(final Table table, int rowIndex, int maxCols, String title) {
	Row row = table.getRowByIndex(rowIndex);
	Cell cell = row.getCellByIndex(1);
	cell.setStringValue(title);
	cell.setTextWrapped(true);
	cell.setFont(CalcUtils.getBoldFont(14));
	cell.setVerticalAlignment(ExportConstants.ALIGN_VER_MIDDLE);
	cell.setHorizontalAlignment(ExportConstants.ALIGH_HOR_CENTER);
	CellRange cellRange = table.getCellRangeByPosition(1, rowIndex, maxCols, rowIndex);
	cellRange.merge();
	row.setHeight(7, false);
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:13,代码来源:CalcUtils.java

示例4: putGroupCell

import org.odftoolkit.simple.table.Cell; //导入方法依赖的package包/类
public static void putGroupCell(final Table table, int colIndex, int rowIndex, String value) {
	final Cell cell = createBasicCell(table, colIndex, rowIndex, value);
	cell.setCellBackgroundColor(ExportConstants.CALC_COL_ORANGE);
	cell.setFont(getFont(10, false, true));
	cell.setHorizontalAlignment(ExportConstants.ALIGH_HOR_LEFT);
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:7,代码来源:CalcUtils.java

示例5: setAlignmentTypes

import org.odftoolkit.simple.table.Cell; //导入方法依赖的package包/类
private void setAlignmentTypes(Map<String, String> attrs, Cell tableCell) {
    HorizontalAlignmentType hAlign = HorizontalAlignmentType.enumValueOf(attrs.get("halign"));
    VerticalAlignmentType vAlign = VerticalAlignmentType.enumValueOf(attrs.get("valign"));
    tableCell.setHorizontalAlignment(hAlign);
    tableCell.setVerticalAlignment(vAlign);
}
 
开发者ID:asciidocfx,项目名称:AsciidocFX,代码行数:7,代码来源:ODFConverter.java


注:本文中的org.odftoolkit.simple.table.Cell.setHorizontalAlignment方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。