modules/controls/src/test/java/javafx/scene/control/skin/ToggleButtonSkinTest.java
Print this page
rev 9240 : 8076423: JEP 253: Prepare JavaFX UI Controls & CSS APIs for Modularization
*** 1,7 ****
/*
! * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 21,33 ****
* 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 javafx.geometry.Insets;
import javafx.scene.control.ToggleButton;
import org.junit.Before;
import org.junit.Test;
--- 21,35 ----
* 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 javafx.beans.value.ObservableValue;
import javafx.geometry.Insets;
import javafx.scene.control.ToggleButton;
import org.junit.Before;
import org.junit.Test;
*** 63,74 ****
int propertyChangeCount = 0;
public ToggleButtonSkinMock(ToggleButton togglebutton) {
super(togglebutton);
}
! @Override protected void handleControlPropertyChanged(String p) {
! super.handleControlPropertyChanged(p);
propertyChanged = true;
propertyChangeCount++;
}
}
}
--- 65,77 ----
int propertyChangeCount = 0;
public ToggleButtonSkinMock(ToggleButton togglebutton) {
super(togglebutton);
}
! public void addWatchedProperty(ObservableValue<?> p) {
! p.addListener(o -> {
propertyChanged = true;
propertyChangeCount++;
+ });
}
}
}