harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmitry A. Durnev (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-1801) [classlib][swing] JComponent.setBounds() should not cause revalidation
Date Fri, 27 Oct 2006 11:50:18 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-1801?page=all ]

Dmitry A. Durnev updated HARMONY-1801:
--------------------------------------

    Patch Info: [Patch Available]

> [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-BasicTabbedPaneUI.patch, 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

        

Mime
View raw message