本文整理汇总了Java中org.jdesktop.swingx.JXList.getUI方法的典型用法代码示例。如果您正苦于以下问题:Java JXList.getUI方法的具体用法?Java JXList.getUI怎么用?Java JXList.getUI使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jdesktop.swingx.JXList
的用法示例。
在下文中一共展示了JXList.getUI方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testSortUIUpdateOnSetModel
import org.jdesktop.swingx.JXList; //导入方法依赖的package包/类
/**
* Issue 1152-swingx: JXList re-enable sorting.
*
* here: add managing ListSortUI to responsibility of XListUI.
*/
@Test
public void testSortUIUpdateOnSetModel() {
JXList list = new JXList(true);
BasicXListUI ui = (BasicXListUI) list.getUI();
ListSortUI sortUI = ui.getSortUI();
list.setModel(new DefaultListModel());
assertNotSame(sortUI, ui.getSortUI());
}
示例2: testSortUIInstalled
import org.jdesktop.swingx.JXList; //导入方法依赖的package包/类
/**
* Issue 1152-swingx: JXList re-enable sorting.
*
* here: add managing ListSortUI to responsibility of XListUI.
*/
@Test
public void testSortUIInstalled() {
JXList list = new JXList(true);
BasicXListUI ui = (BasicXListUI) list.getUI();
assertNotNull(ui.getSortUI());
}
示例3: testSynthUIX
import org.jdesktop.swingx.JXList; //导入方法依赖的package包/类
/**
* getContext(component) should throw if given component is not ours (for
* 1:1 delegate implemenations).
*
* PENDING JW: moved out of XListUITest because server doesn't know Nimbus
* back again if jdk version updated to u10+. Or: can we have conditions
* in the expected clause?
*
* @throws Exception
*/
@Test (expected=IllegalArgumentException.class)
public void testSynthUIX() throws Exception {
LookAndFeel lf = UIManager.getLookAndFeel();
try {
setLookAndFeel("Nimbus");
JXList list = new JXList();
SynthUI ui = (SynthUI) list.getUI();
ui.getContext(new JXList());
} finally {
UIManager.setLookAndFeel(lf);
}
}