free.fr/header.png">Romain Guys ProgX website
JXHeader
is a simple component that is also sufficiently configurable to be usable. The description area accepts HTML conforming to version 3.2 of the HTML standard. The icon, title, and description are all configurable. JXHeader
itself extends {@link JXPanel}, providing translucency and painting delegates.
If I were to reconstruct the ui shown in the above screenshot, I might do so like this:
JXHeader header = new JXHeader(); header.setTitle("Timing Framework Spline Editor"); header.setDescription("Drag control points in the display to change the " + "shape of the spline\n" + "Click the Copy Code button to generate the corresponding Java code."); Icon icon = new ImageIcon(getClass().getResource("tools.png")); header.setIcon(icon);
Note: The HTML support doesn't exist yet. The UI delegate needs to discover whether the text supplied is HTML or not, and change the content type of the editor pane being used. The problem is that if "text/html" is always used, the font is wrong. This same situation will be found in other parts of the code (JXErrorPane, for instance), so this needs to be dealt with.
Defaults
BasicHeaderUI uses the following UI defaults:
- Header.defaultIcon: The default icon to use when creating a new JXHeader.
@status REVIEWED
@author rbair
@author rah003