use of com.github.weisj.darklaf.components.iconeditor.IconEditor in project darklaf by weisJ.
the class IconEditorDemo method createComponent.
@Override
public JComponent createComponent() {
IconEditor editor = new IconEditor(AllIconsDemo.loadIcons(16, false).stream().map(p -> new Pair<>(p.getFirst(), p.getSecond())).collect(Collectors.toList()));
DemoPanel panel = new DemoPanel(editor, new BorderLayout(), 0);
JPanel controls = panel.addControls();
controls.add(new JCheckBox("Show add/remove controls") {
{
setSelected(editor.isShowEditorAddRemoveControls());
addActionListener(e -> editor.setShowEditorAddRemoveControls(isSelected()));
}
});
return panel;
}
Aggregations