use of com.github.weisj.darklaf.properties.color.DynamicColor in project darklaf by weisJ.
the class ColorPaletteDemo method createComponent.
@Override
public JComponent createComponent() {
JComponent comp = Box.createVerticalBox();
comp.add(Box.createVerticalStrut(5));
{
JComponent p = Box.createVerticalBox();
p.setBorder(LayoutHelper.createEmptyContainerBorder());
List<Color> palette = Arrays.asList(ColorPalette.YELLOW, ColorPalette.ORANGE, ColorPalette.RED, ColorPalette.PINK, ColorPalette.PURPLE, ColorPalette.INDIGO, ColorPalette.BLUE, ColorPalette.TEAL, ColorPalette.CYAN, ColorPalette.GREEN, ColorPalette.LIME, ColorPalette.FOREST, ColorPalette.BROWN, ColorPalette.GRAY);
for (Color color : palette) {
p.add(Box.createVerticalStrut(5));
p.add(new JLabel(((DynamicColor) color).getKey(), new SolidColorIcon(color, 32, 32), JLabel.LEFT));
}
comp.add(p);
comp.add(Box.createVerticalStrut(5));
}
return comp;
}
Aggregations