public static void paintText(Graphics g,AbstractButton b,Rectangle textRect,String text,int textShiftOffset){
  FontMetrics fm=SwingUtilities2.getFontMetrics(b,g);
  int mnemIndex=b.getDisplayedMnemonicIndex();
  if (WindowsLookAndFeel.isMnemonicHidden() == true) {
    mnemIndex=-1;
  }
  XPStyle xp=XPStyle.getXP();
  if (xp != null && !(b instanceof JMenuItem)) {
    paintXPText(b,g,textRect.x + textShiftOffset,textRect.y + fm.getAscent() + textShiftOffset,text,mnemIndex);
  }
 else {
    paintClassicText(b,g,textRect.x + textShiftOffset,textRect.y + fm.getAscent() + textShiftOffset,text,mnemIndex);
  }
}

public static void paintText ( Graphics g , AbstractButton b , Rectangle textRect , String text , int textShiftOffset ) { FontMetrics fm = SwingUtilities2 . getFontMetrics ( b , g ) ; int mnemIndex = b . getDisplayedMnemonicIndex ( ) ; if ( WindowsLookAndFeel . isMnemonicHidden ( ) == true ) { mnemIndex = - 1 ; } XPStyle xp = XPStyle . getXP ( ) ; if ( xp != null && ! ( b instanceof JMenuItem ) ) { paintXPText ( b , g , textRect . x + textShiftOffset , textRect . y + fm . getAscent ( ) + textShiftOffset , text , mnemIndex ) ; } else { paintClassicText ( b , g , textRect . x + textShiftOffset , textRect . y + fm . getAscent ( ) + textShiftOffset , text , mnemIndex ) ; } }
renders a text string in windows without the mnemonic . this is here because the windowsui hierarchy doesn ' t match the component hierarchy . all the overriden painttext methods of the buttonui delegates will call this static method . < p >
