Package org.openxmlformats.schemas.drawingml.x2006.main

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTTextCharacterProperties


  public boolean isSetMinimum() {
    return getCTScaling().isSetMin();
  }

  public void setMinimum(double min) {
    CTScaling scaling = getCTScaling();
    if (scaling.isSetMin()) {
      scaling.getMin().setVal(min);
    } else {
      scaling.addNewMin().setVal(min);
    }
  }
View Full Code Here


      scaling.addNewMin().setVal(min);
    }
  }

  public double getMinimum() {
    CTScaling scaling = getCTScaling();
    if (scaling.isSetMin()) {
      return scaling.getMin().getVal();
    } else {
      return 0.0;
    }
  }
View Full Code Here

  public boolean isSetMaximum() {
    return getCTScaling().isSetMax();
  }

  public void setMaximum(double max) {
    CTScaling scaling = getCTScaling();
    if (scaling.isSetMax()) {
      scaling.getMax().setVal(max);
    } else {
      scaling.addNewMax().setVal(max);
    }
  }
View Full Code Here

      scaling.addNewMax().setVal(max);
    }
  }

  public double getMaximum() {
    CTScaling scaling = getCTScaling();
    if (scaling.isSetMax()) {
      return scaling.getMax().getVal();
    } else {
      return 0.0;
    }
  }
View Full Code Here

  public AxisOrientation getOrientation() {
    return toAxisOrientation(getCTScaling().getOrientation());
  }

  public void setOrientation(AxisOrientation orientation) {
    CTScaling scaling = getCTScaling();
    STOrientation.Enum stOrientation = fromAxisOrientation(orientation);
    if (scaling.isSetOrientation()) {
      scaling.getOrientation().setVal(stOrientation);
    } else {
      getCTScaling().addNewOrientation().setVal(stOrientation);
    }
  }
View Full Code Here

      throw new IllegalArgumentException("Chart must be instance of XSSFChart");
    }

    XSSFChart xssfChart = (XSSFChart) chart;
    CTPlotArea plotArea = xssfChart.getCTChart().getPlotArea();
    CTScatterChart scatterChart = plotArea.addNewScatterChart();
    addStyle(scatterChart);

    for (Serie s : series) {
      s.addToChart(scatterChart);
    }

    for (ChartAxis ax : axis) {
      scatterChart.addNewAxId().setVal(ax.getId());
    }
  }
View Full Code Here

    public void setUseCache(boolean useCache) {
      this.useCache = useCache;
    }

    protected void addToChart(CTScatterChart ctScatterChart) {
      CTScatterSer scatterSer = ctScatterChart.addNewSer();
      scatterSer.addNewIdx().setVal(this.id);
      scatterSer.addNewOrder().setVal(this.order);

      CTAxDataSource xVal = scatterSer.addNewXVal();
      CTNumRef numRef = xVal.addNewNumRef();
      numRef.setF(xAddress.formatAsString(xSheet.getSheetName(), true));

      CTNumDataSource yVal = scatterSer.addNewYVal();
      numRef = yVal.addNewNumRef();
      numRef.setF(yAddress.formatAsString(ySheet.getSheetName(), true));
    }
View Full Code Here

  public List<? extends Serie> getSeries() {
    return series;
  }

  private void addStyle(CTScatterChart ctScatterChart) {
    CTScatterStyle scatterStyle = ctScatterChart.addNewScatterStyle();
    scatterStyle.setVal(STScatterStyle.LINE_MARKER);
  }
View Full Code Here

    if(! chart.isSetTitle()) {
      return null;
    }

    // TODO Do properly
    CTTitle title = chart.getTitle();

    StringBuffer text = new StringBuffer();
    XmlObject[] t = title
      .selectPath("declare namespace a='"+XSSFDrawing.NAMESPACE_A+"' .//a:t");
    for (int m = 0; m < t.length; m++) {
      NodeList kids = t[m].getDomNode().getChildNodes();
      for (int n = 0; n < kids.getLength(); n++) {
        if (kids.item(n) instanceof Text) {
View Full Code Here

        this.theme = theme;
    }

    public XSSFColor getThemeColor(int idx) {
        CTColorScheme colorScheme = theme.getTheme().getThemeElements().getClrScheme();
        CTColor ctColor = null;
        int cnt = 0;
        for (XmlObject obj : colorScheme.selectPath("./*")) {
            if (obj instanceof org.openxmlformats.schemas.drawingml.x2006.main.CTColor) {
                if (cnt == idx) {
                    ctColor = (org.openxmlformats.schemas.drawingml.x2006.main.CTColor) obj;
                   
                    byte[] rgb = null;
                    if (ctColor.getSrgbClr() != null) {
                       // Colour is a regular one
                       rgb = ctColor.getSrgbClr().getVal();
                    } else if (ctColor.getSysClr() != null) {
                       // Colour is a tint of white or black
                       rgb = ctColor.getSysClr().getLastClr();
                    }

                    return new XSSFColor(rgb);
                }
                cnt++;
View Full Code Here

TOP

Related Classes of org.openxmlformats.schemas.drawingml.x2006.main.CTTextCharacterProperties

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.