List of usage examples for org.apache.poi.xslf.usermodel XSLFTextRun isSuperscript
@Override
public boolean isSuperscript()
From source file:org.joeffice.presentation.ShapeComponent.java
License:Apache License
private AttributeSet getFontAttributes(XSLFTextRun textPart) { SimpleAttributeSet attributes = new SimpleAttributeSet(); String fontFamily = textPart.getFontFamily(); if (fontFamily != null) { StyleConstants.setFontFamily(attributes, fontFamily); }/*from www. j av a2 s .com*/ Color textColor = textPart.getFontColor(); if (textColor != null) { StyleConstants.setForeground(attributes, textColor); } double fontSize = textPart.getFontSize(); if (fontSize > 0) { fontSize = fontSize * slideComponent.getScale(); StyleConstants.setFontSize(attributes, (int) fontSize); } boolean italic = textPart.isItalic(); if (italic) { StyleConstants.setItalic(attributes, true); } boolean bold = textPart.isBold(); if (bold) { StyleConstants.setBold(attributes, true); } boolean underlined = textPart.isUnderline(); if (underlined) { StyleConstants.setUnderline(attributes, true); } boolean strikeThrough = textPart.isStrikethrough(); if (strikeThrough) { StyleConstants.setStrikeThrough(attributes, true); } boolean subScript = textPart.isSubscript(); if (subScript) { StyleConstants.setSubscript(attributes, true); } boolean superScript = textPart.isSuperscript(); if (superScript) { StyleConstants.setSuperscript(attributes, true); } return attributes; }