本文整理汇总了Java中org.jdesktop.swingx.JXMonthView.updateUI方法的典型用法代码示例。如果您正苦于以下问题:Java JXMonthView.updateUI方法的具体用法?Java JXMonthView.updateUI怎么用?Java JXMonthView.updateUI使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jdesktop.swingx.JXMonthView
的用法示例。
在下文中一共展示了JXMonthView.updateUI方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testZoomableUpdateUIKeepsCalendarHeader
import org.jdesktop.swingx.JXMonthView; //导入方法依赖的package包/类
/**
* Issue #1046-swingx: month title not updated when traversing months
* (programatically or by navigating in monthView)
*/
@Test
public void testZoomableUpdateUIKeepsCalendarHeader() {
JXMonthView monthView = new JXMonthView();
monthView.setZoomable(true);
monthView.updateUI();
// digging into internals
Component header = monthView.getComponent(0);
if (header instanceof CellRendererPane) {
header = (Container) monthView.getComponent(1);
}
assertTrue("expected BasicCalendarHeader but was " + header.getClass(), header instanceof BasicCalendarHeaderHandler.BasicCalendarHeader);
}
示例2: testTodayUpdate
import org.jdesktop.swingx.JXMonthView; //导入方法依赖的package包/类
/**
* Issue 711-swingx: today notify-only property.
* Changed to read-only in monthView
*/
@Test
public void testTodayUpdate() {
JXMonthView monthView = new JXMonthView();
Date first = ((BasicMonthViewUI) monthView.getUI()).getToday();
monthView.updateUI();
assertEquals(first, ((BasicMonthViewUI) monthView.getUI()).getToday());
}
示例3: testZeroFirstDisplayedDate
import org.jdesktop.swingx.JXMonthView; //导入方法依赖的package包/类
/**
* Issue ??-swingx: zero millis are valid.
*
* bad marker in ui-delegate ... but looks okay?
*/
@Test
public void testZeroFirstDisplayedDate() {
JXMonthView monthView = new JXMonthView();
Date first = monthView.getUI().getLastDisplayedDay();
monthView.updateUI();
assertEquals(first, monthView.getUI().getLastDisplayedDay());
}
示例4: testUpdateUILast
import org.jdesktop.swingx.JXMonthView; //导入方法依赖的package包/类
/**
* Issue #708-swingx: updateUI changes state.
*
* Here: test that lastDisplayedDate is unchanged.
*/
@Test
public void testUpdateUILast() {
final JXMonthView monthView = new JXMonthView();
Date first = monthView.getUI().getLastDisplayedDay();
monthView.updateUI();
assertEquals(first, monthView.getUI().getLastDisplayedDay());
}
示例5: testUpdateUIFirstYear
import org.jdesktop.swingx.JXMonthView; //导入方法依赖的package包/类
/**
* Issue #708-swingx: updateUI changes state.
*
* Here: test that firstDisplayedYear is unchanged.
*/
@Test
public void testUpdateUIFirstYear() {
final JXMonthView monthView = new JXMonthView();
long first = ((BasicMonthViewUI) monthView.getUI()).getFirstDisplayedYear();
monthView.updateUI();
assertEquals(first, ((BasicMonthViewUI) monthView.getUI()).getFirstDisplayedYear());
}
示例6: testUpdateUIFirstMonth
import org.jdesktop.swingx.JXMonthView; //导入方法依赖的package包/类
/**
* Issue #708-swingx: updateUI changes state.
*
* Here: test that firstDisplayedMonth is unchanged.
*/
@Test
public void testUpdateUIFirstMonth() {
Calendar cal = Calendar.getInstance();
cal.set(Calendar.MONTH, 5);
// need to instantiate with a month different from jan
final JXMonthView monthView = new JXMonthView(cal.getTime());
long first = ((BasicMonthViewUI) monthView.getUI()).getFirstDisplayedMonth();
monthView.updateUI();
assertEquals(first, ((BasicMonthViewUI) monthView.getUI()).getFirstDisplayedMonth());
}