本文整理汇总了Java中org.apache.poi.ss.usermodel.HorizontalAlignment.RIGHT属性的典型用法代码示例。如果您正苦于以下问题:Java HorizontalAlignment.RIGHT属性的具体用法?Java HorizontalAlignment.RIGHT怎么用?Java HorizontalAlignment.RIGHT使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.poi.ss.usermodel.HorizontalAlignment
的用法示例。
在下文中一共展示了HorizontalAlignment.RIGHT属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: hAlignToPoi
public static HorizontalAlignment hAlignToPoi(HAlign hAlign) {
switch (hAlign) {
case ALIGN_LEFT:
return HorizontalAlignment.LEFT;
case ALIGN_RIGHT:
return HorizontalAlignment.RIGHT;
case ALIGN_CENTER:
return HorizontalAlignment.CENTER;
case ALIGN_JUSTIFY:
return HorizontalAlignment.JUSTIFY;
case ALIGN_AUTOMATIC:
return HorizontalAlignment.GENERAL;
default:
throw new IllegalArgumentException();
}
}
示例2: getCellAlignment
@Override
public HorizontalAlignment getCellAlignment(final String propId) {
final Renderer<?> renderer = getRenderer(propId);
if (renderer != null) {
if (ExcelExport.isNumeric(renderer.getPresentationType())) {
return HorizontalAlignment.RIGHT;
}
}
return defaultAlignment;
}
示例3: getHorizontalAlignment
private HorizontalAlignment getHorizontalAlignment(TextAlignHolder alignment)
{
switch (alignment.horizontalAlignment)
{
case RIGHT:
return HorizontalAlignment.RIGHT;
case CENTER:
return HorizontalAlignment.CENTER;
case JUSTIFIED:
return HorizontalAlignment.JUSTIFY;
case LEFT:
default:
return HorizontalAlignment.LEFT;
}
}
示例4: getHorizontalAlignment
private HorizontalAlignment getHorizontalAlignment(TextAlignHolder alignment) {
switch (alignment.horizontalAlignment)
{
case RIGHT:
return HorizontalAlignment.RIGHT;
case CENTER:
return HorizontalAlignment.CENTER;
case JUSTIFIED:
return HorizontalAlignment.JUSTIFY;
case LEFT:
default:
return HorizontalAlignment.LEFT;
}
}
示例5: getAlignment
private HorizontalAlignment getAlignment(TextAlignment alignment) {
switch (alignment) {
case LEFT:
return HorizontalAlignment.LEFT;
case RIGHT:
return HorizontalAlignment.RIGHT;
case CENTER:
return HorizontalAlignment.CENTER;
case JUSTIFY:
return HorizontalAlignment.JUSTIFY;
default:
throw new IllegalArgumentException("Unknown alignment type: "
+ alignment);
}
}