Package jofc2.model

Examples of jofc2.model.Text


   * assigned, no matter whether it is the same as the previous, it will
   * always cause re-render.
   */
  public void setModel(ChartModel model) {
    this.model = model;
    Chart chart = renderChart();
    //    String json = "{ \"elements\": [ { \"type\": \"bar_filled\",\"alpha\":\"0.8\", \"colour\": \"#3399ff\", \"outline-colour\": \"#0066CC\", \"values\": [ 9, 8, 7, 6, 5, 4, 3, 2, 1 ] } ], \"title\": { \"text\": \"Wed May 20 2009\" }, \"bg_colour\": \"#ffffff\" }";
    String json = chart.toString();
    setChart(json);
    System.out.println(chart.toDebugString());
  }
View Full Code Here


  protected double maxValue;

  public OFCChartFactory(OFC ofc) {
    this.ofc = ofc;
    this.model = (CategoryModel) ofc.getModel();
    this.chart = new Chart();
    this.minValue = Double.POSITIVE_INFINITY;
    this.maxValue = Double.NEGATIVE_INFINITY;
  }
View Full Code Here

    super(ofc);
  }

  @Override
  public Chart createChart() {
    Chart chart = super.createChart();
    return chart;
  }
View Full Code Here

    super(ofc);
  }

  @Override
  public Chart createChart() {
    Chart chart = super.createChart();
    chart.setXAxis(createXAxis());
    chart.setYAxis(createYAxis());
    return chart;
  }
View Full Code Here

  public Chart createChart() {
    String title = ofc.getTitle();
    if (title == null || title.trim().equals("")) {
      title = " ";
    }
    Text text = new Text(title);
    chart.setTitle(text);
    chart.addElements(createElements(ofc, model));
    chart.setBackgroundColour(ofc.getBgcolor());
    return chart;
  }
View Full Code Here

  @SuppressWarnings("unchecked")
  private XAxis createXAxis() {
    XAxis xaxis = new XAxis();
    List<Label> labels = new ArrayList<Label>();
    for (Iterator it = model.getCategories().iterator(); it.hasNext();) {
      Label l = new Label((String) it.next());
      labels.add(l);
    }
    xaxis.addLabels(labels);
    return xaxis;
  }
View Full Code Here

  @SuppressWarnings("unchecked")
  private XAxis createXAxis() {
    XAxis xaxis = new XAxis();
    List<Label> labels = new ArrayList<Label>();
    for (Iterator it = model.getCategories().iterator(); it.hasNext();) {
      Label l = new Label((String) it.next());
      labels.add(l);
    }
    xaxis.addLabels(labels);
    return xaxis;
  }
View Full Code Here

   *
   * @return
   */
  @SuppressWarnings("unchecked")
  private XAxis createXAxis() {
    XAxis xaxis = new XAxis();
    List<Label> labels = new ArrayList<Label>();
    for (Iterator it = model.getCategories().iterator(); it.hasNext();) {
      Label l = new Label((String) it.next());
      labels.add(l);
    }
    xaxis.addLabels(labels);
    return xaxis;
  }
View Full Code Here

   *
   * @return
   */
  @SuppressWarnings("unchecked")
  private XAxis createXAxis() {
    XAxis xaxis = new XAxis();
    List<Label> labels = new ArrayList<Label>();
    for (Iterator it = model.getCategories().iterator(); it.hasNext();) {
      Label l = new Label((String) it.next());
      labels.add(l);
    }
    xaxis.addLabels(labels);
    return xaxis;
  }
View Full Code Here

   *
   * @return
   */
  @SuppressWarnings("unchecked")
  private YAxis createYAxis() {
    YAxis yaxis = new YAxis();
    yaxis.setMin(getYMinValue());
    yaxis.setMax(getYMaxValue());
    return yaxis;
  }
View Full Code Here

TOP

Related Classes of jofc2.model.Text

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.