Android Open Source - HzGrapher Bubble Graph V O






From Project

Back to project page HzGrapher.

License

The source code is released under:

Apache License

If you think the Android project HzGrapher listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.handstudio.android.hzgrapherlib.vo.bubblegraph;
// w  w w  .j a va  2 s.  c  o  m
import java.util.ArrayList;
import java.util.List;

import com.handstudio.android.hzgrapherlib.vo.Graph;
import com.handstudio.android.hzgrapherlib.vo.GraphNameBox;
import com.handstudio.android.hzgrapherlib.vo.linegraph.LineGraph;

public class BubbleGraphVO extends Graph
{
  private String[]         legendArr = null;
  private List<BubbleGraph>     arrGraph = null;
  
  private int           totalItemCount = 0;
  private float           maxValue = 0.0f;
  private float           minValue = Float.MAX_VALUE;
  private float           maxSizeValue = 0.0f;
  private int           increment;
  
  private int           graphBG = -1;
  private long           animationDuration = 2000;
  
  private boolean         isLineShow = true;
  private boolean          isAnimaionShow = true;
  
  public BubbleGraphVO ( String[] legendArr )
  {
    this.arrGraph = new ArrayList<BubbleGraph> ();
    this.legendArr = legendArr;
    initVO ();
  }
  
  public void add ( BubbleGraph bg )
  {
    this.arrGraph.add(bg);  
    int i;
    for ( i = 0 ; i < bg.getCoordinateArr().length ; i++ )
    {
      float v = bg.getCoordinateArr()[i];
      float s = bg.getSizeArr()[i];
      
      if ( v < this.minValue ) { this.minValue = v; }
      if ( v > this.maxValue ) { this.maxValue = v; }
      
      if ( s > this.maxSizeValue ) { this.maxSizeValue = s; }
    }
    this.totalItemCount += bg.getCoordinateArr().length;
  }
  
  public BubbleGraph get ( int i ) { return this.arrGraph.get(i); }
  public int size () { return this.arrGraph.size(); }
  
  private void initVO ()
  {
    initDefaultGraphNameBox ();
  }
  
  private void initDefaultGraphNameBox () 
  {
    GraphNameBox gnb = new GraphNameBox ();
    this.setGraphNameBox(gnb);
  }
  
  public long getAnimationDuration () { return this.animationDuration; }
  public void setAnimationDuration ( long tick ) { this.animationDuration = tick; }
  
  public boolean isLineShow () { return this.isLineShow; }
  public void setIsLineShow ( boolean isLineShow ) { this.isLineShow = isLineShow; }
  
  public boolean isAnimationShow () { return this.isAnimaionShow; }
  public void setIsAnimaionShow ( boolean isShow ) { this.isAnimaionShow = isShow; }
  
  public int getTotalCountOfItem () { return this.totalItemCount; }
  public float getMaxCoordinate () { return this.maxValue; }
  public float getMinCoordinate () { return this.minValue; }
  public float getMaxSize () { return this.maxSizeValue; }
  
  public String[] getLegendArr () { return this.legendArr; }
  public void setLegendArr ( String[] legendArr ) { this.legendArr = legendArr; }
  
  public int getIncrement () { return this.increment; }
  public void setIncrement ( int increment ) { this.increment = increment; }
  
  public int getGraphBG () { return this.graphBG; }
  public void setGraphBG ( int graphBG ) { this.graphBG = graphBG; }
  
  public List<BubbleGraph> getArrGraph() {
    return arrGraph;
  }

  public void setArrGraph(List<BubbleGraph> arrGraph) {
    this.arrGraph = arrGraph;
  }
}




Java Source Code List

com.handstudio.android.hzgrapher.BarGraphActivity.java
com.handstudio.android.hzgrapher.BubbleGraphActivity.java
com.handstudio.android.hzgrapher.BubbleGraphActivity.java
com.handstudio.android.hzgrapher.CircleGraphActivity.java
com.handstudio.android.hzgrapher.CircleGraphActivity.java
com.handstudio.android.hzgrapher.CurveCompareGraphActivity.java
com.handstudio.android.hzgrapher.CurveCompareGraphActivity.java
com.handstudio.android.hzgrapher.CurveGraphActivity.java
com.handstudio.android.hzgrapher.CurveGraphActivity.java
com.handstudio.android.hzgrapher.CurveGraphWithRegionActivity.java
com.handstudio.android.hzgrapher.CurveGraphWithRegionActivity.java
com.handstudio.android.hzgrapher.LineCompareGraphActivity.java
com.handstudio.android.hzgrapher.LineCompareGraphActivity.java
com.handstudio.android.hzgrapher.LineGraphActivity.java
com.handstudio.android.hzgrapher.LineGraphActivity.java
com.handstudio.android.hzgrapher.LineGraphWithRegionActivity.java
com.handstudio.android.hzgrapher.LineGraphWithRegionActivity.java
com.handstudio.android.hzgrapher.MainActivity.java
com.handstudio.android.hzgrapher.MainActivity.java
com.handstudio.android.hzgrapher.PieGraphActivity.java
com.handstudio.android.hzgrapher.PieGraphActivity.java
com.handstudio.android.hzgrapher.RadarGraphActivity.java
com.handstudio.android.hzgrapher.RadarGraphActivity.java
com.handstudio.android.hzgrapher.ScatterGraphActivity.java
com.handstudio.android.hzgrapher.ScatterGraphActivity.java
com.handstudio.android.hzgrapherlib.animation.GraphAnimation.java
com.handstudio.android.hzgrapherlib.canvas.GraphCanvasWrapper.java
com.handstudio.android.hzgrapherlib.error.ErrorCode.java
com.handstudio.android.hzgrapherlib.error.ErrorDetector.java
com.handstudio.android.hzgrapherlib.graphview.BarGraphView.java
com.handstudio.android.hzgrapherlib.graphview.BubbleGraphView.java
com.handstudio.android.hzgrapherlib.graphview.CircleGraphView.java
com.handstudio.android.hzgrapherlib.graphview.CurveCompareGraphView.java
com.handstudio.android.hzgrapherlib.graphview.CurveGraphView.java
com.handstudio.android.hzgrapherlib.graphview.LineCompareGraphView.java
com.handstudio.android.hzgrapherlib.graphview.LineGraphView.java
com.handstudio.android.hzgrapherlib.graphview.RadarGraphView.java
com.handstudio.android.hzgrapherlib.graphview.ScatterGraphView.java
com.handstudio.android.hzgrapherlib.path.GraphPath.java
com.handstudio.android.hzgrapherlib.util.Converter.java
com.handstudio.android.hzgrapherlib.util.EuclidLine.java
com.handstudio.android.hzgrapherlib.util.EuclidPoint.java
com.handstudio.android.hzgrapherlib.util.IntersectFinder.java
com.handstudio.android.hzgrapherlib.util.MatrixTranslator.java
com.handstudio.android.hzgrapherlib.util.Spline.java
com.handstudio.android.hzgrapherlib.vo.GraphNameBox.java
com.handstudio.android.hzgrapherlib.vo.Graph.java
com.handstudio.android.hzgrapherlib.vo.bargraph.BarGraphVO.java
com.handstudio.android.hzgrapherlib.vo.bargraph.BarGraph.java
com.handstudio.android.hzgrapherlib.vo.bubblegraph.BubbleGraphVO.java
com.handstudio.android.hzgrapherlib.vo.bubblegraph.BubbleGraph.java
com.handstudio.android.hzgrapherlib.vo.circlegraph.CircleGraphVO.java
com.handstudio.android.hzgrapherlib.vo.circlegraph.CircleGraph.java
com.handstudio.android.hzgrapherlib.vo.curvegraph.CurveGraphVO.java
com.handstudio.android.hzgrapherlib.vo.curvegraph.CurveGraph.java
com.handstudio.android.hzgrapherlib.vo.linegraph.LineGraphVO.java
com.handstudio.android.hzgrapherlib.vo.linegraph.LineGraph.java
com.handstudio.android.hzgrapherlib.vo.radargraph.RadarGraphVO.java
com.handstudio.android.hzgrapherlib.vo.radargraph.RadarGraph.java
com.handstudio.android.hzgraphlib.vo.scattergraph.ScatterGraphVO.java
com.handstudio.android.hzgraphlib.vo.scattergraph.ScatterGraph.java