< prev index next >

modules/controls/src/main/java/javafx/scene/control/Tooltip.java

Print this page

        

*** 26,35 **** --- 26,36 ---- package javafx.scene.control; import com.sun.javafx.beans.IDProperty; import com.sun.javafx.css.StyleManager; + import com.sun.javafx.scene.NodeHelper; import com.sun.javafx.stage.PopupWindowHelper; import javafx.css.SimpleStyleableBooleanProperty; import javafx.css.SimpleStyleableDoubleProperty; import javafx.css.SimpleStyleableObjectProperty;
*** 266,276 **** } private final ObjectProperty<Font> font = new StyleableObjectProperty<Font>(Font.getDefault()) { private boolean fontSetByCss = false; @Override public void applyStyle(StyleOrigin newOrigin, Font value) { ! // RT-20727 - if CSS is setting the font, then make sure invalidate doesn't call impl_reapplyCSS try { // super.applyStyle calls set which might throw if value is bound. // Have to make sure fontSetByCss is reset. fontSetByCss = true; super.applyStyle(newOrigin, value); --- 267,277 ---- } private final ObjectProperty<Font> font = new StyleableObjectProperty<Font>(Font.getDefault()) { private boolean fontSetByCss = false; @Override public void applyStyle(StyleOrigin newOrigin, Font value) { ! // RT-20727 - if CSS is setting the font, then make sure invalidate doesn't call NodeHelper.reapplyCSS try { // super.applyStyle calls set which might throw if value is bound. // Have to make sure fontSetByCss is reset. fontSetByCss = true; super.applyStyle(newOrigin, value);
*** 292,302 **** @Override protected void invalidated() { // RT-20727 - if font is changed by calling setFont, then // css might need to be reapplied since font size affects // calculated values for styles with relative values if(fontSetByCss == false) { ! Tooltip.this.bridge.impl_reapplyCSS(); } } @Override public CssMetaData<Tooltip.CSSBridge,Font> getCssMetaData() { return FONT; --- 293,303 ---- @Override protected void invalidated() { // RT-20727 - if font is changed by calling setFont, then // css might need to be reapplied since font size affects // calculated values for styles with relative values if(fontSetByCss == false) { ! NodeHelper.reapplyCSS(Tooltip.this.bridge); } } @Override public CssMetaData<Tooltip.CSSBridge,Font> getCssMetaData() { return FONT;
< prev index next >