-
Bug
-
Resolution: Won't Fix
-
P3
-
fx2.0
Glass mode handles cursor changes incorrectly
In these code fragment I try to change cursor shape according to application state. However application behaves as expected as when button is pressed there is no change until I release the button, when is cursor changed to "hand" shape, another press change it to "Default" and release back to "Hand" - basically oposit of expected behaviour. When you move cursor while in (wrong) "Hand" mode it will change to "Default" shape.
Swing mode doesn't help much either. It doesn't change to the wrong shape but you must move mouse to get the proper shape
whiteRect.setOnMousePressed(new MouseListener() {
public void onEvent(MouseEvent me) {
whiteRect.setCursor(Cursor.HAND);
}
});
whiteRect.setOnMouseReleased(new MouseListener() {
public void onEvent(MouseEvent me) {
whiteRect.setCursor(Cursor.DEFAULT);
}
});
In these code fragment I try to change cursor shape according to application state. However application behaves as expected as when button is pressed there is no change until I release the button, when is cursor changed to "hand" shape, another press change it to "Default" and release back to "Hand" - basically oposit of expected behaviour. When you move cursor while in (wrong) "Hand" mode it will change to "Default" shape.
Swing mode doesn't help much either. It doesn't change to the wrong shape but you must move mouse to get the proper shape
whiteRect.setOnMousePressed(new MouseListener() {
public void onEvent(MouseEvent me) {
whiteRect.setCursor(Cursor.HAND);
}
});
whiteRect.setOnMouseReleased(new MouseListener() {
public void onEvent(MouseEvent me) {
whiteRect.setCursor(Cursor.DEFAULT);
}
});
- duplicates
-
JDK-8116003 Cursor image is not updated immediately
-
- Closed
-