Search in sources :

Example 1 with JmixIcon

use of io.jmix.ui.icon.JmixIcon in project jmix by jmix-framework.

the class TemplateBlockEdit method initIconLookup.

protected void initIconLookup() {
    Map<String, String> optionsMap = new TreeMap<>();
    for (JmixIcon jmixIcon : JmixIcon.values()) {
        if (jmixIcon.source().startsWith("font-icon:")) {
            String caption = jmixIcon.source().substring("font-icon:".length());
            optionsMap.put(caption, jmixIcon.source());
        }
    }
    iconLookup.setOptionsMap(optionsMap);
    iconLookup.setOptionIconProvider(iconName -> iconName);
}
Also used : JmixIcon(io.jmix.ui.icon.JmixIcon) TreeMap(java.util.TreeMap)

Aggregations

JmixIcon (io.jmix.ui.icon.JmixIcon)1 TreeMap (java.util.TreeMap)1