private double trans(double value,Rectangle2D area,RectangleEdge edge){
  double min=0.0;
  double max=0.0;
  if (RectangleEdge.isTopOrBottom(edge)) {
    min=area.getX();
    max=area.getX() + area.getWidth();
  }
 else   if (RectangleEdge.isLeftOrRight(edge)) {
    min=area.getMaxY();
    max=area.getMaxY() - area.getHeight();
  }
  if (isInverted()) {
    return max - ((value - this.displayStart) / (this.displayEnd - this.displayStart)) * (max - min);
  }
 else {
    return min + ((value - this.displayStart) / (this.displayEnd - this.displayStart)) * (max - min);
  }
}

private double trans ( double value , Rectangle2D area , RectangleEdge edge ) { double min = 0.0 ; double max = 0.0 ; if ( RectangleEdge . isTopOrBottom ( edge ) ) { min = area . getX ( ) ; max = area . getX ( ) + area . getWidth ( ) ; } else if ( RectangleEdge . isLeftOrRight ( edge ) ) { min = area . getMaxY ( ) ; max = area . getMaxY ( ) - area . getHeight ( ) ; } if ( isInverted ( ) ) { return max - ( ( value - this . displayStart ) / ( this . displayEnd - this . displayStart ) ) * ( max - min ) ; } else { return min + ( ( value - this . displayStart ) / ( this . displayEnd - this . displayStart ) ) * ( max - min ) ; } }
a regular translation from a data value to a java2d value .
