protected void positionText(int w,int h){
  int xoff, yoff, justify;
  if (xgrav.equals("+")) {
    xoff=xpos;
    justify=OMText.JUSTIFY_LEFT;
  }
 else {
    xoff=w - xpos;
    justify=OMText.JUSTIFY_RIGHT;
  }
  if (ygrav.equals("+")) {
    yoff=ypos;
  }
 else {
    yoff=h - ypos;
  }
  text.setX(xoff);
  text.setY(yoff);
  text.setJustify(justify);
}

protected void positionText ( int w , int h ) { int xoff , yoff , justify ; if ( xgrav . equals ( "+" ) ) { xoff = xpos ; justify = OMText . JUSTIFY_LEFT ; } else { xoff = w - xpos ; justify = OMText . JUSTIFY_RIGHT ; } if ( ygrav . equals ( "+" ) ) { yoff = ypos ; } else { yoff = h - ypos ; } text . setX ( xoff ) ; text . setY ( yoff ) ; text . setJustify ( justify ) ; }
position the text graphic
