equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
258 |
258 |
259 private static class PropertyChangeHandler implements |
259 private static class PropertyChangeHandler implements |
260 PropertyChangeListener { |
260 PropertyChangeListener { |
261 public void propertyChange(PropertyChangeEvent e) { |
261 public void propertyChange(PropertyChangeEvent e) { |
262 String name = e.getPropertyName(); |
262 String name = e.getPropertyName(); |
263 if (name.equals("tiptext") || "font".equals(name) || |
263 if (name.equals("tiptext") || "foreground".equals(name) |
264 "foreground".equals(name) || |
264 || "font".equals(name) || SwingUtilities2.isScaleChanged(e)) { |
265 "ancestor" == name || "graphicsConfiguration" == name) { |
|
266 // remove the old html view client property if one |
265 // remove the old html view client property if one |
267 // existed, and install a new one if the text installed |
266 // existed, and install a new one if the text installed |
268 // into the JLabel is html source. |
267 // into the JLabel is html source. |
269 JToolTip tip = ((JToolTip) e.getSource()); |
268 JToolTip tip = ((JToolTip) e.getSource()); |
270 String text = tip.getTipText(); |
269 String text = tip.getTipText(); |