-
Bug
-
Resolution: Fixed
-
P3
-
jfx11, 10
FULL PRODUCT VERSION :
java version "10" 2018-03-20
Java(TM) SE Runtime Environment 18.3 (build 10+46)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10+46, mixed mode
ADDITIONAL OS VERSION INFORMATION :
maOS High Sierra 10.13.4
A DESCRIPTION OF THE PROBLEM :
DateCell text color are not updated correctly when DateCell with disable = true is reused.
This problem has occurred in JDK 10.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1) Start the test application
2) Display the calendar popup
3) Last month click
4) Next month click
5) Next month click
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The text color of DateCell is displayed correctly
ACTUAL -
Some DateCell text colors are grayed out
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.time.LocalDate;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.DateCell;
import javafx.scene.control.DatePicker;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;
public class DateCellDisableTest extends Application{
@Override
public void start(Stage primaryStage) throws Exception {
DatePicker datePicker = new DatePicker();
datePicker.setDayCellFactory((cell)->{
return new DateCell() {
@Override
public void updateItem(final LocalDate item, final boolean empty) {
super.updateItem(item, empty);
if (item.isBefore(LocalDate.now())) {
this.setDisable(true);
}
}
};
});
BorderPane root = new BorderPane(datePicker);
Scene scene = new Scene(root, 400, 400);
primaryStage.setScene(scene);
primaryStage.show();
}
public static void main(String[] args) {
Application.launch(args);
}
}
---------- END SOURCE ----------
java version "10" 2018-03-20
Java(TM) SE Runtime Environment 18.3 (build 10+46)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10+46, mixed mode
ADDITIONAL OS VERSION INFORMATION :
maOS High Sierra 10.13.4
A DESCRIPTION OF THE PROBLEM :
DateCell text color are not updated correctly when DateCell with disable = true is reused.
This problem has occurred in JDK 10.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1) Start the test application
2) Display the calendar popup
3) Last month click
4) Next month click
5) Next month click
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The text color of DateCell is displayed correctly
ACTUAL -
Some DateCell text colors are grayed out
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.time.LocalDate;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.DateCell;
import javafx.scene.control.DatePicker;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;
public class DateCellDisableTest extends Application{
@Override
public void start(Stage primaryStage) throws Exception {
DatePicker datePicker = new DatePicker();
datePicker.setDayCellFactory((cell)->{
return new DateCell() {
@Override
public void updateItem(final LocalDate item, final boolean empty) {
super.updateItem(item, empty);
if (item.isBefore(LocalDate.now())) {
this.setDisable(true);
}
}
};
});
BorderPane root = new BorderPane(datePicker);
Scene scene = new Scene(root, 400, 400);
primaryStage.setScene(scene);
primaryStage.show();
}
public static void main(String[] args) {
Application.launch(args);
}
}
---------- END SOURCE ----------
- duplicates
-
JDK-8201310 Disabled menu item continue to look disabled after being enabled
-
- Closed
-
-
JDK-8204949 Invalid JavaFX element rendering after binding disableProperty on Java 10
-
- Closed
-
-
JDK-8208078 Button is not rendered as "enabled" only on Dialog not Stage
-
- Closed
-
- relates to
-
JDK-8177636 Reduce frequency of CSS resetting properties temporarily to initial state
-
- Resolved
-