Notes | for more details | attribute reference |
As in any real object-oriented language, you can define your own class attributes. In
this example, we want the size of the border in the borderedbox class to be
customizable. We use the <attribute>
tag to
define a class attribute in borderedbox. We provide the attribute with a name
(bordersize
) and a default
value
(3
). You can now use
bordersize
as a tag attribute to set the size of the
border in instances of the <borderedbox>
class.