classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] Patch: JSplitPane patch fixes PR 24904


From: Anthony Balkissoon
Subject: [cp-patches] Patch: JSplitPane patch fixes PR 24904
Date: Wed, 16 Nov 2005 16:55:28 -0500

This patch for JSplitPane fixes PR 24904 (sorry, forgot to put that in
the ChangeLog) and makes a bunch of new Mauve tests pass (they are
pasted at the bottom of this email).

Only the no-argument constructor is a "demo" constructor (this seems
like a ridiculous idea in the first place, who would want this?) so it
creates a JButton as the left component and a JButton as the right
component.

The other constructors should allow null to be passed as arguments for
the components, and setLeftComponent and setRightComponent should allow
null as well.

The changes to BasicSplitPaneUI are just != null checks now that the
components can be null.

2005-11-16  Anthony Balkissoon  <address@hidden>

        * javax/swing/JSplitPane.java:
        (JSplitPane<init>): This is a "demo" constructor, should create two
        new JButtons, one with label "left button" and the other with label 
        "right button."
        (setLeftComponent): Do not create JButtons here.  A null argument is
        taken to mean remove the current component.
        (setRightComponent): Likewise.
        * javax/swing/plaf/basic/BasicSplitPaneUI: 
        (setDividerLocation): Check that right component is not null before 
        trying to get its preferred size.
        (startDragging): Avoid NPE by checking that left and right components
        are not null.


--Tony

** FIXED MAUVE TESTS **
gnu.testlet.javax.swing.JSplitPane.Constructor
FAIL: gnu.testlet.javax.swing.JSplitPane.Constructor: constructor with
only orientation (number 1)
FAIL: gnu.testlet.javax.swing.JSplitPane.Constructor: constructor with
only orientation (number 2)
FAIL: gnu.testlet.javax.swing.JSplitPane.Constructor: constructor with
only orientation (number 3)
FAIL: gnu.testlet.javax.swing.JSplitPane.Constructor: constructor with
only orientation (number 4)
FAIL: gnu.testlet.javax.swing.JSplitPane.Constructor: constructor with
orientation and layout (number 1)
FAIL: gnu.testlet.javax.swing.JSplitPane.Constructor: constructor with
orientation and layout (number 2)
FAIL: gnu.testlet.javax.swing.JSplitPane.Constructor: constructor with
orientation and layout (number 3)
FAIL: gnu.testlet.javax.swing.JSplitPane.Constructor: constructor with
orientation and layout (number 4)
FAIL: gnu.testlet.javax.swing.JSplitPane.Constructor: constructor with
orientation and layout (number 5)
FAIL: gnu.testlet.javax.swing.JSplitPane.Constructor: constructor with
orientation and layout (number 6)
FAIL: gnu.testlet.javax.swing.JSplitPane.Constructor: constructor with
orientation and layout (number 7)
FAIL: gnu.testlet.javax.swing.JSplitPane.Constructor: constructor with
orientation and layout (number 8)
FAIL: gnu.testlet.javax.swing.JSplitPane.Constructor: constructor with
orientation and 2 components (number 1)
FAIL: gnu.testlet.javax.swing.JSplitPane.Constructor: constructor with
orientation and 2 components (number 2)
FAIL: gnu.testlet.javax.swing.JSplitPane.Constructor: constructor with
orientation and 2 components (number 3)
FAIL: gnu.testlet.javax.swing.JSplitPane.Constructor: constructor with
orientation and 2 components (number 4)
FAIL: gnu.testlet.javax.swing.JSplitPane.Constructor: most general
constructor (number 1)
FAIL: gnu.testlet.javax.swing.JSplitPane.Constructor: most general
constructor (number 2)
FAIL: gnu.testlet.javax.swing.JSplitPane.Constructor: most general
constructor (number 3)
FAIL: gnu.testlet.javax.swing.JSplitPane.Constructor: most general
constructor (number 4)
FAIL: gnu.testlet.javax.swing.JSplitPane.Constructor: most general
constructor (number 5)
FAIL: gnu.testlet.javax.swing.JSplitPane.Constructor: most general
constructor (number 6)
FAIL: gnu.testlet.javax.swing.JSplitPane.Constructor: most general
constructor (number 7)
FAIL: gnu.testlet.javax.swing.JSplitPane.Constructor: most general
constructor (number 8)

gnu.testlet.javax.swing.JSplitPane.setComponent
FAIL: gnu.testlet.javax.swing.JSplitPane.setComponent: set left (number
1)
FAIL: gnu.testlet.javax.swing.JSplitPane.setComponent: set left (number
3)
FAIL: gnu.testlet.javax.swing.JSplitPane.setComponent: set right (number
1)
FAIL: gnu.testlet.javax.swing.JSplitPane.setComponent: set right (number
3)


Attachment: JSplitPaneNullComponents.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]