本文整理汇总了Java中javax.swing.plaf.basic.BasicPanelUI类的典型用法代码示例。如果您正苦于以下问题:Java BasicPanelUI类的具体用法?Java BasicPanelUI怎么用?Java BasicPanelUI使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
BasicPanelUI类属于javax.swing.plaf.basic包,在下文中一共展示了BasicPanelUI类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testSetUI
import javax.swing.plaf.basic.BasicPanelUI; //导入依赖的package包/类
public void testSetUI() {
ComponentUI componentUI1 = new BasicPanelUI();
ComponentUI componentUI2 = new BasicPanelUI();
panel = new JPanel();
((JPanel) panel).getUI().uninstallUI(panel);
panel.setUI(null);
PropertyChangeController changeListener = new PropertyChangeController();
panel.addPropertyChangeListener(changeListener);
panel.setUI(componentUI1);
assertEquals(componentUI1, panel.ui);
changeListener.checkPropertyFired(panel, "UI", null, componentUI1);
changeListener.reset();
panel.setUI(componentUI2);
changeListener.checkPropertyFired(panel, "UI", componentUI1, componentUI2);
changeListener.reset();
panel.setUI(componentUI2);
assertFalse(changeListener.isChanged("UI"));
}
示例2: updateUI
import javax.swing.plaf.basic.BasicPanelUI; //导入依赖的package包/类
@Override
public void
updateUI() { setUI(new BasicPanelUI()); }
示例3: updateUI
import javax.swing.plaf.basic.BasicPanelUI; //导入依赖的package包/类
@Override
public void updateUI() {
setUI(new BasicPanelUI());
updateColors();
}