Class XDDFChartAxis
- java.lang.Object
-
- org.apache.poi.xddf.usermodel.chart.XDDFChartAxis
-
- All Implemented Interfaces:
HasShapeProperties
- Direct Known Subclasses:
XDDFCategoryAxis,XDDFDateAxis,XDDFSeriesAxis,XDDFValueAxis
@Beta public abstract class XDDFChartAxis extends Object implements HasShapeProperties
Base class for all axis types.
-
-
Constructor Summary
Constructors Constructor Description XDDFChartAxis()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidcrossAxis(XDDFChartAxis axis)Declare this axis cross another axis.AxisCrossesgetCrosses()protected abstract org.openxmlformats.schemas.drawingml.x2006.chart.CTUnsignedIntgetCTAxId()protected abstract org.openxmlformats.schemas.drawingml.x2006.chart.CTAxPosgetCTAxPos()protected abstract org.openxmlformats.schemas.drawingml.x2006.chart.CTCrossesgetCTCrosses()protected abstract org.openxmlformats.schemas.drawingml.x2006.chart.CTNumFmtgetCTNumFmt()protected abstract org.openxmlformats.schemas.drawingml.x2006.chart.CTScalinggetCTScaling()protected abstract org.openxmlformats.schemas.drawingml.x2006.chart.CTTickLblPosgetCTTickLblPos()protected abstract org.openxmlformats.schemas.drawingml.x2006.chart.CTBooleangetDelete()longgetId()doublegetLogBase()protected abstract org.openxmlformats.schemas.drawingml.x2006.chart.CTTickMarkgetMajorCTTickMark()AxisTickMarkgetMajorTickMark()abstract doublegetMajorUnit()doublegetMaximum()doublegetMinimum()protected abstract org.openxmlformats.schemas.drawingml.x2006.chart.CTTickMarkgetMinorCTTickMark()AxisTickMarkgetMinorTickMark()abstract doublegetMinorUnit()protected longgetNextAxId(org.openxmlformats.schemas.drawingml.x2006.chart.CTPlotArea plotArea)StringgetNumberFormat()protected org.openxmlformats.schemas.drawingml.x2006.main.CTShapePropertiesgetOrAddLinesProperties(org.openxmlformats.schemas.drawingml.x2006.chart.CTChartLines gridlines)abstract XDDFShapePropertiesgetOrAddMajorGridProperties()abstract XDDFShapePropertiesgetOrAddMinorGridProperties()abstract XDDFRunPropertiesgetOrAddTextProperties()protected org.openxmlformats.schemas.drawingml.x2006.main.CTTextCharacterPropertiesgetOrAddTextProperties(org.openxmlformats.schemas.drawingml.x2006.main.CTTextBody body)AxisOrientationgetOrientation()AxisPositiongetPosition()AxisTickLabelPositiongetTickLabelPosition()abstract booleanhasNumberFormat()Use this to check before retrieving a number format, as callinggetNumberFormat()may create a default one if none exists.booleanisSetLogBase()abstract booleanisSetMajorUnit()booleanisSetMaximum()booleanisSetMinimum()abstract booleanisSetMinorUnit()booleanisVisible()voidsetCrosses(AxisCrosses crosses)voidsetLogBase(double logBase)voidsetMajorTickMark(AxisTickMark tickMark)abstract voidsetMajorUnit(double major)voidsetMaximum(double max)voidsetMinimum(double min)voidsetMinorTickMark(AxisTickMark tickMark)abstract voidsetMinorUnit(double minor)voidsetNumberFormat(String format)voidsetOrientation(AxisOrientation orientation)voidsetPosition(AxisPosition position)voidsetTickLabelPosition(AxisTickLabelPosition labelPosition)abstract voidsetTitle(String text)voidsetVisible(boolean value)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.poi.xddf.usermodel.HasShapeProperties
getOrAddShapeProperties
-
-
-
-
Method Detail
-
getCTAxId
protected abstract org.openxmlformats.schemas.drawingml.x2006.chart.CTUnsignedInt getCTAxId()
-
getCTAxPos
protected abstract org.openxmlformats.schemas.drawingml.x2006.chart.CTAxPos getCTAxPos()
-
getCTNumFmt
protected abstract org.openxmlformats.schemas.drawingml.x2006.chart.CTNumFmt getCTNumFmt()
-
getCTScaling
protected abstract org.openxmlformats.schemas.drawingml.x2006.chart.CTScaling getCTScaling()
-
getCTCrosses
protected abstract org.openxmlformats.schemas.drawingml.x2006.chart.CTCrosses getCTCrosses()
-
getDelete
protected abstract org.openxmlformats.schemas.drawingml.x2006.chart.CTBoolean getDelete()
-
getMajorCTTickMark
protected abstract org.openxmlformats.schemas.drawingml.x2006.chart.CTTickMark getMajorCTTickMark()
-
getMinorCTTickMark
protected abstract org.openxmlformats.schemas.drawingml.x2006.chart.CTTickMark getMinorCTTickMark()
-
getCTTickLblPos
protected abstract org.openxmlformats.schemas.drawingml.x2006.chart.CTTickLblPos getCTTickLblPos()
-
getOrAddMajorGridProperties
public abstract XDDFShapeProperties getOrAddMajorGridProperties()
-
getOrAddMinorGridProperties
public abstract XDDFShapeProperties getOrAddMinorGridProperties()
-
getOrAddTextProperties
public abstract XDDFRunProperties getOrAddTextProperties()
- Since:
- POI 4.0.2
-
setTitle
public abstract void setTitle(String text)
- Since:
- 4.0.1
-
isSetMinorUnit
public abstract boolean isSetMinorUnit()
- Returns:
- true if minor unit value is defined, false otherwise
-
setMinorUnit
public abstract void setMinorUnit(double minor)
- Parameters:
minor- axis minor unit
-
getMinorUnit
public abstract double getMinorUnit()
- Returns:
- axis minor unit or NaN if not set
-
isSetMajorUnit
public abstract boolean isSetMajorUnit()
- Returns:
- true if major unit value is defined, false otherwise
-
setMajorUnit
public abstract void setMajorUnit(double major)
- Parameters:
major- axis major unit
-
getMajorUnit
public abstract double getMajorUnit()
- Returns:
- axis major unit or NaN if not set
-
getId
public long getId()
- Returns:
- axis id
-
getPosition
public AxisPosition getPosition()
- Returns:
- axis position
-
setPosition
public void setPosition(AxisPosition position)
- Parameters:
position- new axis position
-
hasNumberFormat
public abstract boolean hasNumberFormat()
Use this to check before retrieving a number format, as callinggetNumberFormat()may create a default one if none exists.- Returns:
- true if a number format element is defined, false if not
-
setNumberFormat
public void setNumberFormat(String format)
- Parameters:
format- axis number format
-
getNumberFormat
public String getNumberFormat()
- Returns:
- axis number format
-
isSetLogBase
public boolean isSetLogBase()
- Returns:
- true if log base is defined, false otherwise
-
setLogBase
public void setLogBase(double logBase)
- Parameters:
logBase- a number between 2 and 1000 (inclusive)- Throws:
IllegalArgumentException- if log base not within allowed range
-
getLogBase
public double getLogBase()
- Returns:
- axis log base or NaN if not set
-
isSetMinimum
public boolean isSetMinimum()
- Returns:
- true if minimum value is defined, false otherwise
-
setMinimum
public void setMinimum(double min)
- Parameters:
min- axis minimum
-
getMinimum
public double getMinimum()
- Returns:
- axis minimum or NaN if not set
-
isSetMaximum
public boolean isSetMaximum()
- Returns:
- true if maximum value is defined, false otherwise
-
setMaximum
public void setMaximum(double max)
- Parameters:
max- axis maximum
-
getMaximum
public double getMaximum()
- Returns:
- axis maximum or NaN if not set
-
getOrientation
public AxisOrientation getOrientation()
- Returns:
- axis orientation
-
setOrientation
public void setOrientation(AxisOrientation orientation)
- Parameters:
orientation- axis orientation
-
getCrosses
public AxisCrosses getCrosses()
- Returns:
- axis cross type
-
setCrosses
public void setCrosses(AxisCrosses crosses)
- Parameters:
crosses- axis cross type
-
crossAxis
public abstract void crossAxis(XDDFChartAxis axis)
Declare this axis cross another axis.- Parameters:
axis- that this axis should cross
-
isVisible
public boolean isVisible()
- Returns:
- visibility of the axis.
-
setVisible
public void setVisible(boolean value)
- Parameters:
value- visibility of the axis.
-
getMajorTickMark
public AxisTickMark getMajorTickMark()
- Returns:
- major tick mark.
-
setMajorTickMark
public void setMajorTickMark(AxisTickMark tickMark)
- Parameters:
tickMark- major tick mark type.
-
getMinorTickMark
public AxisTickMark getMinorTickMark()
- Returns:
- minor tick mark.
-
setMinorTickMark
public void setMinorTickMark(AxisTickMark tickMark)
- Parameters:
tickMark- minor tick mark type.
-
getTickLabelPosition
public AxisTickLabelPosition getTickLabelPosition()
- Returns:
- tick label position.
- Since:
- POI 4.0.2
-
setTickLabelPosition
public void setTickLabelPosition(AxisTickLabelPosition labelPosition)
- Parameters:
labelPosition- tick label position.- Since:
- POI 4.0.2
-
getOrAddTextProperties
protected org.openxmlformats.schemas.drawingml.x2006.main.CTTextCharacterProperties getOrAddTextProperties(org.openxmlformats.schemas.drawingml.x2006.main.CTTextBody body)
-
getOrAddLinesProperties
protected org.openxmlformats.schemas.drawingml.x2006.main.CTShapeProperties getOrAddLinesProperties(org.openxmlformats.schemas.drawingml.x2006.chart.CTChartLines gridlines)
-
getNextAxId
protected long getNextAxId(org.openxmlformats.schemas.drawingml.x2006.chart.CTPlotArea plotArea)
-
-