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();
}
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();
}
Aggregations