void setImprinted(boolean imprint);
int getFontSize();
+ float getFontSizeAsFloat();
void setFontSize(int halfPoints);
+ void setFontSize(float halfPoints);
int getCharacterSpacing();
void setCharacterSpacing(int twips);
import org.apache.poi.hwpf.sprm.SprmBuffer;
import org.apache.poi.util.Removal;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+
/**
* This class represents a run of text that share common properties.
*/
return _props.getHps();
}
+ public float getFontSizeAsFloat()
+ {
+ return (float)getFontSize();
+ }
+
public void setFontSize(int halfPoints)
{
_props.setHps(halfPoints);
}
+ public void setFontSize(float halfPoints)
+ {
+ setFontSize(BigDecimal.valueOf(halfPoints).setScale(0, RoundingMode.HALF_UP).intValue());
+ }
+
public int getCharacterSpacing()
{
return _props.getDxaSpace();