modules/controls/src/test/java/javafx/scene/control/skin/ButtonSkinTest.java
Print this page
rev 9240 : 8076423: JEP 253: Prepare JavaFX UI Controls & CSS APIs for Modularization
*** 21,39 ****
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
! package com.sun.javafx.scene.control.skin;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import javafx.geometry.Insets;
import javafx.scene.control.Button;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.stage.Stage;
import javafx.scene.input.Mnemonic;
import javafx.collections.ObservableList;
import javafx.scene.input.KeyCombination;
--- 21,42 ----
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
! package javafx.scene.control.skin;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
+
+ import javafx.beans.value.ObservableValue;
import javafx.geometry.Insets;
import javafx.scene.control.Button;
import javafx.scene.Group;
import javafx.scene.Scene;
+ import javafx.scene.control.skin.ButtonSkin;
import javafx.stage.Stage;
import javafx.scene.input.Mnemonic;
import javafx.collections.ObservableList;
import javafx.scene.input.KeyCombination;
*** 146,157 ****
int propertyChangeCount = 0;
public ButtonSkinMock(Button button) {
super(button);
}
! @Override protected void handleControlPropertyChanged(String p) {
! super.handleControlPropertyChanged(p);
propertyChanged = true;
propertyChangeCount++;
}
}
}
--- 149,161 ----
int propertyChangeCount = 0;
public ButtonSkinMock(Button button) {
super(button);
}
! public void addWatchedProperty(ObservableValue<?> p) {
! p.addListener(o -> {
propertyChanged = true;
propertyChangeCount++;
+ });
}
}
}