use of org.apache.poi.ddf.EscherSimpleProperty in project poi by apache.
the class HSLFShape method getEscherProperty.
/**
* Get the value of a simple escher property for this shape.
*
* @param propId The id of the property. One of the constants defined in EscherOptRecord.
*/
public int getEscherProperty(short propId, int defaultValue) {
AbstractEscherOptRecord opt = getEscherOptRecord();
EscherSimpleProperty prop = getEscherProperty(opt, propId);
return prop == null ? defaultValue : prop.getPropertyValue();
}
use of org.apache.poi.ddf.EscherSimpleProperty in project poi by apache.
the class HSLFSimpleShape method getLineDash.
/**
* Gets line dashing.
*
* @return dashing of the line.
*/
public LineDash getLineDash() {
AbstractEscherOptRecord opt = getEscherOptRecord();
EscherSimpleProperty prop = getEscherProperty(opt, EscherProperties.LINESTYLE__LINEDASHING);
return (prop == null) ? LineDash.SOLID : LineDash.fromNativeId(prop.getPropertyValue());
}
use of org.apache.poi.ddf.EscherSimpleProperty in project poi by apache.
the class HSLFSimpleShape method getLineTailWidth.
public DecorationSize getLineTailWidth() {
AbstractEscherOptRecord opt = getEscherOptRecord();
EscherSimpleProperty prop = getEscherProperty(opt, EscherProperties.LINESTYLE__LINEENDARROWWIDTH);
return (prop == null) ? null : DecorationSize.fromNativeId(prop.getPropertyValue());
}
use of org.apache.poi.ddf.EscherSimpleProperty in project poi by apache.
the class HSLFSimpleShape method getLineCompound.
/**
* Gets the line compound style
*
* @return the compound style of the line.
*/
public LineCompound getLineCompound() {
AbstractEscherOptRecord opt = getEscherOptRecord();
EscherSimpleProperty prop = getEscherProperty(opt, EscherProperties.LINESTYLE__LINESTYLE);
return (prop == null) ? LineCompound.SINGLE : LineCompound.fromNativeId(prop.getPropertyValue());
}
use of org.apache.poi.ddf.EscherSimpleProperty in project poi by apache.
the class HSLFSimpleShape method getLineColor.
/**
* @return color of the line. If color is not set returns {@code null}
*/
public Color getLineColor() {
AbstractEscherOptRecord opt = getEscherOptRecord();
EscherSimpleProperty p = getEscherProperty(opt, EscherProperties.LINESTYLE__NOLINEDRAWDASH);
if (p != null && (p.getPropertyValue() & 0x8) == 0) {
return null;
}
Color clr = getColor(EscherProperties.LINESTYLE__COLOR, EscherProperties.LINESTYLE__OPACITY, -1);
return clr == null ? null : clr;
}
Aggregations