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


Java JXMonthView.setName方法代码示例

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

示例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);

    }
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:42,代码来源:MonthViewExtDemo.java


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