javafx.css.CssMetaData Java Examples

The following examples show how to use javafx.css.CssMetaData. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SVGIcon.java    From ikonli with Apache License 2.0 6 votes vote down vote up
public ObjectProperty<Ikon> iconCodeProperty() {
    if (iconCode == null) {
        iconCode = new StyleableObjectProperty<Ikon>() {
            @Override
            public CssMetaData getCssMetaData() {
                return StyleableProperties.ICON_CODE;
            }

            @Override
            public Object getBean() {
                return SVGIcon.this;
            }

            @Override
            public String getName() {
                return "iconCode";
            }
        };
        iconCode.addListener(iconFontChangeListener);
    }
    return iconCode;
}
 
Example #2
Source File: StackedFontIcon.java    From ikonli with Apache License 2.0 6 votes vote down vote up
public ObjectProperty<Number[]> iconSizesProperty() {
    if (iconSizes == null) {
        iconSizes = new StyleableObjectProperty<Number[]>() {
            @Override
            public Object getBean() {
                return StackedFontIcon.this;
            }

            @Override
            public String getName() {
                return "iconSizes";
            }

            @Override
            public CssMetaData<? extends Styleable, Number[]> getCssMetaData() {
                return StyleableProperties.ICON_SIZES;
            }
        };
        iconSizes.addListener(iconSizesChangeListener);
    }
    return iconSizes;
}
 
Example #3
Source File: StackedFontIcon.java    From ikonli with Apache License 2.0 6 votes vote down vote up
public IntegerProperty iconSizeProperty() {
    if (iconSize == null) {
        iconSize = new StyleableIntegerProperty(16) {
            @Override
            public CssMetaData getCssMetaData() {
                return StyleableProperties.ICON_SIZE;
            }

            @Override
            public Object getBean() {
                return StackedFontIcon.this;
            }

            @Override
            public String getName() {
                return "iconSize";
            }
        };
        iconSize.addListener(iconSizeChangeListener);
    }
    return iconSize;
}
 
Example #4
Source File: StackedFontIcon.java    From ikonli with Apache License 2.0 6 votes vote down vote up
public ObjectProperty<Ikon[]> iconCodesProperty() {
    if (iconCodes == null) {
        iconCodes = new StyleableObjectProperty<Ikon[]>() {
            @Override
            public Object getBean() {
                return StackedFontIcon.this;
            }

            @Override
            public String getName() {
                return "iconCodes";
            }

            @Override
            public CssMetaData<? extends Styleable, Ikon[]> getCssMetaData() {
                return StyleableProperties.ICON_CODES;
            }
        };
        iconCodes.addListener(iconCodesChangeListener);
    }
    return iconCodes;
}
 
Example #5
Source File: FxDump.java    From FxDock with Apache License 2.0 5 votes vote down vote up
protected void sort(CList<CssMetaData<? extends Styleable,?>> list)
{
	if(sorter == null)
	{
		sorter = new CComparator<CssMetaData<? extends Styleable,?>>()
		{
			public int compare(CssMetaData<? extends Styleable,?> a, CssMetaData<? extends Styleable,?> b)
			{
				return compareAsStrings(a.getProperty(), b.getProperty());
			}
		};
	}
	
	sorter.sort(list);
}
 
Example #6
Source File: RadialBargraph.java    From Enzo with Apache License 2.0 5 votes vote down vote up
public final ObjectProperty<Paint> sectionFill1Property() {
    if (null == sectionFill1) {
        sectionFill1 = new StyleableObjectProperty<Paint>(DEFAULT_SECTION_FILL_1) {
            @Override public CssMetaData getCssMetaData() { return StyleableProperties.SECTION_FILL_1; }
            @Override public Object getBean() { return RadialBargraph.this; }
            @Override public String getName() { return "sectionFill1"; }
        };
    }
    return sectionFill1;
}
 
Example #7
Source File: OnOffSwitch.java    From Enzo with Apache License 2.0 5 votes vote down vote up
public final ObjectProperty<Paint> textColorOnProperty() {
    if (null == textColorOn) {
        textColorOn = new StyleableObjectProperty<Paint>(DEFAULT_TEXT_COLOR_ON) {
            @Override public CssMetaData getCssMetaData() { return StyleableProperties.TEXT_COLOR_ON; }
            @Override public Object getBean() { return OnOffSwitch.this; }
            @Override public String getName() { return "switchColor"; }
        };
    }
    return textColorOn;
}
 
Example #8
Source File: SimpleLineChart.java    From Enzo with Apache License 2.0 5 votes vote down vote up
public final ObjectProperty<Paint> sectionFill2Property() {
    if (null == sectionFill2) {
        sectionFill2 = new StyleableObjectProperty<Paint>(DEFAULT_SECTION_FILL_2) {
            @Override public CssMetaData getCssMetaData() { return StyleableProperties.SECTION_FILL_2; }
            @Override public Object getBean() { return this; }
            @Override public String getName() { return "sectionFill2"; }
        };
    }
    return sectionFill2;
}
 
Example #9
Source File: SimpleGauge.java    From Enzo with Apache License 2.0 5 votes vote down vote up
public final ObjectProperty<Paint> sectionFill4Property() {
    if (null == sectionFill4) {
        sectionFill4 = new StyleableObjectProperty<Paint>(DEFAULT_SECTION_FILL_4) {
            @Override public CssMetaData getCssMetaData() { return StyleableProperties.SECTION_FILL_4; }
            @Override public Object getBean() { return this; }
            @Override public String getName() { return "sectionFill4"; }
        };
    }
    return sectionFill4;
}
 
Example #10
Source File: OnOffSwitch.java    From Enzo with Apache License 2.0 5 votes vote down vote up
public final ObjectProperty<Paint> switchColorProperty() {
    if (null == switchColor) {
        switchColor = new StyleableObjectProperty<Paint>(DEFAULT_SWITCH_COLOR) {
            @Override public CssMetaData getCssMetaData() { return StyleableProperties.SWITCH_COLOR; }
            @Override public Object getBean() { return OnOffSwitch.this; }
            @Override public String getName() { return "switchColor"; }
        };
    }
    return switchColor;
}
 
Example #11
Source File: RadialBargraph.java    From Enzo with Apache License 2.0 5 votes vote down vote up
public final ObjectProperty<Paint> markerFill2Property() {
    if (null == markerFill2) {
        markerFill2 = new StyleableObjectProperty<Paint>(DEFAULT_MARKER_FILL_2) {
            @Override public CssMetaData getCssMetaData() { return StyleableProperties.MARKER_FILL_2; }
            @Override public Object getBean() { return RadialBargraph.this; }
            @Override public String getName() { return "markerFill2"; }
        };
    }
    return markerFill2;
}
 
Example #12
Source File: Gauge.java    From Enzo with Apache License 2.0 5 votes vote down vote up
public final ObjectProperty<Paint> sectionFill5Property() {
    if (null == sectionFill5) {
        sectionFill5 = new StyleableObjectProperty<Paint>(DEFAULT_SECTION_FILL_5) {
            @Override public CssMetaData getCssMetaData() { return StyleableProperties.SECTION_FILL_5; }
            @Override public Object getBean() { return Gauge.this; }
            @Override public String getName() { return "sectionFill5"; }
        };
    }
    return sectionFill5;
}
 
Example #13
Source File: Gauge.java    From Enzo with Apache License 2.0 5 votes vote down vote up
public final ObjectProperty<Paint> markerFill3Property() {
    if (null == markerFill3) {
        markerFill3 = new StyleableObjectProperty<Paint>(DEFAULT_MARKER_FILL_3) {
            @Override public CssMetaData getCssMetaData() { return StyleableProperties.MARKER_FILL_3; }
            @Override public Object getBean() { return Gauge.this; }
            @Override public String getName() { return "markerFill3"; }
        };
    }
    return markerFill3;
}
 
Example #14
Source File: SimpleLineChart.java    From Enzo with Apache License 2.0 5 votes vote down vote up
public final ObjectProperty<Paint> sectionFill7Property() {
    if (null == sectionFill7) {
        sectionFill7 = new StyleableObjectProperty<Paint>(DEFAULT_SECTION_FILL_7) {
            @Override public CssMetaData getCssMetaData() { return StyleableProperties.SECTION_FILL_7; }
            @Override public Object getBean() { return this; }
            @Override public String getName() { return "sectionFill7"; }
        };
    }
    return sectionFill7;
}
 
Example #15
Source File: RadialBargraph.java    From Enzo with Apache License 2.0 5 votes vote down vote up
public final ObjectProperty<Paint> markerFill4Property() {
    if (null == markerFill4) {
        markerFill4 = new StyleableObjectProperty<Paint>(DEFAULT_MARKER_FILL_4) {
            @Override public CssMetaData getCssMetaData() { return StyleableProperties.MARKER_FILL_4; }
            @Override public Object getBean() { return RadialBargraph.this; }
            @Override public String getName() { return "markerFill4"; }
        };
    }
    return markerFill4;
}
 
Example #16
Source File: Led.java    From Enzo with Apache License 2.0 5 votes vote down vote up
public final ObjectProperty<Paint> ledColorProperty() {
    if (null == ledColor) {
        ledColor = new StyleableObjectProperty<Paint>(DEFAULT_LED_COLOR) {
            @Override public CssMetaData getCssMetaData() { return StyleableProperties.LED_COLOR; }
            @Override public Object getBean() { return Led.this; }
            @Override public String getName() { return "ledColor"; }
        };
    }
    return ledColor;
}
 
Example #17
Source File: SimpleGauge.java    From Enzo with Apache License 2.0 5 votes vote down vote up
public final ObjectProperty<Paint> sectionFill0Property() {
    if (null == sectionFill0) {
        sectionFill0 = new StyleableObjectProperty<Paint>(DEFAULT_SECTION_FILL_0) {
            @Override public CssMetaData getCssMetaData() { return StyleableProperties.SECTION_FILL_0; }
            @Override public Object getBean() { return this; }
            @Override public String getName() { return "sectionFill0"; }
        };
    }
    return sectionFill0;
}
 
Example #18
Source File: SimpleGauge.java    From Enzo with Apache License 2.0 5 votes vote down vote up
public final ObjectProperty<Paint> valueTextColorProperty() {
    if (null == valueTextColor) {
        valueTextColor = new StyleableObjectProperty<Paint>(DEFAULT_VALUE_TEXT_COLOR) {
            @Override public CssMetaData getCssMetaData() { return StyleableProperties.VALUE_TEXT_COLOR; }
            @Override public Object getBean() { return this; }
            @Override public String getName() { return "valueTextColor"; }
        };
    }
    return valueTextColor;
}
 
Example #19
Source File: CustomStyleableProperty.java    From RichTextFX with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public CustomStyleableProperty(T initialValue, String name, Object bean,
                               CssMetaData<? extends Styleable, T> cssMetaData) {
    super(initialValue);
    this.bean = bean;
    this.name = name;
    this.cssMetaData = cssMetaData;
}
 
Example #20
Source File: Gauge.java    From Enzo with Apache License 2.0 5 votes vote down vote up
public final ObjectProperty<Paint> sectionFill4Property() {
    if (null == sectionFill4) {
        sectionFill4 = new StyleableObjectProperty<Paint>(DEFAULT_SECTION_FILL_4) {
            @Override public CssMetaData getCssMetaData() { return StyleableProperties.SECTION_FILL_4; }
            @Override public Object getBean() { return Gauge.this; }
            @Override public String getName() { return "sectionFill4"; }
        };
    }
    return sectionFill4;
}
 
Example #21
Source File: SimpleGauge.java    From Enzo with Apache License 2.0 5 votes vote down vote up
public final ObjectProperty<Paint> sectionFill9Property() {
    if (null == sectionFill9) {
        sectionFill9 = new StyleableObjectProperty<Paint>(DEFAULT_SECTION_FILL_9) {
            @Override public CssMetaData getCssMetaData() { return StyleableProperties.SECTION_FILL_9; }
            @Override public Object getBean() { return this; }
            @Override public String getName() { return "sectionFill9"; }
        };
    }
    return sectionFill9;
}
 
Example #22
Source File: SimpleGauge.java    From Enzo with Apache License 2.0 5 votes vote down vote up
public final ObjectProperty<Paint> sectionFill6Property() {
    if (null == sectionFill6) {
        sectionFill6 = new StyleableObjectProperty<Paint>(DEFAULT_SECTION_FILL_6) {
            @Override public CssMetaData getCssMetaData() { return StyleableProperties.SECTION_FILL_6; }
            @Override public Object getBean() { return this; }
            @Override public String getName() { return "sectionFill6"; }
        };
    }
    return sectionFill6;
}
 
Example #23
Source File: FontIcon.java    From ikonli with Apache License 2.0 5 votes vote down vote up
public ObjectProperty<Ikon> iconCodeProperty() {
    if (iconCode == null) {
        iconCode = new StyleableObjectProperty<>() {
            @Override
            public CssMetaData getCssMetaData() {
                return StyleableProperties.ICON_CODE;
            }

            @Override
            public Object getBean() {
                return FontIcon.this;
            }

            @Override
            public String getName() {
                return "iconCode";
            }
        };

        iconCode.addListener((v, o, n) -> {
            if (!iconCode.isBound()) {
                FontIcon.this.setIconCode(n);
            }
        });
    }
    return iconCode;
}
 
Example #24
Source File: RadialBargraph.java    From Enzo with Apache License 2.0 5 votes vote down vote up
public final ObjectProperty<Paint> markerFill3Property() {
    if (null == markerFill3) {
        markerFill3 = new StyleableObjectProperty<Paint>(DEFAULT_MARKER_FILL_3) {
            @Override public CssMetaData getCssMetaData() { return StyleableProperties.MARKER_FILL_3; }
            @Override public Object getBean() { return RadialBargraph.this; }
            @Override public String getName() { return "markerFill3"; }
        };
    }
    return markerFill3;
}
 
Example #25
Source File: SimpleLineChart.java    From Enzo with Apache License 2.0 5 votes vote down vote up
public final ObjectProperty<Paint> sectionFill6Property() {
    if (null == sectionFill6) {
        sectionFill6 = new StyleableObjectProperty<Paint>(DEFAULT_SECTION_FILL_6) {
            @Override public CssMetaData getCssMetaData() { return StyleableProperties.SECTION_FILL_6; }
            @Override public Object getBean() { return this; }
            @Override public String getName() { return "sectionFill6"; }
        };
    }
    return sectionFill6;
}
 
Example #26
Source File: SimpleLineChart.java    From Enzo with Apache License 2.0 5 votes vote down vote up
public final ObjectProperty<Paint> sectionFill0Property() {
    if (null == sectionFill0) {
        sectionFill0 = new StyleableObjectProperty<Paint>(DEFAULT_SECTION_FILL_0) {
            @Override public CssMetaData getCssMetaData() { return StyleableProperties.SECTION_FILL_0; }
            @Override public Object getBean() { return this; }
            @Override public String getName() { return "sectionFill0"; }
        };
    }
    return sectionFill0;
}
 
Example #27
Source File: Gauge.java    From Enzo with Apache License 2.0 5 votes vote down vote up
public final ObjectProperty<Paint> sectionFill0Property() {
    if (null == sectionFill0) {
        sectionFill0 = new StyleableObjectProperty<Paint>(DEFAULT_SECTION_FILL_0) {
            @Override public CssMetaData getCssMetaData() { return StyleableProperties.SECTION_FILL_0; }
            @Override public Object getBean() { return Gauge.this; }
            @Override public String getName() { return "sectionFill0"; }
        };
    }
    return sectionFill0;
}
 
Example #28
Source File: RadialBargraph.java    From Enzo with Apache License 2.0 5 votes vote down vote up
public final ObjectProperty<Paint> sectionFill8Property() {
    if (null == sectionFill8) {
        sectionFill8 = new StyleableObjectProperty<Paint>(DEFAULT_SECTION_FILL_8) {
            @Override public CssMetaData getCssMetaData() { return StyleableProperties.SECTION_FILL_8; }
            @Override public Object getBean() { return RadialBargraph.this; }
            @Override public String getName() { return "sectionFill8"; }
        };
    }
    return sectionFill8;
}
 
Example #29
Source File: SimpleGauge.java    From Enzo with Apache License 2.0 5 votes vote down vote up
public final ObjectProperty<Paint> sectionFill1Property() {
    if (null == sectionFill1) {
        sectionFill1 = new StyleableObjectProperty<Paint>(DEFAULT_SECTION_FILL_1) {
            @Override public CssMetaData getCssMetaData() { return StyleableProperties.SECTION_FILL_1; }
            @Override public Object getBean() { return this; }
            @Override public String getName() { return "sectionFill1"; }
        };
    }
    return sectionFill1;
}
 
Example #30
Source File: VuMeter.java    From Enzo with Apache License 2.0 5 votes vote down vote up
public final ObjectProperty<Paint> sectionFill4Property() {
    if (null == sectionFill4) {
        sectionFill4 = new StyleableObjectProperty<Paint>(DEFAULT_SECTION_FILL_4) {
            @Override public CssMetaData getCssMetaData() { return StyleableProperties.SECTION_FILL_4; }
            @Override public Object getBean() { return this; }
            @Override public String getName() { return "sectionFill4"; }
        };
    }
    return sectionFill4;
}