Exemplo n.º 1
0
 protected void setupAntialiasing(Graphics graphics) {
   if (graphics instanceof Graphics2D) {
     Graphics2D myGfx = (Graphics2D) graphics;
     final Object mode =
         mySettingsProvider.useAntialiasing()
             ? RenderingHints.VALUE_TEXT_ANTIALIAS_ON
             : RenderingHints.VALUE_TEXT_ANTIALIAS_OFF;
     final RenderingHints hints = new RenderingHints(RenderingHints.KEY_TEXT_ANTIALIASING, mode);
     myGfx.setRenderingHints(hints);
   }
 }