UniVista Programmer's Guide

UniVista.customizers

CustomizerSupport


Intent | Structure | Participants | Sample Code | Known Uses

Intent

This is an abstract class, although it extends JPanel. The point is that a basic, yet commmon, containable component has an interface which can be defined for customizers, regardless whether UniVista is involved or not. The basic functionality includes the setting of the target object to be customized, creation of the customizing UI, initialization and application of the edited properties.

Two helper methods are defined for creating basic JTextFields and JLabels.

Structure

Participants

Sample Code

The invoking of the customizer is as easy as follows. Either pass the customizerSupport subclass the target bean reference, or construct it with the target. This will invoke the creation of its GUI and the initialization of the property editors.
/**
* This constructs the Customizer with the target bean specified.
* @param targetBean java.lang.Object
*/
public CustomizerSupport(Object targetBean) {
this();
setObject(targetBean);
}

public void setObject(Object bean) {
this.bean = bean;
createGUI();
initializeEditors();
}

Known Uses

All the customizers within UniVista are descendants this class in some way. Direct inheriters include VariableDisplayCustomizer and VariableBeanCustomizer.



Contact the UniVista Team | Main Page | Table of Contents