< prev index next >

src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSpinnerUI.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2000, 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 --- 1,7 ---- /* ! * Copyright (c) 2000, 2018, 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
*** 214,224 **** JComponent editor = spinner.getEditor(); if (editor instanceof JSpinner.DefaultEditor) { JTextField tf = ((JSpinner.DefaultEditor) editor).getTextField(); if (tf != null) { if (tf.getFont() instanceof UIResource) { ! tf.setFont(new FontUIResource(spinner.getFont())); } } } } --- 214,225 ---- JComponent editor = spinner.getEditor(); if (editor instanceof JSpinner.DefaultEditor) { JTextField tf = ((JSpinner.DefaultEditor) editor).getTextField(); if (tf != null) { if (tf.getFont() instanceof UIResource) { ! Font font = spinner.getFont(); ! tf.setFont(font == null ? null : new FontUIResource(font)); } } } }
*** 997,1007 **** if (newEditor instanceof JSpinner.DefaultEditor) { JTextField tf = ((JSpinner.DefaultEditor)newEditor).getTextField(); if (tf != null) { if (tf.getFont() instanceof UIResource) { ! tf.setFont(new FontUIResource(spinner.getFont())); } tf.addFocusListener(nextButtonHandler); tf.addFocusListener(previousButtonHandler); } } --- 998,1009 ---- if (newEditor instanceof JSpinner.DefaultEditor) { JTextField tf = ((JSpinner.DefaultEditor)newEditor).getTextField(); if (tf != null) { if (tf.getFont() instanceof UIResource) { ! Font font = spinner.getFont(); ! tf.setFont(font == null ? null : new FontUIResource(font)); } tf.addFocusListener(nextButtonHandler); tf.addFocusListener(previousButtonHandler); } }
*** 1015,1025 **** if (editor instanceof JSpinner.DefaultEditor) { JTextField tf = ((JSpinner.DefaultEditor)editor).getTextField(); if (tf != null) { if (tf.getFont() instanceof UIResource) { ! tf.setFont(new FontUIResource(spinner.getFont())); } } } } else if (JComponent.TOOL_TIP_TEXT_KEY.equals(propertyName)) { --- 1017,1028 ---- if (editor instanceof JSpinner.DefaultEditor) { JTextField tf = ((JSpinner.DefaultEditor)editor).getTextField(); if (tf != null) { if (tf.getFont() instanceof UIResource) { ! Font font = spinner.getFont(); ! tf.setFont(font == null ? null : new FontUIResource(font)); } } } } else if (JComponent.TOOL_TIP_TEXT_KEY.equals(propertyName)) {
< prev index next >