Expose one more bit of style information generically (for XSSF). If someone needs all these properties for HSSF charts as well, we can build a new Interface for the various bits and populate it with things like axis line width and color, etc. but for now I think most users are in the XSSF realm like me.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800341 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2cbd15ece2
commit
07a7987a48
@ -33,6 +33,7 @@ import org.openxmlformats.schemas.drawingml.x2006.chart.CTNumFmt;
|
||||
import org.openxmlformats.schemas.drawingml.x2006.chart.CTScaling;
|
||||
import org.openxmlformats.schemas.drawingml.x2006.chart.CTTickMark;
|
||||
import org.openxmlformats.schemas.drawingml.x2006.chart.STTickLblPos;
|
||||
import org.openxmlformats.schemas.drawingml.x2006.main.CTShapeProperties;
|
||||
|
||||
/**
|
||||
* Category axis type.
|
||||
@ -58,6 +59,10 @@ public class XSSFCategoryAxis extends XSSFChartAxis {
|
||||
return ctCatAx.getAxId().getVal();
|
||||
}
|
||||
|
||||
public CTShapeProperties getLine() {
|
||||
return ctCatAx.getSpPr();
|
||||
}
|
||||
|
||||
protected CTAxPos getCTAxPos() {
|
||||
return ctCatAx.getAxPos();
|
||||
}
|
||||
|
@ -37,6 +37,7 @@ import org.openxmlformats.schemas.drawingml.x2006.chart.STAxPos;
|
||||
import org.openxmlformats.schemas.drawingml.x2006.chart.STCrosses;
|
||||
import org.openxmlformats.schemas.drawingml.x2006.chart.STOrientation;
|
||||
import org.openxmlformats.schemas.drawingml.x2006.chart.STTickMark;
|
||||
import org.openxmlformats.schemas.drawingml.x2006.main.CTShapeProperties;
|
||||
|
||||
/**
|
||||
* Base class for all axis types.
|
||||
@ -195,6 +196,7 @@ public abstract class XSSFChartAxis implements ChartAxis {
|
||||
protected abstract CTTickMark getMajorCTTickMark();
|
||||
protected abstract CTTickMark getMinorCTTickMark();
|
||||
public abstract CTChartLines getMajorGridLines();
|
||||
public abstract CTShapeProperties getLine();
|
||||
|
||||
private static STOrientation.Enum fromAxisOrientation(AxisOrientation orientation) {
|
||||
switch (orientation) {
|
||||
|
@ -34,6 +34,7 @@ import org.openxmlformats.schemas.drawingml.x2006.chart.CTNumFmt;
|
||||
import org.openxmlformats.schemas.drawingml.x2006.chart.CTScaling;
|
||||
import org.openxmlformats.schemas.drawingml.x2006.chart.CTTickMark;
|
||||
import org.openxmlformats.schemas.drawingml.x2006.chart.STTickLblPos;
|
||||
import org.openxmlformats.schemas.drawingml.x2006.main.CTShapeProperties;
|
||||
|
||||
/**
|
||||
* Date axis type. Currently only implements the same values as {@link XSSFCategoryAxis}, since the two are nearly identical.
|
||||
@ -66,6 +67,10 @@ public class XSSFDateAxis extends XSSFChartAxis {
|
||||
return ctDateAx.getAxId().getVal();
|
||||
}
|
||||
|
||||
public CTShapeProperties getLine() {
|
||||
return ctDateAx.getSpPr();
|
||||
}
|
||||
|
||||
protected CTAxPos getCTAxPos() {
|
||||
return ctDateAx.getAxPos();
|
||||
}
|
||||
|
@ -36,6 +36,7 @@ import org.openxmlformats.schemas.drawingml.x2006.chart.CTTickMark;
|
||||
import org.openxmlformats.schemas.drawingml.x2006.chart.CTValAx;
|
||||
import org.openxmlformats.schemas.drawingml.x2006.chart.STCrossBetween;
|
||||
import org.openxmlformats.schemas.drawingml.x2006.chart.STTickLblPos;
|
||||
import org.openxmlformats.schemas.drawingml.x2006.main.CTShapeProperties;
|
||||
|
||||
/**
|
||||
* Value axis type.
|
||||
@ -61,6 +62,10 @@ public class XSSFValueAxis extends XSSFChartAxis implements ValueAxis {
|
||||
return ctValAx.getAxId().getVal();
|
||||
}
|
||||
|
||||
public CTShapeProperties getLine() {
|
||||
return ctValAx.getSpPr();
|
||||
}
|
||||
|
||||
public void setCrossBetween(AxisCrossBetween crossBetween) {
|
||||
ctValAx.getCrossBetween().setVal(fromCrossBetween(crossBetween));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user