Derived Components

Derived components extend or are collections of existing components.

If you have developed an Echo application, you have probably already created a derived component by extending one of Echo's built-in components. The simple example below shows such a case:

import nextapp.echo.Button;
import nextapp.echo.Color;

public class GreenButton extends Button {
    public GreenButton(String text) {
        super(text);
        setForeground(Color.BLACK);
        setBackground(Color.GREEN);
    }
}

This component is a button that will display black text on a green background. This example, while trivial and having little real world application, is nevertheless a legitimate derived component. All of Echo's built in components are designed to be extended.

NOTE: You are NOT violating Echo's licensing terms if you create a closed-source or otherwise LGPL-incompatible component that extends a built-in Echo component.