Sets the L&F object that renders this component. This is a bound property. @param ui the TreeUI L&F object @see UIDefaults#getUI @beaninfo bound: true hidden: true attribute: visualUpdate true description: The UI object that implements the Component's Look
(TreeUI ui)
| 693 | * description: The UI object that implements the Component's LookAndFeel. |
| 694 | */ |
| 695 | public void setUI(TreeUI ui) { |
| 696 | if(org.opensourcephysics.js.JSUtil.isJS) { // WC: User interface not supported in JavaScript |
| 697 | settingUI = false; |
| 698 | return; |
| 699 | } |
| 700 | if (this.ui != ui) { |
| 701 | settingUI = true; |
| 702 | uiTreeExpansionListener = null; |
| 703 | try { |
| 704 | super.setUI(ui); |
| 705 | } |
| 706 | finally { |
| 707 | settingUI = false; |
| 708 | } |
| 709 | } |
| 710 | } |
| 711 | |
| 712 | /** |
| 713 | * Notification from the <code>UIManager</code> that the L&F has changed. |