Search in sources :

Example 1 with LookupTable

use of com.github.bordertech.wcomponents.util.LookupTable in project wcomponents by BorderTech.

the class WAbbrTextExample method preparePaintComponent.

/**
 * {@inheritDoc}
 */
@Override
protected void preparePaintComponent(final Request request) {
    super.preparePaintComponent(request);
    if (!isInitialised()) {
        LookupTable lookup = Factory.newInstance(LookupTable.class);
        for (Object entry : lookup.getTable("sex")) {
            WAbbrText abbr = new WAbbrText();
            abbr.setTextWithDesc(entry);
            crtSexPanel.add(abbr);
        }
        for (Object entry : lookup.getTable("icao")) {
            WAbbrText abbr = new WAbbrText();
            abbr.setTextWithCode(entry);
            crtIcaoPanel.add(abbr);
        }
        setInitialised(true);
    }
}
Also used : LookupTable(com.github.bordertech.wcomponents.util.LookupTable) WAbbrText(com.github.bordertech.wcomponents.WAbbrText)

Aggregations

WAbbrText (com.github.bordertech.wcomponents.WAbbrText)1 LookupTable (com.github.bordertech.wcomponents.util.LookupTable)1