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


Java CalendarHeaderHandler类代码示例

本文整理汇总了Java中org.jdesktop.swingx.plaf.basic.CalendarHeaderHandler的典型用法代码示例。如果您正苦于以下问题:Java CalendarHeaderHandler类的具体用法?Java CalendarHeaderHandler怎么用?Java CalendarHeaderHandler使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


CalendarHeaderHandler类属于org.jdesktop.swingx.plaf.basic包,在下文中一共展示了CalendarHeaderHandler类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createHeaderInfos

import org.jdesktop.swingx.plaf.basic.CalendarHeaderHandler; //导入依赖的package包/类
private ComboBoxModel createHeaderInfos() {
    // <snip> Custom CalendarHeaderHandler
    // create combo model containing handlers to choose
    DefaultComboBoxModel model = new DefaultComboBoxModel();
    model.addElement(new DisplayInfo<CalendarHeaderHandler>("base (does nothing)", null));
    model.addElement(new DisplayInfo<CalendarHeaderHandler>(
            "default",
            new SpinningCalendarHeaderHandler()));
    model.addElement(new DisplayInfo<CalendarHeaderHandler>(
            "default (customized)",
            new DemoCalendarHeaderHandler(true, true)));
    // </snip>
    return model;
    
}
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:16,代码来源:MonthViewExtDemo.java

示例2: MonthViewDemoControl

import org.jdesktop.swingx.plaf.basic.CalendarHeaderHandler; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public MonthViewDemoControl() {
    DemoUtils.setSnippet("Custom CalendarRenderingHandler", calendarBox);
    
    // <snip> Custom CalendarHeaderHandler
    // configure the comboBox
    customHeaderBox.setModel(createHeaderInfos());
    customHeaderBox.setRenderer(new DefaultListRenderer(
            DisplayValues.DISPLAY_INFO_DESCRIPTION));
    // </snip>
    
    DemoUtils.setSnippet("Custom CalendarHeaderHandler", customHeaderBox, zoomableBox);
    
    BindingGroup group = new BindingGroup();
    
    group.addBinding(Bindings.createAutoBinding(READ_WRITE, 
            calendarBox, BeanProperty.create("selected"),
            this, BeanProperty.create("calendarVisible")));
    
    group.addBinding(Bindings.createAutoBinding(READ, 
            zoomableBox, BeanProperty.create("selected"),
            monthView, BeanProperty.create("zoomable")));
    
    // <snip> Custom CalendarHeaderHandler
    // bind the combo box
    group.addBinding(Bindings.createAutoBinding(READ, 
            monthView, BeanProperty.create("zoomable"),
            customHeaderBox, BeanProperty.create("enabled")
            ));
    Binding handlerBinding = Bindings.createAutoBinding(READ,
            customHeaderBox, BeanProperty.create("selectedItem"),
            this, BeanProperty.create("calendarHeaderHandler"));
    handlerBinding.setConverter(new DisplayInfoConverter<CalendarHeaderHandler>());
    // </snip>
    group.addBinding(handlerBinding);
    group.bind();
}
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:38,代码来源:MonthViewExtDemo.java

示例3: setCalendarHeaderHandler

import org.jdesktop.swingx.plaf.basic.CalendarHeaderHandler; //导入依赖的package包/类
/**
 * @param handler the handler to set
 */
// <snip> Custom CalendarHeaderHandler
// wrapper around not yet public api: property on control for binding
public void setCalendarHeaderHandler(CalendarHeaderHandler handler) {
    Object old = getCalendarHeaderHandler();
    monthView.putClientProperty(CalendarHeaderHandler.uiControllerID, handler);
    firePropertyChange("calendarHeaderHandler", old, getCalendarHeaderHandler());
}
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:11,代码来源:MonthViewExtDemo.java

示例4: getCalendarHeaderHandler

import org.jdesktop.swingx.plaf.basic.CalendarHeaderHandler; //导入依赖的package包/类
/**
 * @return the handler
 */
public CalendarHeaderHandler getCalendarHeaderHandler() {
    return (CalendarHeaderHandler) 
        monthView.getClientProperty(CalendarHeaderHandler.uiControllerID);
}
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:8,代码来源:MonthViewExtDemo.java


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