protected final void drawArrowHead(Graphics2D g,int x,int y,int sgn){
  g.setStroke(Strokes.getStroke(StrokeType.SOLID,1));
  int size=diagram().arrowSize;
switch (headType) {
case CLOSED:
    Polygon p=new Polygon(new int[]{x,x + sgn * size,x + sgn * size,x},new int[]{y,y - size,y + size,y},4);
  g.fillPolygon(p);
break;
case OPEN:
g.drawLine(x,y,x + sgn * size,y - size);
g.drawLine(x,y,x + sgn * size,y + size);
break;
case ROUNDED:
int left=sgn == -1 ? x - 2 * size : x;
int top=y - size;
g.fillArc(left,top,size * 2,size * 2,90,sgn * 180);
}
}

protected final void drawArrowHead ( Graphics2D g , int x , int y , int sgn ) { g . setStroke ( Strokes . getStroke ( StrokeType . SOLID , 1 ) ) ; int size = diagram ( ) . arrowSize ; switch ( headType ) { case CLOSED : Polygon p = new Polygon ( new int [ ] { x , x + sgn * size , x + sgn * size , x } , new int [ ] { y , y - size , y + size , y } , 4 ) ; g . fillPolygon ( p ) ; break ; case OPEN : g . drawLine ( x , y , x + sgn * size , y - size ) ; g . drawLine ( x , y , x + sgn * size , y + size ) ; break ; case ROUNDED : int left = sgn == - 1 ? x - 2 * size : x ; int top = y - size ; g . fillArc ( left , top , size * 2 , size * 2 , 90 , sgn * 180 ) ; } }
draws the head of a message arrow onto the diagram display .
