When you implement a component, you override component methods, define new properties, dispatch new events, or perform any other customizations required by your application.
To implement your component, Follow these general steps:
You do not have to override all component methods to define a new component. You only override the methods required to implement the functionality of your component. If you create a subclass of an existing component, such as Button control or VBox container, you must implement the methods necessary for you to add any new functionality to the component.
For example, you can implement a custom Button control that uses a new mechanism for defining its default size. In that case, you only need to override the
measure() method. For an example, see Implementing the measure() method.
Or, you might implement a new subclass of the VBox container. Your new subclass uses all of the existing sizing logic of the VBox class, but changes the layout logic of the class to lay out the container children from the bottom of the container to the top, rather than from the top down. In this case, you only need to override the
updateDisplayList() method. For an example, see Implementing the updateDisplayList() method.