Procedure

This scenario will test out the ability of the Visual Editor to work with Java inheritance.

Setup

 

Import inheritance.zip into a project.  

Abstract Test

Create a new visual class which extends AbstractChild.  Make sure the create inherited abstract methods check is checked.
Verify the visual representation of this new class is the JSplitPane. (on the canvas and the Java Beans View icon)
Verify the method doNothing is created in the source.

Select the this bean on the canvas.
Verify the property sheet reflects the JSplitPane properties.
Verify that the property publicInt is also present on the properties sheet.
Verify that the properties protectedInt and privateInt are not present on the properties sheet.

Set the publicInt property to some int value (42)
Verify the code is generated properly to set the property.

Resize the this bean by dragging the handles on the canvas.
Verify the splitpane resizes properly on the canvas and the setSize call is generated in the code.


Concrete Test

Create a new visual class which extends ConcreteChild in the default package.
Verify the visual representation of this new class is a JSplitPane containing a JLabel and a JTree


Select the this bean on the canvas.
Verify the property sheet reflects the JSplitPane properties.

Resize the bean by dragging the handles on the canvas.
Verify the splitpane resizes properly on the canvas and the setSize call is generated in the code.

Change the resizeWeight property to 0.25
Verify the divider location of the split pane moves to the left.

Hit the reset to default button on the Property Sheet to reset the resizeWeight property.
Verify the resizeWeight property resets to 0.5
Verify the divider location of the split pane moves to the center.