private ArrayList<Integer> calcLabels(){
  float[] borderValues=calcBorderValues();
  float minValue=borderValues[0];
  float maxValue=borderValues[1];
  if (minLabelValue == 0 && maxLabelValue == 0) {
    if (maxValue < 0)     maxLabelValue=0;
 else     maxLabelValue=(int)Math.ceil(maxValue);
    if (minValue > 0)     minLabelValue=0;
 else     minLabelValue=(int)Math.floor(minValue);
    while ((maxLabelValue - minLabelValue) % step != 0)     maxLabelValue+=1;
  }
  ArrayList<Integer> result=new ArrayList<Integer>();
  int pos=minLabelValue;
  while (pos <= maxLabelValue) {
    result.add(pos);
    pos+=step;
  }
  if (result.get(result.size() - 1) < maxLabelValue)   result.add(maxLabelValue);
  return result;
}

private ArrayList < Integer > calcLabels ( ) { float [ ] borderValues = calcBorderValues ( ) ; float minValue = borderValues [ 0 ] ; float maxValue = borderValues [ 1 ] ; if ( minLabelValue == 0 && maxLabelValue == 0 ) { if ( maxValue < 0 ) maxLabelValue = 0 ; else maxLabelValue = ( int ) Math . ceil ( maxValue ) ; if ( minValue > 0 ) minLabelValue = 0 ; else minLabelValue = ( int ) Math . floor ( minValue ) ; while ( ( maxLabelValue - minLabelValue ) % step != 0 ) maxLabelValue += 1 ; } ArrayList < Integer > result = new ArrayList < Integer > ( ) ; int pos = minLabelValue ; while ( pos <= maxLabelValue ) { result . add ( pos ) ; pos += step ; } if ( result . get ( result . size ( ) - 1 ) < maxLabelValue ) result . add ( maxLabelValue ) ; return result ; }
get labels based on the maximum value displayed
