Package tvbrowser.extras.programinfo

Source Code of tvbrowser.extras.programinfo.ProgramEditorPane

/*
* TV-Browser
* Copyright (C) 04-2003 Martin Oberhauser (darras@users.sourceforge.net)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
*
* CVS information:
*  $RCSfile$
*   $Source$
*     $Date: 2011-03-26 21:21:11 +0100 (Sat, 26 Mar 2011) $
*   $Author: bananeweizen $
* $Revision: 6974 $
*/

package tvbrowser.extras.programinfo;

import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;

import javax.swing.JEditorPane;

/**
* A JEditorPane with support for antialiasing.
*
* @author René Mach
*
*/
public class ProgramEditorPane extends JEditorPane{
 
  private static final long serialVersionUID = 1L;

  /**
   * Constructor.
   */
  public ProgramEditorPane() {
    super();
  }
 
  protected void paintComponent(Graphics g) {
    Graphics2D g2d = (Graphics2D)g;
   
    if (ProgramInfo.getInstance().getSettings().getAntialiasing()) {
      g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
        RenderingHints.VALUE_ANTIALIAS_ON);
   
    g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
        RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
    }
  
    super.paintComponent(g2d);
  }

}
TOP

Related Classes of tvbrowser.extras.programinfo.ProgramEditorPane

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.