You can subclass a Forms object when you create it. Each class representing
a Forms object which can be subclassed has overloaded constructors including
one which takes an extra argument of the same type as the object being constructed,
and another which takes a PropertyClass
reference.
For example:
Blocks:
public Block(FormModule parent, java.lang.String name, Block base) public Block(FormModule parent, java.lang.String name, PropertyClass base)
Canvases:
public Canvas(FormModule parent, java.lang.String name, Canvas base) public Canvas(FormModule parent, java.lang.String name, PropertyClass base)
Items:
public Item(Block parent, java.lang.String name, Item base) public Item(Block parent, java.lang.String name, PropertyClass base)
In the example in Creating, Manipulating, and Destroying Forms Objects, blockB is created by subclassing the blockA object. This snippet of code from the example is illustrated here:
... // create a module from scratch
FormModule fmd = new FormModule("MODULE_ONE"); Block blockA = new Block(fmd, "EMP"); Item itemA = new Item(blockA, "ID"); Item itemB = new Item(blockA, "NAME"); Item itemC = new Item(blockA, "LOCATION");// Create another block subclassed from the first one
// BlockB will also inherit items ItemA, ItemB and ItemC
Block blockB = new Block(fmd, "EMP2", blockA); ...