Package com.fxexperience.javafx.scene.control

Examples of com.fxexperience.javafx.scene.control.IntegerField


       
        Slider brightnessSlider = SliderBuilder.create().min(0).max(100).id("BrightnessSlider").build();
        brightnessSlider.valueProperty().bindBidirectional(bright);
        GridPane.setConstraints(brightnessSlider, 1, 0);
       
        IntegerField brightnessField = new IntegerField();
        brightnessField.valueProperty().bindBidirectional(bright);
        brightnessField.setPrefColumnCount(7);
        GridPane.setConstraints(brightnessField, 2, 0);
       
        Label saturationLabel = new Label("Saturation:");
        saturationLabel.setMinWidth(Control.USE_PREF_SIZE);
        GridPane.setConstraints(saturationLabel, 0, 1);
       
        Slider saturationSlider = SliderBuilder.create().min(0).max(100).id("SaturationSlider").build();
        saturationSlider.valueProperty().bindBidirectional(sat);
        GridPane.setConstraints(saturationSlider, 1, 1);
       
        saturationSlider.styleProperty().bind(new StringBinding() {
            { bind(color); }
            @Override protected String computeValue() {
                return "picker-color: hsb("+hue.get()+",100%,100%);";
            }
        });
       
        IntegerField saturationField = new IntegerField();
        saturationField.valueProperty().bindBidirectional(sat);
        saturationField.setPrefColumnCount(7);
        GridPane.setConstraints(saturationField, 2, 1);
       
        Label webLabel = new Label("Web:");
        webLabel.setMinWidth(Control.USE_PREF_SIZE);
        GridPane.setConstraints(webLabel, 0, 2);
View Full Code Here


     *
     * @param slider The slider to bind to and sit next to
     * @param parent The GridPane to add to
     */
    private void createNumberFieldForSlider(Slider slider, GridPane parent){
        IntegerField field = new IntegerField();
        field.setMaxHeight(field.USE_PREF_SIZE);
        field.setMaxWidth(field.USE_PREF_SIZE);
        field.setPrefColumnCount(3);
        parent.getChildren().add(field);
        GridPane.setColumnIndex(field, GridPane.getColumnIndex(slider)+1);
        GridPane.setRowIndex(field, GridPane.getRowIndex(slider));
        field.valueProperty().bindBidirectional(slider.valueProperty());
    }
View Full Code Here

TOP

Related Classes of com.fxexperience.javafx.scene.control.IntegerField

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.