本文整理汇总了Java中org.jdesktop.swingx.JXMonthView.setName方法的典型用法代码示例。如果您正苦于以下问题:Java JXMonthView.setName方法的具体用法?Java JXMonthView.setName怎么用?Java JXMonthView.setName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jdesktop.swingx.JXMonthView
的用法示例。
在下文中一共展示了JXMonthView.setName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createMonthViewDemo
import org.jdesktop.swingx.JXMonthView; //导入方法依赖的package包/类
private void createMonthViewDemo() {
monthView = new JXMonthView();
monthView.setName("monthView");
// add to container which doesn't grow the size beyond the pref
JComponent monthViewContainer = new JXPanel();
monthViewContainer.add(monthView);
JPanel monthViewControlPanel = new JXPanel();
add(monthViewControlPanel, BorderLayout.SOUTH);
FormLayout formLayout = new FormLayout(
"f:m:g, l:4dlu:n, f:m:g", // columns
"c:d:g, t:2dlu:n, t:d:n "
); // rows
PanelBuilder builder = new PanelBuilder(formLayout, this);
builder.setBorder(Borders.DLU4_BORDER);
CellConstraints cc = new CellConstraints();
builder.add(monthViewContainer, cc.xywh(1, 1, 3, 1));
builder.add(createBoxPropertiesPanel(), cc.xywh(1, 3, 1, 1));
builder.add(createConfigPanel(), cc.xywh(3, 3, 1, 1));
}
示例2: createMonthViewDemo
import org.jdesktop.swingx.JXMonthView; //导入方法依赖的package包/类
private void createMonthViewDemo() {
monthView = new JXMonthView(){
@Override
public void setZoomable(boolean zoomable) {
super.setZoomable(zoomable);
((JComponent) getParent()).revalidate();
}
};
monthView.setName("monthView");
monthView.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
JPanel monthViewContainer = new JXPanel();
FormLayout formLayout = new FormLayout(
"5dlu, c:d:n, l:4dlu:n, f:d:n", // columns
"c:d:n " +
", t:4dlu:n, t:d:n " +
", t:4dlu:n, c:d:n" +
", t:4dlu:n, c:d:n" +
", t:4dlu:n, c:d:n"
); // rows
PanelBuilder builder = new PanelBuilder(formLayout, monthViewContainer);
builder.setBorder(Borders.DLU4_BORDER);
// CellConstraints cl = new CellConstraints();
CellConstraints cc = new CellConstraints();
JXTitledSeparator areaSeparator = new JXTitledSeparator();
areaSeparator.setName("monthViewSeparator");
builder.add(areaSeparator, cc.xywh(1, 1, 4, 1));
builder.add(monthView, cc.xywh(2, 3, 1, 1));
add(monthViewContainer, BorderLayout.CENTER);
JComponent monthViewControlPanel = new JXPanel();
add(monthViewControlPanel, BorderLayout.EAST);
JComponent extended = createExtendedConfigPanel();
monthViewControlPanel.add(extended);
}