Esempio n. 1
0
 /**
  * Performs enabled text painting.
  *
  * @param label label to process
  * @param g2d graphics context
  * @param text label text
  * @param textX text X coordinate
  * @param textY text Y coordinate
  */
 protected void paintEnabledText(
     final E label, final Graphics2D g2d, final String text, final int textX, final int textY) {
   if (drawShade) {
     g2d.setColor(label.getForeground());
     paintShadowText(g2d, text, textX, textY);
   } else {
     final int mnemIndex = label.getDisplayedMnemonicIndex();
     g2d.setColor(label.getForeground());
     SwingUtils.drawStringUnderlineCharAt(g2d, text, mnemIndex, textX, textY);
   }
 }