/** * chart legend manipulation, get whether the chart use legend * * @param useLegend * a flag specifying whether or not use legend */ public void setUseLegend(boolean useLegend) { this.isUseLegend = useLegend; NodeList legends = chartElement.getElementsByTagNameNS(OdfDocumentNamespace.CHART.getUri(), "legend"); if (useLegend) { if (legends.getLength() == 0) { legend = chartElement.newChartLegendElement(ChartLegendPositionAttribute.Value.TOP_END.toString(), StyleLegendExpansionAttribute.Value.BALANCED.toString()); legend.setSvgXAttribute("6.715cm"); legend.setSvgYAttribute("3.192cm"); legend.setProperty(StyleGraphicPropertiesElement.Stroke, "none"); legend.setProperty(StyleGraphicPropertiesElement.StrokeColor, "#b3b3b3"); legend.setProperty(StyleGraphicPropertiesElement.Fill, "none"); legend.setProperty(StyleGraphicPropertiesElement.FillColor, "#e6e6e6"); legend.setProperty(StyleTextPropertiesElement.FontSize, "10pt"); legend.setProperty(StyleTextPropertiesElement.FontSizeAsian, "10pt"); legend.setProperty(StyleTextPropertiesElement.FontSizeComplex, "10pt"); } } else { if (legends.getLength() > 0) { chartElement.removeChild(legends.item(0)); } } }
/** * chart legend manipulation, get whether the chart use legend * * @param useLegend * a flag specifying whether or not use legend */ public void setUseLegend(boolean useLegend) { this.isUseLegend = useLegend; NodeList legends = chartElement.getElementsByTagNameNS(OdfDocumentNamespace.CHART.getUri(), "legend"); if (useLegend) { if (legends.getLength() == 0) { legend = chartElement.newChartLegendElement(ChartLegendPositionAttribute.Value.TOP_END.toString(), StyleLegendExpansionAttribute.Value.BALANCED.toString()); legend.setSvgXAttribute("6.715cm"); legend.setSvgYAttribute("3.192cm"); legend.setProperty(StyleGraphicPropertiesElement.Stroke, "none"); legend.setProperty(StyleGraphicPropertiesElement.StrokeColor, "#b3b3b3"); legend.setProperty(StyleGraphicPropertiesElement.Fill, "none"); legend.setProperty(StyleGraphicPropertiesElement.FillColor, "#e6e6e6"); legend.setProperty(StyleTextPropertiesElement.FontSize, "10pt"); legend.setProperty(StyleTextPropertiesElement.FontSizeAsian, "10pt"); legend.setProperty(StyleTextPropertiesElement.FontSizeComplex, "10pt"); } } else { if (legends.getLength() > 0) { chartElement.removeChild(legends.item(0)); } } }
/** * chart legend manipulation, get whether the chart use legend * * @param useLegend * a flag specifying whether or not use legend */ public void setUseLegend(boolean useLegend) { this.isUseLegend = useLegend; NodeList legends = chartElement.getElementsByTagNameNS(OdfDocumentNamespace.CHART.getUri(), "legend"); if (useLegend) { if (legends.getLength() == 0) { legend = chartElement.newChartLegendElement(ChartLegendPositionAttribute.Value.TOP_END.toString(), StyleLegendExpansionAttribute.Value.BALANCED.toString()); legend.setSvgXAttribute("6.715cm"); legend.setSvgYAttribute("3.192cm"); legend.setProperty(StyleGraphicPropertiesElement.Stroke, "none"); legend.setProperty(StyleGraphicPropertiesElement.StrokeColor, "#b3b3b3"); legend.setProperty(StyleGraphicPropertiesElement.Fill, "none"); legend.setProperty(StyleGraphicPropertiesElement.FillColor, "#e6e6e6"); legend.setProperty(StyleTextPropertiesElement.FontSize, "10pt"); legend.setProperty(StyleTextPropertiesElement.FontSizeAsian, "10pt"); legend.setProperty(StyleTextPropertiesElement.FontSizeComplex, "10pt"); } } else { if (legends.getLength() > 0) { chartElement.removeChild(legends.item(0)); } } }
/** * @param attrValue The <code>Enum</code> value of the attribute. */ public void setEnumValue(Value attrValue) { setValue(attrValue.toString()); }
/** * @param attrValue The <code>Enum</code> value of the attribute. */ public void setEnumValue(Value attrValue) { setValue(attrValue.toString()); }
/** * @return Returns the <code>Enum</code> value of the attribute */ public Value getEnumValue() { return Value.enumValueOf(this.getValue()); }
/** * @return Returns the <code>Enum</code> value of the attribute */ public Value getEnumValue() { return Value.enumValueOf(this.getValue()); }
/** * @return Returns the <code>Enum</code> value of the attribute */ public Value getEnumValue() { return Value.enumValueOf(this.getValue()); }
/** * @param attrValue The <code>Enum</code> value of the attribute. */ public void setEnumValue(Value attrValue) { setValue(attrValue.toString()); }