Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 39791 invoked from network); 10 Oct 2006 09:08:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Oct 2006 09:08:01 -0000 Received: (qmail 16189 invoked by uid 500); 10 Oct 2006 09:08:00 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 16156 invoked by uid 500); 10 Oct 2006 09:08:00 -0000 Mailing-List: contact harmony-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-commits@incubator.apache.org Received: (qmail 16145 invoked by uid 99); 10 Oct 2006 09:08:00 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Oct 2006 02:08:00 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Oct 2006 02:07:59 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 57C027142D6 for ; Tue, 10 Oct 2006 02:07:21 -0700 (PDT) Message-ID: <14499319.1160471241356.JavaMail.root@brutus> Date: Tue, 10 Oct 2006 02:07:21 -0700 (PDT) From: "Dmitry A. Durnev (JIRA)" To: harmony-commits@incubator.apache.org Subject: [jira] Updated: (HARMONY-1801) [classlib][swing] JComponent.setBounds() should not cause revalidation In-Reply-To: <16927174.1160469439767.JavaMail.root@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 X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/HARMONY-1801?page=all ] Dmitry A. Durnev updated HARMONY-1801: -------------------------------------- Attachment: H1801-fix.patch Spec of javax.swing.JInternalFrame.reshape() method states: Unlike other components, this implementation also forces re-layout, so that frame decorations such as the title bar are always redisplayed. So the attached fix makes JComponent not override setBounds() at all, but adds validate() call to JInternalFrame.setBounds() to "force re-layout". > [classlib][swing] JComponent.setBounds() should not cause revalidation > ---------------------------------------------------------------------- > > Key: HARMONY-1801 > URL: http://issues.apache.org/jira/browse/HARMONY-1801 > Project: Harmony > Issue Type: Bug > Components: Classlib > Reporter: Dmitry A. Durnev > Priority: Minor > Attachments: H1801-fix.patch, H1801-tests.patch > > > Validation process should not be initiated by component reshaping to avoid too > many re-validations while doing layout (layout usually causes reshape). > Therefore JComponent.setBounds() should not call revalidate. > Compile & run the following test: > import java.awt.EventQueue; > import java.lang.reflect.InvocationTargetException; > import javax.swing.JButton; > import javax.swing.JFrame; > public class SetBoundsTest { > > public static void main(String[] args) throws InterruptedException, InvocationTargetException { > final JFrame jf = new JFrame("test"); > final JButton jb = new JButton("1"); > jf.getContentPane().add(jb); > jf.setSize(200, 200); > EventQueue.invokeAndWait(new Runnable(){ > public void run() { > jf.show(); > } > > }); > EventQueue.invokeAndWait(new Runnable(){ > public void run() { > jb.setSize(150, 500); > } > > }); > > EventQueue.invokeAndWait(new Runnable(){ > public void run() { > System.out.println(jb.getSize()); > jf.dispose(); > } > > }); > > } > } > On RI button size set by user(150, 500) is printed. On Harmony some other size (set by layout) is printed. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira