Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 21512 invoked from network); 19 Sep 2007 11:28:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Sep 2007 11:28:04 -0000 Received: (qmail 27330 invoked by uid 500); 19 Sep 2007 11:27:56 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 27308 invoked by uid 500); 19 Sep 2007 11:27:56 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 27299 invoked by uid 99); 19 Sep 2007 11:27:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Sep 2007 04:27:56 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Sep 2007 11:28:03 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 98E6A71418F for ; Wed, 19 Sep 2007 04:27:43 -0700 (PDT) Message-ID: <32470471.1190201263593.JavaMail.jira@brutus> Date: Wed, 19 Sep 2007 04:27:43 -0700 (PDT) From: "Alexey Petrenko (JIRA)" To: commits@harmony.apache.org Subject: [jira] Resolved: (HARMONY-4799) [classlib][awt] GetRenderingHint returns Null by default In-Reply-To: <22969873.1189958492061.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-4799?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alexey Petrenko resolved HARMONY-4799. -------------------------------------- Resolution: Fixed The patch has been applied. Please verify. > [classlib][awt] GetRenderingHint returns Null by default > -------------------------------------------------------- > > Key: HARMONY-4799 > URL: https://issues.apache.org/jira/browse/HARMONY-4799 > Project: Harmony > Issue Type: Sub-task > Components: Classlib > Environment: Win32 + Linux32 > Reporter: Chunrong Lai > Assignee: Alexey Petrenko > Attachments: HARMONY-4799-CommonGraphics2D.patch, HARMONY-4799-Graphics2DTest.patch > > > Below is the simple reproducer. Such codes are common to do customized-redrawing of components. > import java.awt.*; > import java.awt.event.*; > import javax.swing.*; > public class TestMenu extends JFrame { > JMenuBar myMenu = new JMenuBar(); > CubeMenu mFile = new CubeMenu(); > JMenuItem miClose = new JMenuItem(); > public TestMenu() { > this.setJMenuBar(myMenu); > mFile.setText("File"); > myMenu.add(mFile); > miClose.setText("Close"); > mFile.add(miClose); > miClose.addActionListener(new ActionListener() { > public void actionPerformed(ActionEvent e) { > dispose(); > System.exit(0); > } > }); > this.setTitle("JAVA"); > this.setSize(new Dimension(400, 300)); > this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); > this.show(); > } > public static void main(String[] args) { > TestMenu testmenu = new TestMenu(); > } > } > class CubeMenu extends JMenu { > protected final void paintComponent(Graphics g) { > Graphics2D graphics = (Graphics2D) g; > Object oldHint = graphics.getRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING); > if (oldHint == null) System.out.println("Will have IllegalArgumentException in later setRenderingHint"); > graphics.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON); > super.paintComponent(graphics); > graphics.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, oldHint); > } > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.