You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexander Simbirtsev (JIRA)" <ji...@apache.org> on 2006/12/13 13:07:21 UTC

[jira] Created: (HARMONY-2665) [classlib][swing] javax.swing.JSplitPane initializes divider position before being shown (unlike RI)

[classlib][swing] javax.swing.JSplitPane initializes divider position before being shown (unlike RI)
----------------------------------------------------------------------------------------------------

                 Key: HARMONY-2665
                 URL: http://issues.apache.org/jira/browse/HARMONY-2665
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Alexander Simbirtsev


javax.swing.JSplitPane.getDividerLocation() returns 92 while RI returns -1.
javax.swing.JSplitPane.getLastDividerLocation() returns 91 while RI returns 0.
Compatibility issue.

Use the following code to reproduce:

import javax.swing.JSplitPane;

import junit.framework.TestCase;

public class Test extends TestCase {       
    public void testcase1() {
        JSplitPane s = new JSplitPane();
        assertEquals(-1, s.getDividerLocation());
    }
    
    public void testcase2() {
        JSplitPane s = new JSplitPane();
        assertEquals(0, s.getLastDividerLocation());
    }                                
}

-- 
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

        

[jira] Commented: (HARMONY-2665) [classlib][swing] javax.swing.JSplitPane initializes divider position before being shown (unlike RI)

Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465020 ] 

Vasily Zakharov commented on HARMONY-2665:
------------------------------------------

I couldn't find a reasonable way to resolve this issue.

I'm giving this up hoping someone confident in Swing would look into it.


> [classlib][swing] javax.swing.JSplitPane initializes divider position before being shown (unlike RI)
> ----------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2665
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2665
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Alexander Simbirtsev
>
> javax.swing.JSplitPane.getDividerLocation() returns 92 while RI returns -1.
> javax.swing.JSplitPane.getLastDividerLocation() returns 91 while RI returns 0.
> Compatibility issue.
> Use the following code to reproduce:
> import javax.swing.JSplitPane;
> import junit.framework.TestCase;
> public class Test extends TestCase {       
>     public void testcase1() {
>         JSplitPane s = new JSplitPane();
>         assertEquals(-1, s.getDividerLocation());
>     }
>     
>     public void testcase2() {
>         JSplitPane s = new JSplitPane();
>         assertEquals(0, s.getLastDividerLocation());
>     }                                
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-2665) [classlib][swing] javax.swing.JSplitPane initializes divider position before being shown (unlike RI)

Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12463592 ] 

Vasily Zakharov commented on HARMONY-2665:
------------------------------------------

I'll look into this issue.


> [classlib][swing] javax.swing.JSplitPane initializes divider position before being shown (unlike RI)
> ----------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2665
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2665
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Alexander Simbirtsev
>
> javax.swing.JSplitPane.getDividerLocation() returns 92 while RI returns -1.
> javax.swing.JSplitPane.getLastDividerLocation() returns 91 while RI returns 0.
> Compatibility issue.
> Use the following code to reproduce:
> import javax.swing.JSplitPane;
> import junit.framework.TestCase;
> public class Test extends TestCase {       
>     public void testcase1() {
>         JSplitPane s = new JSplitPane();
>         assertEquals(-1, s.getDividerLocation());
>     }
>     
>     public void testcase2() {
>         JSplitPane s = new JSplitPane();
>         assertEquals(0, s.getLastDividerLocation());
>     }                                
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-2665) [classlib][swing] javax.swing.JSplitPane initializes divider position before being shown (unlike RI)

Posted by "Alexander Simbirtsev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12471282 ] 

Alexander Simbirtsev commented on HARMONY-2665:
-----------------------------------------------

the reason of this behavior is that resetToPreferredSizes(getSplitPane()); is called in BasicSplitPaneUI.installUI() method
it initializes the values returned by methods mentioned in the issue.
You need to check if it is required to call resetToPreferredSizes during the UI installation process and find a proper place for this call of necessary


> [classlib][swing] javax.swing.JSplitPane initializes divider position before being shown (unlike RI)
> ----------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2665
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2665
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Alexander Simbirtsev
>
> javax.swing.JSplitPane.getDividerLocation() returns 92 while RI returns -1.
> javax.swing.JSplitPane.getLastDividerLocation() returns 91 while RI returns 0.
> Compatibility issue.
> Use the following code to reproduce:
> import javax.swing.JSplitPane;
> import junit.framework.TestCase;
> public class Test extends TestCase {       
>     public void testcase1() {
>         JSplitPane s = new JSplitPane();
>         assertEquals(-1, s.getDividerLocation());
>     }
>     
>     public void testcase2() {
>         JSplitPane s = new JSplitPane();
>         assertEquals(0, s.getLastDividerLocation());
>     }                                
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.