当前位置: 首页>>代码示例>>Java>>正文


Java JXMonthView.updateUI方法代码示例

本文整理汇总了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);
}
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:17,代码来源:BasicMonthViewUITest.java

示例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());
}
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:12,代码来源:BasicMonthViewUITest.java

示例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());
}
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:13,代码来源:BasicMonthViewUITest.java

示例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());
}
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:13,代码来源:BasicMonthViewUITest.java

示例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());
}
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:13,代码来源:BasicMonthViewUITest.java

示例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());
}
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:16,代码来源:BasicMonthViewUITest.java


注:本文中的org.jdesktop.swingx.JXMonthView.updateUI方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。