use of org.apache.pivot.wtk.Theme in project pivot by apache.
the class NumberRulerSkin method setBackgroundColor.
public final void setBackgroundColor(int backgroundColor) {
Theme theme = currentTheme();
setBackgroundColor(theme.getColor(backgroundColor));
}
use of org.apache.pivot.wtk.Theme in project pivot by apache.
the class NumberRulerSkin method setColor.
public final void setColor(int color) {
Theme theme = currentTheme();
setColor(theme.getColor(color));
}
use of org.apache.pivot.wtk.Theme in project pivot by apache.
the class ContainerSkin method setBackgroundColor.
/**
* Sets the background of the container to one of the theme colors.
*
* @param backgroundColor An index into the theme's color palette.
*/
public final void setBackgroundColor(int backgroundColor) {
Theme theme = currentTheme();
setBackgroundColor(theme.getColor(backgroundColor));
}
use of org.apache.pivot.wtk.Theme in project pivot by apache.
the class SeparatorSkin method install.
@Override
public void install(Component component) {
super.install(component);
Theme theme = currentTheme();
theme.setDefaultStyles(this);
Separator separator = (Separator) component;
separator.getSeparatorListeners().add(this);
}
use of org.apache.pivot.wtk.Theme in project pivot by apache.
the class ColorSchemeBuilderWindow method createColorPaletteCell.
private static Component createColorPaletteCell(int index) {
Border border = new Border();
border.getStyles().put(Style.backgroundColor, index);
Theme theme = Theme.getTheme();
Label label = new Label();
label.setText(Integer.toString(index));
label.getStyles().put(Style.font, "{size:'80%'}");
label.getStyles().put(Style.backgroundColor, 4);
label.getStyles().put(Style.padding, 1);
BoxPane boxPane = new BoxPane();
boxPane.getStyles().put(Style.padding, 2);
boxPane.getStyles().put(Style.horizontalAlignment, HorizontalAlignment.CENTER);
boxPane.getStyles().put(Style.verticalAlignment, VerticalAlignment.CENTER);
boxPane.add(new Border(label));
border.setContent(boxPane);
return border;
}
Aggregations