Search in sources :

Example 6 with Theme

use of org.apache.pivot.wtk.Theme in project pivot by apache.

the class ColorPaletteTest method startup.

@SuppressWarnings("unused")
@Override
public void startup(Display display, Map<String, String> properties) throws Exception {
    Theme theme = Theme.getTheme();
    TablePane tablePane = new TablePane();
    new TablePane.Column(tablePane, 1, true);
    new TablePane.Column(tablePane, 1, true);
    new TablePane.Column(tablePane, 1, true);
    int numberOfPaletteColors = theme.getNumberOfPaletteColors();
    // ArrayList<String> colors = new ArrayList<>(numberOfPaletteColors);
    for (int i = 0; i < numberOfPaletteColors; i++) {
        TablePane.Row row = new TablePane.Row(tablePane, 1, true);
        row.add(createCell(i * 3));
        row.add(createCell(i * 3 + 1));
        row.add(createCell(i * 3 + 2));
    }
    tablePane.getStyles().put(Style.horizontalSpacing, 4);
    tablePane.getStyles().put(Style.verticalSpacing, 4);
    Border border = new Border(tablePane);
    border.getStyles().put(Style.padding, 6);
    this.window = new Window(border);
    this.window.setTitle("Color Palette");
    this.window.setMaximized(true);
    this.window.open(display);
}
Also used : Window(org.apache.pivot.wtk.Window) Theme(org.apache.pivot.wtk.Theme) Border(org.apache.pivot.wtk.Border) TablePane(org.apache.pivot.wtk.TablePane)

Example 7 with Theme

use of org.apache.pivot.wtk.Theme in project pivot by apache.

the class TerraTableViewHeaderSkin method setColor.

public final void setColor(int color) {
    Theme theme = Theme.getTheme();
    setColor(theme.getColor(color));
}
Also used : Theme(org.apache.pivot.wtk.Theme)

Example 8 with Theme

use of org.apache.pivot.wtk.Theme in project pivot by apache.

the class TerraTableViewHeaderSkin method setDisabledColor.

public final void setDisabledColor(int disabledColor) {
    Theme theme = Theme.getTheme();
    setDisabledColor(theme.getColor(disabledColor));
}
Also used : Theme(org.apache.pivot.wtk.Theme)

Example 9 with Theme

use of org.apache.pivot.wtk.Theme in project pivot by apache.

the class TerraTableViewHeaderSkin method setBackgroundColor.

public final void setBackgroundColor(int backgroundColor) {
    Theme theme = Theme.getTheme();
    setBackgroundColor(theme.getColor(backgroundColor));
}
Also used : Theme(org.apache.pivot.wtk.Theme)

Example 10 with Theme

use of org.apache.pivot.wtk.Theme in project pivot by apache.

the class TerraTableViewSkin method setAlternateRowBackgroundColor.

public final void setAlternateRowBackgroundColor(int alternateRowBackgroundColor) {
    Theme theme = Theme.getTheme();
    setAlternateRowBackgroundColor(theme.getColor(alternateRowBackgroundColor));
}
Also used : Theme(org.apache.pivot.wtk.Theme)

Aggregations

Theme (org.apache.pivot.wtk.Theme)176 Color (java.awt.Color)2 Font (java.awt.Font)2 Border (org.apache.pivot.wtk.Border)2 BoxPane (org.apache.pivot.wtk.BoxPane)2 TablePane (org.apache.pivot.wtk.TablePane)2 GradientPaint (java.awt.GradientPaint)1 Locale (java.util.Locale)1 BXMLSerializer (org.apache.pivot.beans.BXMLSerializer)1 Resources (org.apache.pivot.util.Resources)1 Button (org.apache.pivot.wtk.Button)1 ButtonPressListener (org.apache.pivot.wtk.ButtonPressListener)1 ColorChooserButton (org.apache.pivot.wtk.ColorChooserButton)1 ColorChooserButtonSelectionListener (org.apache.pivot.wtk.ColorChooserButtonSelectionListener)1 Component (org.apache.pivot.wtk.Component)1 Expander (org.apache.pivot.wtk.Expander)1 Insets (org.apache.pivot.wtk.Insets)1 Label (org.apache.pivot.wtk.Label)1 NumberRuler (org.apache.pivot.wtk.NumberRuler)1 PushButton (org.apache.pivot.wtk.PushButton)1