Package javafx.beans.property

Examples of javafx.beans.property.DoublePropertyBase



    // ******************** Constructors **************************************
    public HeatControl() {
        getStyleClass().add("heat-control");
        value             = new DoublePropertyBase(0) {
            @Override protected void invalidated() {
                set(clamp(getMinValue(), getMaxValue(), get()));
            }
            @Override public Object getBean() { return this; }
            @Override public String getName() { return "value"; }
        };
        minValue          = new DoublePropertyBase(0) {
            @Override protected void invalidated() {
                if (getValue() < get()) setValue(get());
            }
            @Override public Object getBean() { return this; }
            @Override public String getName() { return "minValue"; }
        };
        maxValue          = new DoublePropertyBase(40) {
            @Override protected void invalidated() {
                if (getValue() > get()) setValue(get());
            }
            @Override public Object getBean() { return this; }
            @Override public String getName() { return "maxValue"; }
        };
        oldValue          = 0;
        target            = new DoublePropertyBase(20) {
            @Override protected void invalidated() {
                set(clamp(getMinValue(), getMaxValue(), get()));
            }
            @Override public Object getBean() { return this; }
            @Override public String getName() { return "target"; }
View Full Code Here


       

    // ******************** Constructors **************************************
    public SimpleGauge() {
        getStyleClass().add("simple-gauge");       
        value                 = new DoublePropertyBase(0) {
            @Override protected void invalidated() {               
                set(clamp(getMinValue(), getMaxValue(), get()));   
            }
            @Override public Object getBean() { return this; }
            @Override public String getName() { return "value"; }
        };               
        minValue              = new DoublePropertyBase(0) {
            @Override protected void invalidated() {                
                if (getValue() < get()) setValue(get());               
            }
            @Override public Object getBean() { return this; }
            @Override public String getName() { return "minValue"; }
        };
        maxValue              = new DoublePropertyBase(100) {
            @Override protected void invalidated() {                
                if (getValue() > get()) setValue(get());
            }
            @Override public Object getBean() { return this; }
            @Override public String getName() { return "maxValue"; }
View Full Code Here

            startAngle.set(START_ANGLE);
        }
    }
    public final DoubleProperty startAngleProperty() {
        if (null == startAngle) {           
            startAngle = new DoublePropertyBase(_startAngle) {
                @Override protected void invalidated() {
                    set(clamp(0d, 360d, get()));                   
                }
                @Override public Object getBean() { return this; }
                @Override public String getName() { return "startAngle"; }
View Full Code Here

            angleRange.set(ANGLE_RANGE);
        }
    }
    public final DoubleProperty angleRangeProperty() {
        if (null == angleRange) {                       
            angleRange = new DoublePropertyBase(_angleRange) {
                @Override protected void invalidated() { set(clamp(0d, 360d, get())); }
                @Override public Object getBean() { return this; }
                @Override public String getName() { return "angleRange"; }
            };
        }
View Full Code Here


    // ******************** Constructors **************************************
    public Lcd() {
        getStyleClass().add("lcd");       
        value                     = new DoublePropertyBase(0) {
            @Override protected void invalidated() {
                set(clamp(getMinValue(), getMaxValue(), get()));
            }
            @Override public Object getBean() { return this; }
            @Override public String getName() { return "value"; }
View Full Code Here

            minValue.set(MIN_VALUE);
        }
    }
    public final DoubleProperty minValueProperty() {
        if (null == minValue) {           
            minValue = new DoublePropertyBase(_minValue) {
                @Override protected void invalidated() {
                    set(clamp(Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, get()));
                }
                @Override public Object getBean() { return this; }
                @Override public String getName() { return "minValue"; }
View Full Code Here

            maxValue.set(MAX_VALUE);
        }
    }
    public final DoubleProperty maxValueProperty() {
        if (null == maxValue) {           
            maxValue = new DoublePropertyBase(_maxValue) {
                @Override protected void invalidated() {
                    set(clamp(Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, get()));
                }
                @Override public Object getBean() { return this; }
                @Override public String getName() { return "maxValue"; }
View Full Code Here


    // ******************** Constructors **************************************
    public Gauge() {
        getStyleClass().add("gauge");
        value                    = new DoublePropertyBase(0) {
            @Override protected void invalidated() {
                set(clamp(getMinValue(), getMaxValue(), get()));
            }
            @Override public Object getBean() { return this; }
            @Override public String getName() { return "value"; }
        };
        minValue                 = new DoublePropertyBase(0) {
            @Override protected void invalidated() {
                //set(clamp(Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, get()));
                if (getValue() < get()) setValue(get());
                if (getThreshold() < get()) setThreshold(get());
                for (Marker marker : markers.keySet()) {
                    if (marker.getValue() < get()) marker.setValue(get());                
                }
                for (Section section : sections) {
                    if (section.getStart() < get()) section.setStart(get());                   
                    if (section.getStop() < get()) section.setStop(get());                   
                }
            }
            @Override public Object getBean() { return this; }
            @Override public String getName() { return "minValue"; }
        };
        maxValue                 = new DoublePropertyBase(100) {
            @Override protected void invalidated() {
                //set(clamp(Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, get()));
                if (getValue() > get()) setValue(get());
                if (getThreshold() > get()) setThreshold(get());
                for (Marker marker : markers.keySet()) {                   
View Full Code Here

            threshold.set(THRESHOLD);
        }
    }
    public final DoubleProperty thresholdProperty() {
        if (null == threshold) {           
            threshold = new DoublePropertyBase(_threshold) {
                @Override protected void invalidated() { set(clamp(getMinValue(), getMaxValue(), get())); }
                @Override public Object getBean() { return this; }
                @Override public String getName() { return "threshold"; }
            };
        }
View Full Code Here

            startAngle.set(START_ANGLE);
        }
    }
    public final DoubleProperty startAngleProperty() {
        if (null == startAngle) {           
            startAngle = new DoublePropertyBase(_startAngle) {
                @Override protected void invalidated() { set(clamp(0d, 360d, get())); }
                @Override public Object getBean() { return this; }
                @Override public String getName() { return "startAngle"; }
            };
        }
View Full Code Here

TOP

Related Classes of javafx.beans.property.DoublePropertyBase

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.