Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 59723 invoked from network); 25 Mar 2008 17:55:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Mar 2008 17:55:31 -0000 Received: (qmail 51808 invoked by uid 500); 25 Mar 2008 17:55:29 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 51790 invoked by uid 500); 25 Mar 2008 17:55:29 -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 51781 invoked by uid 99); 25 Mar 2008 17:55:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Mar 2008 10:55:29 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Mar 2008 17:54:58 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 9E1D8234C0B1 for ; Tue, 25 Mar 2008 10:53:24 -0700 (PDT) Message-ID: <642562713.1206467604646.JavaMail.jira@brutus> Date: Tue, 25 Mar 2008 10:53:24 -0700 (PDT) From: "Alexei Zakharov (JIRA)" To: commits@harmony.apache.org Subject: [jira] Resolved: (HARMONY-5527) [classlib][awt] Canvas paint method works incorrectly In-Reply-To: <542673323.1203407203376.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-5527?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alexei Zakharov resolved HARMONY-5527. -------------------------------------- Resolution: Fixed Igor, the patch was applied at the revision 640914. Please verify. > [classlib][awt] Canvas paint method works incorrectly > ----------------------------------------------------- > > Key: HARMONY-5527 > URL: https://issues.apache.org/jira/browse/HARMONY-5527 > Project: Harmony > Issue Type: Bug > Components: Classlib > Reporter: Igor V. Stolyarov > Assignee: Alexei Zakharov > Attachments: H-5527.patch, Harmony.JPG, RI.JPG > > > Canvas paint method works incorrectly. According to Specification "... default operation is simply to clear the canvas", in Harmony implementation method paint does nothing. > Simple reproducer: > import java.awt.*; > import java.awt.event.*; > public class CanvasTest extends Frame implements ActionListener{ > boolean clicked = false; > Canvas c; > Button b; > public CanvasTest(){ > setLayout(new BorderLayout()); > Panel p1 = new Panel(); > p1.setPreferredSize(new Dimension(200, 200)); > c = new TestCanvas(); > p1.add(c); > Panel p2 = new Panel(); > p2.setLayout(new BorderLayout()); > p2.setPreferredSize(new Dimension(200, 50)); > b = new Button("Click me"); > b.setPreferredSize(new Dimension(70,30)); > b.addActionListener(this); > p2.add(b, BorderLayout.CENTER); > add(c, BorderLayout.CENTER); > add(b, BorderLayout.SOUTH); > addWindowListener(new WindowAdapter(){ > public void windowClosing(WindowEvent e){ > System.exit(0); > } > }); > } > public void actionPerformed(ActionEvent e){ > if(e.getSource() == b){ > clicked = true; > c.repaint(); > } > } > class TestCanvas extends Canvas{ > public void paint(Graphics g){ > g.setFont(g.getFont().deriveFont(Font.BOLD)); > if(!clicked){ > g.drawString("Test started!", 50, 20); > } else { > super.paint(g); > g.drawString("Button clicked!", 50, 50); > } > } > public void update(Graphics g){ > paint(g); > } > } > public static void main(String[] argv){ > CanvasTest test = new CanvasTest(); > test.setSize(200, 250); > test.setVisible(true); > } > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.