Package javafx.scene.control

Examples of javafx.scene.control.Label


    protected FXFormNode createFXFormNode(Element element, FactoryProvider factoryProvider, String suffixId) {
        Callback<Void, FXFormNode> factory = factoryProvider.getFactory(element);
        if (factory == null) {
            logger.log(Level.WARNING, "No factory found for " + element + ", using " + factoryProvider + "\nCheck your factory provider.");
            Label label = new Label();
            return new FXFormNodeWrapper(label, label.textProperty());
        }
        FXFormNode fxFormNode = factory.call(null);
        fxFormNode.getNode().setId(element.getName() + suffixId);
        return fxFormNode;
    }
View Full Code Here


        hField = new TextField("00");
        mField = new TextField("00");
        sField = new TextField("00");
        msField = new TextField("000");
       
        Label separator1 = new Label(":");
        Label separator2 = new Label(":");
        Label msSeparator = new Label(",");
       
        Button cancelButton = new Button("Cancel");
        cancelButton.setOnAction(new EventHandler<ActionEvent>() {

            @Override
View Full Code Here

        data = FXCollections.observableArrayList();
    }
   
    @Override
    public void start(Stage primaryStage) {
        Label movieNameLabel = new Label("Movie Name:");
        Label languageLabel = new Label("Language:");
        movieNameField = new TextField();
        languageCombo = new ComboBox();
        searchButton = new Button("Search");
       
        initComboBox();
View Full Code Here

        setPadding(new Insets(10, 20, 10, 10));
        setVgap(10);
        setHgap(10);
        GridPane.setConstraints(splineEditorControl, 0, 0, 1, 10
                , HPos.CENTER, VPos.CENTER, Priority.ALWAYS, Priority.ALWAYS);
        final Label codeLabel = new Label();
        codeLabel.setId("CodeLabel");
        codeLabel.textProperty().bind(new StringBinding() {
            { bind(splineEditorControl.controlPoint1xProperty(),
                    splineEditorControl.controlPoint1yProperty(),
                    splineEditorControl.controlPoint2xProperty(),
                    splineEditorControl.controlPoint2yProperty()); }
            @Override protected String computeValue() {
                return String.format("Interpolator.SPLINE(%.4f, %.4f, %.4f, %.4f);",
                        splineEditorControl.getControlPoint1x(),
                        splineEditorControl.getControlPoint1y(),
                        splineEditorControl.getControlPoint2x(),
                        splineEditorControl.getControlPoint2y());
            }
        });
        GridPane.setConstraints(codeLabel, 0, 10, 1, 1
                , HPos.CENTER, VPos.CENTER, Priority.ALWAYS, Priority.ALWAYS);
        Button copyButton = new Button("Copy Code");
        copyButton.getStyleClass().add("big-button");
        copyButton.setOnAction(new EventHandler<ActionEvent>() {
            @Override public void handle(ActionEvent t) {
                Clipboard.getSystemClipboard().setContent(
                        Collections.singletonMap(DataFormat.PLAIN_TEXT,(Object)codeLabel.getText()));
            }
        });
        GridPane.setConstraints(copyButton, 1, 10, 1, 1
                , HPos.CENTER, VPos.CENTER, Priority.NEVER, Priority.NEVER);
       
        // preview
        Label previewLabel = new Label("Animation Preview");
        previewLabel.setStyle("-fx-font-weight: bold; -fx-font-size: 1.1em;");
        GridPane.setConstraints(previewLabel, 1, 0, 1, 1, HPos.CENTER, VPos.CENTER);
        // scale
        Label scaleLabel = new Label("Scale");
        GridPane.setConstraints(scaleLabel, 1, 1, 1, 1, HPos.CENTER, VPos.CENTER);
        GridPane.setConstraints(scaleCircle, 1, 2, 1, 1, HPos.CENTER, VPos.CENTER);
        // rotate
        Label rotateLabel = new Label("Rotate");
        GridPane.setConstraints(rotateLabel, 1, 3, 1, 1, HPos.CENTER, VPos.CENTER);
        GridPane.setConstraints(rotateSquare, 1, 4, 1, 1, HPos.CENTER, VPos.CENTER);
        // fade
        Label fadeLabel = new Label("Fade");
        GridPane.setConstraints(fadeLabel, 1, 5, 1, 1, HPos.CENTER, VPos.CENTER);
        GridPane.setConstraints(fadeSquare, 1, 6, 1, 1, HPos.CENTER, VPos.CENTER);
        // linear
        Label linearLabel = new Label("Linear");
        GridPane.setConstraints(linearLabel, 1, 7, 1, 1, HPos.CENTER, VPos.CENTER);
        GridPane.setConstraints(linearGroup, 1, 8, 1, 1, HPos.CENTER, VPos.CENTER);
       
        getColumnConstraints().addAll(
            new ColumnConstraints(300,USE_COMPUTED_SIZE,Double.MAX_VALUE, Priority.ALWAYS, HPos.CENTER,true),
View Full Code Here

            }
        };
        colorBar.setOnMouseDragged(barMouseHandler);
        colorBar.setOnMouseClicked(barMouseHandler);
       
        Label brightnessLabel = new Label("Brightness:");
        brightnessLabel.setMinWidth(Control.USE_PREF_SIZE);
        GridPane.setConstraints(brightnessLabel, 0, 0);
       
        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);
       
        WebColorField webField = new WebColorField();
        webField.valueProperty().bindBidirectional(color);
        GridPane.setConstraints(webField, 1, 2, 2, 1);
View Full Code Here

                .minWidth(1024)
                .prefWidth(1024)
                .build();
        // sp.getStyleClass().add("header");

        final Label primaryTitle = LabelBuilder.create()
                // .styleClass("slideTitle")
                .font(PrezFonts.SLIDE_TITLE.get())
                .textFill(PrezColors.SLIDE_TITLE.get())
                .text(getModel().getSlide().getTitle().replaceAll("\\\\n", "\n").replaceAll("\\\\t", "\t"))
                .layoutX(40)
View Full Code Here

    protected void initView() {

        getRootNode().setMinWidth(200);

        final HBox hbox = HBoxBuilder.create().build();
        final Label label = new Label("Node Name :");
        this.nodeName = new Text();
        hbox.getChildren().addAll(label, this.nodeName);

        getRootNode().getChildren().add(hbox);
    }
View Full Code Here

        final HBox box = HBoxBuilder.create()
            .styleClass("FormRow")
            .alignment(Pos.CENTER_LEFT)
            .build();

        final Label fieldLabel = LabelBuilder.create()
                .text(string)
                .styleClass("FieldLabel")
                .alignment(Pos.BASELINE_LEFT)
//                .effect(DropShadowBuilder.create()
//
//                        .input(InnerShadowBuilder.create()
//
//                                .color(Color.web("dfdfdf"))
//                                .build())
//
//                        .color(Color.web("#bfbfbf"))
//                        .height(5)
//                        .offsetX(1)
//                        .offsetY(-1)
//                        .radius(1)
//                        .spread(0)
//                        .width(2)
//                        .build())

                .build();
       
        HBox.setHgrow(fieldLabel, Priority.NEVER);
        HBox.setMargin(fieldLabel, new Insets(0, 10, 0, 10));

        final Label unity = LabelBuilder.create()
                .text(string2)
                .styleClass("FieldUnity")
//                .effect(DropShadowBuilder.create()
//
//                        .color(Color.web("#262626"))
//                        .height(5)
//                        .offsetX(1)
//                        .offsetY(-1)
//                        .radius(1)
//                        .spread(0)
//                        .width(2)
//                        .build())
                .build();
       
        HBox.setHgrow(unity, Priority.NEVER);
        HBox.setMargin(unity, new Insets(0, 0, 0, 0));

        final Label fieldValue = LabelBuilder.create()
                .text("...")
                .styleClass("FieldValue")
                .build();
       
        HBox.setHgrow(fieldValue, Priority.ALWAYS);
View Full Code Here

      .withHGap(5)
      .withVGap(5)
      .withPadding(new Insets(10, 10, 10, 10))
      .withGridLinesVisible(true);
 
      gridPane.add(new Label("SingleCell"), new GridPane.C().col(1).row(0));
    gridPane.add(new Label("RIGHT"), new GridPane.C().col(2).row(0).halignment(HPos.RIGHT));
 
    gridPane.add(new Label("Span2Row\nSpan2Row\nSpan2Row"), new GridPane.C().col(0).row(0).colSpan(1).rowSpan(2));
 
      gridPane.add(new Label("Span2Columns Span2Columns"), new GridPane.C().col(1).row(1).colSpan(2).rowSpan(1));
 
    gridPane.add(new Label("Single"), new GridPane.C().col(0).row(2));
    gridPane.add(new Label("Span2Col2RowCenter\nSpan2Col2RowCenter\nSpan2Col2RowCenter\nSpan2Col2RowCenter\nSpan2Col2RowCenter"), new GridPane.C().col(1).row(2).colSpan(2).rowSpan(2).halignment(HPos.CENTER));
 
    gridPane.add(new Label("BOTTOM"), new GridPane.C().col(0).row(3).valignment(VPos.BOTTOM));
 
      gridPane.add(new Label("TOP"), new GridPane.C().col(3).row(3).valignment(VPos.TOP));

    return gridPane;
  }
View Full Code Here

  @Override
  protected Parent getRootNode() {
    // use a pane to force the scene large enough, the circular pane is placed top-left
    Pane lPane = new Pane();
    lPane.setMinSize(600, 600);
    label = new Label();
    label.setLayoutY(lPane.getMinHeight() - 20);
    lPane.getChildren().add(label);   
   
    // add the circularePane (this is what we want to test)
    circularPane = new CircularPane();
View Full Code Here

TOP

Related Classes of javafx.scene.control.Label

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.