Search in sources :

Example 1 with JFXTimePicker

use of com.jfoenix.controls.JFXTimePicker in project JFoenix by jfoenixadmin.

the class JFXTimePickerBehavior method onAutoHide.

/**************************************************************************
     *                                                                        *
     * Mouse Events handling (when losing focus)                              *
     *                                                                        *
     *************************************************************************/
@Override
public void onAutoHide() {
    JFXTimePicker datePicker = (JFXTimePicker) getControl();
    JFXTimePickerSkin cpSkin = (JFXTimePickerSkin) datePicker.getSkin();
    cpSkin.syncWithAutoUpdate();
    if (!datePicker.isShowing())
        super.onAutoHide();
}
Also used : JFXTimePickerSkin(com.jfoenix.skins.JFXTimePickerSkin) JFXTimePicker(com.jfoenix.controls.JFXTimePicker)

Example 2 with JFXTimePicker

use of com.jfoenix.controls.JFXTimePicker in project JFoenix by jfoenixadmin.

the class DatePickerDemo method start.

@Override
public void start(Stage stage) {
    FlowPane main = new FlowPane();
    main.setVgap(20);
    main.setHgap(20);
    DatePicker datePicker = new DatePicker();
    main.getChildren().add(datePicker);
    JFXDatePicker datePickerFX = new JFXDatePicker();
    main.getChildren().add(datePickerFX);
    datePickerFX.setPromptText("pick a date");
    JFXTimePicker blueDatePicker = new JFXTimePicker();
    blueDatePicker.setDefaultColor(Color.valueOf("#3f51b5"));
    blueDatePicker.setOverLay(true);
    main.getChildren().add(blueDatePicker);
    StackPane pane = new StackPane();
    pane.getChildren().add(main);
    StackPane.setMargin(main, new Insets(100));
    pane.setStyle("-fx-background-color:WHITE");
    final Scene scene = new Scene(pane, 400, 700);
    scene.getStylesheets().add(MainDemo.class.getResource("/resources/css/jfoenix-fonts.css").toExternalForm());
    scene.getStylesheets().add(MainDemo.class.getResource("/resources/css/jfoenix-design.css").toExternalForm());
    stage.setTitle("JFX Date Picker Demo");
    stage.setScene(scene);
    stage.show();
}
Also used : JFXDatePicker(com.jfoenix.controls.JFXDatePicker) Insets(javafx.geometry.Insets) FlowPane(javafx.scene.layout.FlowPane) DatePicker(javafx.scene.control.DatePicker) JFXDatePicker(com.jfoenix.controls.JFXDatePicker) Scene(javafx.scene.Scene) JFXTimePicker(com.jfoenix.controls.JFXTimePicker) StackPane(javafx.scene.layout.StackPane)

Aggregations

JFXTimePicker (com.jfoenix.controls.JFXTimePicker)2 JFXDatePicker (com.jfoenix.controls.JFXDatePicker)1 JFXTimePickerSkin (com.jfoenix.skins.JFXTimePickerSkin)1 Insets (javafx.geometry.Insets)1 Scene (javafx.scene.Scene)1 DatePicker (javafx.scene.control.DatePicker)1 FlowPane (javafx.scene.layout.FlowPane)1 StackPane (javafx.scene.layout.StackPane)1