本文整理汇总了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;
}
示例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();
}
示例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());
}
示例4: getCalendarHeaderHandler
import org.jdesktop.swingx.plaf.basic.CalendarHeaderHandler; //导入依赖的package包/类
/**
* @return the handler
*/
public CalendarHeaderHandler getCalendarHeaderHandler() {
return (CalendarHeaderHandler)
monthView.getClientProperty(CalendarHeaderHandler.uiControllerID);
}