@Override protected void drawAxisLine(Graphics2D g2,double cursor,Rectangle2D dataArea,RectangleEdge edge){
  Line2D axisLine=null;
  double c=cursor;
  if (edge == RectangleEdge.TOP) {
    axisLine=new Line2D.Double(dataArea.getX(),c,dataArea.getMaxX(),c);
  }
 else   if (edge == RectangleEdge.BOTTOM) {
    axisLine=new Line2D.Double(dataArea.getX(),c,dataArea.getMaxX(),c);
  }
 else   if (edge == RectangleEdge.LEFT) {
    axisLine=new Line2D.Double(c,dataArea.getY(),c,dataArea.getMaxY());
  }
 else   if (edge == RectangleEdge.RIGHT) {
    axisLine=new Line2D.Double(c,dataArea.getY(),c,dataArea.getMaxY());
  }
  g2.setPaint(getAxisLinePaint());
  g2.setStroke(getAxisLineStroke());
  Object saved=g2.getRenderingHint(RenderingHints.KEY_STROKE_CONTROL);
  g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL,RenderingHints.VALUE_STROKE_NORMALIZE);
  g2.draw(axisLine);
  g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL,saved);
  boolean drawUpOrRight=false;
  boolean drawDownOrLeft=false;
  if (this.positiveArrowVisible) {
    if (this.inverted) {
      drawDownOrLeft=true;
    }
 else {
      drawUpOrRight=true;
    }
  }
  if (this.negativeArrowVisible) {
    if (this.inverted) {
      drawUpOrRight=true;
    }
 else {
      drawDownOrLeft=true;
    }
  }
  if (drawUpOrRight) {
    double x=0.0;
    double y=0.0;
    Shape arrow=null;
    if (edge == RectangleEdge.TOP || edge == RectangleEdge.BOTTOM) {
      x=dataArea.getMaxX();
      y=cursor;
      arrow=this.rightArrow;
    }
 else     if (edge == RectangleEdge.LEFT || edge == RectangleEdge.RIGHT) {
      x=cursor;
      y=dataArea.getMinY();
      arrow=this.upArrow;
    }
    AffineTransform transformer=new AffineTransform();
    transformer.setToTranslation(x,y);
    Shape shape=transformer.createTransformedShape(arrow);
    g2.fill(shape);
    g2.draw(shape);
  }
  if (drawDownOrLeft) {
    double x=0.0;
    double y=0.0;
    Shape arrow=null;
    if (edge == RectangleEdge.TOP || edge == RectangleEdge.BOTTOM) {
      x=dataArea.getMinX();
      y=cursor;
      arrow=this.leftArrow;
    }
 else     if (edge == RectangleEdge.LEFT || edge == RectangleEdge.RIGHT) {
      x=cursor;
      y=dataArea.getMaxY();
      arrow=this.downArrow;
    }
    AffineTransform transformer=new AffineTransform();
    transformer.setToTranslation(x,y);
    Shape shape=transformer.createTransformedShape(arrow);
    g2.fill(shape);
    g2.draw(shape);
  }
}

@ Override protected void drawAxisLine ( Graphics2D g2 , double cursor , Rectangle2D dataArea , RectangleEdge edge ) { Line2D axisLine = null ; double c = cursor ; if ( edge == RectangleEdge . TOP ) { axisLine = new Line2D . Double ( dataArea . getX ( ) , c , dataArea . getMaxX ( ) , c ) ; } else if ( edge == RectangleEdge . BOTTOM ) { axisLine = new Line2D . Double ( dataArea . getX ( ) , c , dataArea . getMaxX ( ) , c ) ; } else if ( edge == RectangleEdge . LEFT ) { axisLine = new Line2D . Double ( c , dataArea . getY ( ) , c , dataArea . getMaxY ( ) ) ; } else if ( edge == RectangleEdge . RIGHT ) { axisLine = new Line2D . Double ( c , dataArea . getY ( ) , c , dataArea . getMaxY ( ) ) ; } g2 . setPaint ( getAxisLinePaint ( ) ) ; g2 . setStroke ( getAxisLineStroke ( ) ) ; Object saved = g2 . getRenderingHint ( RenderingHints . KEY_STROKE_CONTROL ) ; g2 . setRenderingHint ( RenderingHints . KEY_STROKE_CONTROL , RenderingHints . VALUE_STROKE_NORMALIZE ) ; g2 . draw ( axisLine ) ; g2 . setRenderingHint ( RenderingHints . KEY_STROKE_CONTROL , saved ) ; boolean drawUpOrRight = false ; boolean drawDownOrLeft = false ; if ( this . positiveArrowVisible ) { if ( this . inverted ) { drawDownOrLeft = true ; } else { drawUpOrRight = true ; } } if ( this . negativeArrowVisible ) { if ( this . inverted ) { drawUpOrRight = true ; } else { drawDownOrLeft = true ; } } if ( drawUpOrRight ) { double x = 0.0 ; double y = 0.0 ; Shape arrow = null ; if ( edge == RectangleEdge . TOP || edge == RectangleEdge . BOTTOM ) { x = dataArea . getMaxX ( ) ; y = cursor ; arrow = this . rightArrow ; } else if ( edge == RectangleEdge . LEFT || edge == RectangleEdge . RIGHT ) { x = cursor ; y = dataArea . getMinY ( ) ; arrow = this . upArrow ; } AffineTransform transformer = new AffineTransform ( ) ; transformer . setToTranslation ( x , y ) ; Shape shape = transformer . createTransformedShape ( arrow ) ; g2 . fill ( shape ) ; g2 . draw ( shape ) ; } if ( drawDownOrLeft ) { double x = 0.0 ; double y = 0.0 ; Shape arrow = null ; if ( edge == RectangleEdge . TOP || edge == RectangleEdge . BOTTOM ) { x = dataArea . getMinX ( ) ; y = cursor ; arrow = this . leftArrow ; } else if ( edge == RectangleEdge . LEFT || edge == RectangleEdge . RIGHT ) { x = cursor ; y = dataArea . getMaxY ( ) ; arrow = this . downArrow ; } AffineTransform transformer = new AffineTransform ( ) ; transformer . setToTranslation ( x , y ) ; Shape shape = transformer . createTransformedShape ( arrow ) ; g2 . fill ( shape ) ; g2 . draw ( shape ) ; } }
draws an axis line at the current cursor position and edge .
