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


Java PanelBuilder.setBorder方法代码示例

本文整理汇总了Java中com.jgoodies.forms.builder.PanelBuilder.setBorder方法的典型用法代码示例。如果您正苦于以下问题:Java PanelBuilder.setBorder方法的具体用法?Java PanelBuilder.setBorder怎么用?Java PanelBuilder.setBorder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.jgoodies.forms.builder.PanelBuilder的用法示例。


在下文中一共展示了PanelBuilder.setBorder方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createPainterPropertiesPanel

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
/**
     * @param painterControlPanel
     * @return
     */
    private JXPanel createPainterPropertiesPanel() {
        basePainterControlPanel = createBasePainterControlPanel();
        layoutPainterControlPanel = createLayoutPainterControl();
        areaPainterControlPanel = createAreaPainterControlPanel();
        JXPanel properties = new JXPanel();
        FormLayout formLayout = new FormLayout(
                " f:d:n, l:4dlu:n, f:d:n, l:4dlu:n, f:d:n ", // columns
                "t:d:n " 
        ); // rows
        
        PanelBuilder builder = new PanelBuilder(formLayout, properties);
        builder.setBorder(Borders.DLU4_BORDER);
        CellConstraints cl = new CellConstraints();
//        CellConstraints cc = new CellConstraints();
        int currentColumn = 1;
        builder.add(basePainterControlPanel, cl.xy(currentColumn, 1));
        currentColumn +=2;
        builder.add(layoutPainterControlPanel, cl.xy(currentColumn, 1));
        currentColumn +=2;
        builder.add(areaPainterControlPanel, cl.xy(currentColumn, 1));
        currentColumn +=2;
        return properties;
    }
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:28,代码来源:PainterDemo.java

示例2: createMonthViewDemo

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的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

示例3: getSettings

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
private Component getSettings() {
	FormLayout layout = new FormLayout("right:max(72dlu;p), 10dlu, 75dlu, 10dlu", "5dlu, p, 5dlu");
       PanelBuilder builder = new PanelBuilder(layout);
       builder.setDefaultDialogBorder();
       builder.setBorder(new TitledBorder("Settings"));
       
       Vector<Direction> vec = new Vector<Direction>();
       vec.add(Direction.BOTH);
       vec.add(Direction.SOURCE);
       vec.add(Direction.TARGET);
       cbDirection = new JComboBox(vec);
       cbDirection.setSelectedIndex(0);
       
       builder.add(new JLabel("Select direction"), cc.xy(1, 2));
       builder.add(cbDirection, cc.xy(3, 2));
       return builder.getPanel();
}
 
开发者ID:CyTargetLinker,项目名称:cytargetlinker,代码行数:18,代码来源:ExtensionDialog.java

示例4: initComponents

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
private void initComponents() {
        list = new JXList();
        list.setName("list");

        JPanel monthViewContainer = new JXPanel();
        FormLayout formLayout = new FormLayout(
                "5dlu, f:d:g ", // l:4dlu:n, f:d:g", // columns
                "c:d:n " +
                ", t:4dlu:n, f:d:g " +
                ", 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("listSeparator");
        builder.add(areaSeparator, cc.xywh(1, 1, 2, 1));
        builder.add(new JScrollPane(list), cc.xywh(2, 3, 1, 1));
        
        
        add(monthViewContainer, BorderLayout.CENTER);
        
        JComponent extended = createExtendedConfigPanel();
        add(extended, BorderLayout.EAST);
    }
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:30,代码来源:XListDemo.java

示例5: buildControl

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
private JComponent buildControl() {
    // COLUMN SPECS:
    // r:p:n, l:4dluX:n, f:max(p;100dluX):n, l:4dluX:n, f:max(p;50dluX):n
    // ROW SPECS:
    // c:d:n, t:4dluY:n, c:d:n
    //
    // COLUMN GROUPS: {}
    // ROW GROUPS: {}
    //
    // COMPONENT CONSTRAINTS
    // ( 1, 1, 1, 1, "d=r, d=c"); javax.swing.JLabel "Modus"; name=modus
    // ( 3, 1, 3, 1, "d=f, d=c"); javax.swing.JPanel; name=moduscontrol
    // ( 1, 3, 1, 1, "d=r, d=c"); javax.swing.JLabel "Input"; name=input
    // ( 3, 3, 1, 1, "d=f, d=c"); javax.swing.JTextField; name=searchText
    // ( 5, 3, 1, 1, "d=f, d=c"); de.kleopatra.view.JButton; name=next
    //

    FormLayout formLayout = new FormLayout(
            "r:p:n, l:4dlu:n, f:max(p;100dlu):n, l:4dlu:n, f:max(p;50dlu):n", // columns
            "c:d:n, t:4dlu:n, c:d:n, t:4dlu:n, c:d:n"); // rows
    JXPanel control = new JXPanel();
    PanelBuilder builder = new PanelBuilder(formLayout, control);
    builder.setBorder(Borders.BUTTON_BAR_GAP_BORDER);
    CellConstraints cl = new CellConstraints();
    CellConstraints cc = new CellConstraints();
    radioGroupLabel = builder.addLabel("", cl.xywh(1, 1, 1, 1), radioGroup, cc.xywh(3,
            1, 3, 1));
    inputTextLabel = builder.addLabel("", cl.xywh(1, 3, 1, 1), inputText, cc
            .xywh(3, 3, 1, 1));
    patternLabel = builder.addLabel("", cl.xywh(1, 5, 1, 1), patternText, cc.xywh(
            3, 5, 1, 1));
    builder.add(nextButton, cc.xywh(5, 3, 1, 1));
    return control;
}
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:35,代码来源:DecoratorDemo.java

示例6: buildUI

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
public void buildUI() {
    FormLayout layout = new FormLayout("4dlu, pref, 4dlu", 
            "4dlu,pref,4dlu,pref,4dlu, pref,4dlu,pref,4dlu");
            //1    2    3    4    5     6    7   8    9 
    CellConstraints cc = new CellConstraints();
    PanelBuilder pb = new PanelBuilder(layout);        
    deleteAll = new JRadioButton("Delete all content");        
    moveContent = new JRadioButton("Move to:");
    // default to move the contents
    moveContent.setSelected(true);
    moveTo = new JComboBox();
    List<PlFolder> folders = new ArrayList<PlFolder>();
    folders.addAll(session.getCurrentFolderParent().getChildren(PlFolder.class));
    folders.remove(folder);
    moveTo.setModel(new DefaultComboBoxModel(folders.toArray()));
    moveTo.setRenderer(new MatchMakerObjectComboBoxCellRenderer());
    okButton = new JButton(okAction);
    cancelButton = new JButton(cancelAction);
    
    group = new ButtonGroup();
    group.add(deleteAll);
    group.add(moveContent);
    pb.add(deleteAll, cc.xy(2,2));
    pb.add(moveContent, cc.xy(2,4));
    pb.add(moveTo, cc.xy(2,6));
    
    if (folders.size() == 0) {
    	moveContent.setEnabled(false);
    	moveTo.setEnabled(false);
    	deleteAll.setSelected(true);
    }
    
    pb.add(ButtonBarFactory.buildOKCancelBar(okButton, cancelButton), cc.xy(2,8));
    
    dialog = new JDialog(parent,"Delete " + folder.getName() + " folder");
    pb.setBorder(new EmptyBorder(10,10,10,10));
    dialog.setContentPane(pb.getPanel());
    
}
 
开发者ID:SQLPower,项目名称:power-matchmaker,代码行数:40,代码来源:DeleteFolderDialog.java

示例7: getTargetPanel

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
private Component getTargetPanel() {
	FormLayout layout = new FormLayout("right:max(72dlu;p), 10dlu, 75dlu, 5dlu, p, 10dlu", "5dlu, p, 10dlu");
       PanelBuilder builder = new PanelBuilder(layout);
       builder.setDefaultDialogBorder();
       builder.setBorder(new TitledBorder("Directory containg RegINs"));
       builder.addLabel("Select RegINs", cc.xy(1, 2));

       dirField = new JTextField();
       if(!CyTargetLinkerProperty.CTL_RegIN_DIRECTORY.equals("")) {
       	dirField.setText(CyTargetLinkerProperty.CTL_RegIN_DIRECTORY);
       	getRegINFiles();
       }
       	
       dirField.setEditable(false);
       builder.add(dirField,cc.xy(3, 2));
       
       
       JButton browseButton = new JButton("Browse");
       browseButton.addActionListener(new ActionListener() { 
       	@Override
       	public void actionPerformed(ActionEvent e) {
       		JFileChooser chooser = new JFileChooser();
       		chooser.setDialogTitle("Select directory containing RegINs");
       		chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
       		if (chooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
       			File dir = chooser.getSelectedFile();
       			dirField.setText(dir.getAbsolutePath());
       			CyTargetLinkerProperty.updateProperty(dir.getAbsolutePath());
       			getRegINFiles();
       		}
       	}
       });
       builder.add(browseButton, cc.xy(5, 2));
       
       return builder.getPanel();
}
 
开发者ID:CyTargetLinker,项目名称:cytargetlinker,代码行数:37,代码来源:ExtensionDialog.java

示例8: getUserPanel

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
private Component getUserPanel() {
	FormLayout layout = new FormLayout("right:max(72dlu;p), 10dlu, 75dlu, 10dlu", "5dlu, p, 5dlu, p, 5dlu, p, 15dlu");
       PanelBuilder builder = new PanelBuilder(layout);
       builder.setDefaultDialogBorder();
       builder.setBorder(new TitledBorder("User Network"));
       
       builder.addLabel("Select User Network", cc.xy(1, 2));
       Vector<NetworkName> vec = getNetworks();
       int current = 0;
       for(int i = 0; i < vec.size(); i++) {
       	if(plugin.getCyApplicationManager().getCurrentNetwork().equals(vec.get(i).getNetwork())) {
       		current = i;
       		break;
       	}
       }
       networkComboBox = new JComboBox(vec);
       networkComboBox.setSelectedIndex(current);
       ComboboxToolTipRenderer rendererNetwork = new ComboboxToolTipRenderer();
       networkComboBox.setRenderer(rendererNetwork);
       rendererNetwork.setTooltips(getTooltips(vec));
       networkComboBox.addActionListener(new ActionListener() {
		
		@Override
		public void actionPerformed(ActionEvent e) {
			NetworkName nn = (NetworkName) networkComboBox.getSelectedItem();
			updateIdAttribute(nn.getNetwork());
		}
       });
       builder.add(networkComboBox, cc.xy(3, 2));
       
       builder.addLabel("Select your network attribute", cc.xy(1, 4));
       idAttribute = new JComboBox();
       updateIdAttribute(vec.get(current).getNetwork());
       builder.add(idAttribute, cc.xy(3, 4));
       
       return builder.getPanel();
}
 
开发者ID:CyTargetLinker,项目名称:cytargetlinker,代码行数:38,代码来源:ExtensionDialog.java

示例9: createExtendedConfigPanel

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
private JComponent createExtendedConfigPanel() {
    JXCollapsiblePane painterControl = new JXCollapsiblePane();
    FormLayout formLayout = new FormLayout(
            "5dlu, r:d:n, l:4dlu:n, f:d:g", // , l:4dlu:n, f:d:g", // columns
            "c:d:n " +
            ", t:4dlu:n, c:d:n " +
            ", t:4dlu:n, c:d:n" +
            ", t:4dlu:n, c:d:n" +
            ", t:4dlu:n, c: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, painterControl);
    builder.setBorder(Borders.DLU4_BORDER);
    CellConstraints cl = new CellConstraints();
    CellConstraints cc = new CellConstraints();
    
    JXTitledSeparator areaSeparator = new JXTitledSeparator();
    areaSeparator.setName("extendedSeparator");
    builder.add(areaSeparator, cc.xywh(1, 1, 4, 1));
    
    int labelColumn = 2;
    int widgetColumn = labelColumn + 2;
    int currentRow = 3;

    toggleSortOrder = new JButton();
    toggleSortOrder.setName("toggleSortOrder");
    builder.add(toggleSortOrder, cc.xywh(labelColumn, currentRow, 3, 1));
    currentRow += 2;
    
    resetSortOrder = new JButton();
    resetSortOrder.setName("resetSortOrder");
    builder.add(resetSortOrder, cc.xywh(labelColumn, currentRow, 3, 1));
    currentRow += 2;
    
    comparatorCombo = new JComboBox();
    comparatorCombo.setName("comparatorCombo");
    JLabel comparatorComboLabel = builder.addLabel(
            "", cl.xywh(labelColumn, currentRow, 1, 1),
            comparatorCombo, cc.xywh(widgetColumn, currentRow, 1, 1));
    comparatorComboLabel.setName("comparatorComboLabel");
    LabelHandler.bindLabelFor(comparatorComboLabel, comparatorCombo);
    currentRow += 2;
    
    currentRow += 2;
    JXTitledSeparator rolloverSeparator = new JXTitledSeparator();
    rolloverSeparator.setName("rolloverSeparator");
    builder.add(rolloverSeparator, cc.xywh(1, currentRow, 4, 1));
    currentRow += 2;

      rolloverEnabledBox = new JCheckBox();
      rolloverEnabledBox.setName("rolloverBox");
      builder.add(rolloverEnabledBox, cc.xywh(labelColumn, currentRow, 3, 1));
      currentRow += 2;
      
      highlighterCombo = new JComboBox();
      highlighterCombo.setName("highlighterCombo");
      JLabel highlighterComboLabel = builder.addLabel(
              "", cl.xywh(labelColumn, currentRow, 1, 1),
              highlighterCombo, cc.xywh(widgetColumn, currentRow, 1, 1));
      highlighterComboLabel.setName("highlighterComboLabel");
      LabelHandler.bindLabelFor(highlighterComboLabel, highlighterCombo);
      currentRow += 2;

    return painterControl;
}
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:68,代码来源:XListDemo.java

示例10: initComponents

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
private void initComponents() {
    setLayout(new BorderLayout());
    

    JPanel monthViewContainer = new JXPanel();
    FormLayout formLayout = new FormLayout(
            "5dlu, r:d:g, l:4dlu:n, f:d:g", // columns
            "c: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("listSeparator");
    builder.add(areaSeparator, cc.xywh(1, 1, 4, 1));

    int labelColumn = 2;
    int widgetColumn = labelColumn + 2;
    int currentRow = 3;

    //creates a new picker and sets the current date to today
    datePicker = new JXDatePicker(new Date());
    datePicker.setName("datePicker");
    JLabel datePickerLabel = builder.addLabel(
            "", cl.xywh(labelColumn, currentRow, 1, 1),
            datePicker, cc.xywh(widgetColumn, currentRow, 1, 1));
    datePickerLabel.setName("datePickerLabel");
    LabelHandler.bindLabelFor(datePickerLabel, datePicker);
    currentRow += 2;
    
    dateEchoField = new JFormattedTextField();
    dateEchoField.setName("dateEchoField");
    JLabel dateEchoLabel = builder.addLabel(
            "", cl.xywh(labelColumn, currentRow, 1, 1),
            dateEchoField, cc.xywh(widgetColumn, currentRow, 1, 1));
    dateEchoLabel.setName("dateEchoLabel");
    LabelHandler.bindLabelFor(dateEchoLabel, dateEchoField);
    currentRow += 2;
    
    add(monthViewContainer, BorderLayout.CENTER);
    
    JComponent panel = createControlPanel();
    
    add(panel, BorderLayout.SOUTH);
}
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:51,代码来源:DatePickerDemo.java

示例11: createControlPanel

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
/**
     * @return
     */
    private JComponent createControlPanel() {
        JPanel painterControl = new JXPanel();

        FormLayout formLayout = new FormLayout(
                "5dlu, r:d:n, l:4dlu:n, f:d:g", // , l:4dlu:n, f:d:g", // columns
                "c:d:n " +
                ", t:4dlu:n, c:d:n " +
                ", t:4dlu:n, c:d:n" +
                ", t:4dlu:n, c:d:n" +
                ", t:4dlu:n, c: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, painterControl);
        builder.setBorder(Borders.DLU4_BORDER);
        CellConstraints cl = new CellConstraints();
        CellConstraints cc = new CellConstraints();
        
        JXTitledSeparator areaSeparator = new JXTitledSeparator();
        areaSeparator.setName("propertySeparator");
        builder.add(areaSeparator, cc.xywh(1, 1, 4, 1));
        
        int labelColumn = 2;
        int widgetColumn = labelColumn + 2;
        int currentRow = 3;


        
        interactivity = new JCheckBox();
        interactivity.setName("interactivity");
        builder.add(interactivity, cc.xywh(labelColumn, currentRow, 3, 1));
        currentRow += 2;

//        painterControl.add(interactivity);
        
        editability = new JCheckBox();
        editability.setName("editability");
        builder.add(editability, cc.xywh(labelColumn, currentRow, 3, 1));
        currentRow += 2;
        
//        painterControl.add(editability);
        
        orientation = new JCheckBox();
        orientation.setName("orientation");

        builder.add(orientation, cc.xywh(labelColumn, currentRow, 3, 1));
        currentRow += 2;

        //should be able to set this from properties file
        orientation.setSelected(!datePicker.getComponentOrientation().isLeftToRight());
//        painterControl.add(orientation);
        return painterControl;
    }
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:58,代码来源:DatePickerDemo.java

示例12: createMonthViewDemo

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的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

示例13: createExtendedConfigPanel

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
/**
 * @return
 */
private JComponent createExtendedConfigPanel() {
    JXCollapsiblePane painterControl = new JXCollapsiblePane();
    FormLayout formLayout = new FormLayout(
            "5dlu, r:d:n, l:4dlu:n, f:d:n, l:4dlu:n, f:d:n", // columns
            "c:d:n " +
            ", t:4dlu:n, c: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, painterControl);
    builder.setBorder(Borders.DLU4_BORDER);
    CellConstraints cl = new CellConstraints();
    CellConstraints cc = new CellConstraints();
    
    JXTitledSeparator areaSeparator = new JXTitledSeparator();
    areaSeparator.setName("extendedSeparator");
    builder.add(areaSeparator, cc.xywh(1, 1, 4, 1));
    
    int labelColumn = 2;
    int widgetColumn = labelColumn + 2;
    int currentRow = 3;

    
    calendarBox = new JCheckBox();
    calendarBox.setName("calendarBox");
    builder.add(calendarBox, cc.xywh(labelColumn, currentRow, 3, 1));
    currentRow += 2;
    
    zoomableBox = new JCheckBox();
    zoomableBox.setName("zoomableBox");
    builder.add(zoomableBox, cc.xywh(labelColumn, currentRow, 3, 1));
    currentRow += 2;

    customHeaderBox = new JComboBox();
    customHeaderBox.setName("customHeaderBox");
    JLabel headerBoxLabel = builder.addLabel(
            "", cl.xywh(labelColumn, currentRow, 1, 1),
            customHeaderBox, cc.xywh(widgetColumn, currentRow, 1, 1));
    headerBoxLabel.setName("customHeaderBoxLabel");
    LabelHandler.bindLabelFor(headerBoxLabel, customHeaderBox);
    currentRow += 2;
    
    return painterControl;
}
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:49,代码来源:MonthViewExtDemo.java

示例14: createFirstCard

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
private JXPanel createFirstCard() {
    JXPanel control = new JXPanel();
    FormLayout formLayout = new FormLayout(
            "5dlu, r:d:n, l:4dlu:n, f:d:g", // columns
            "c:d:n " +
            ", t:4dlu:n, c:d:n " +
            ", t:4dlu:n, c: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, control);
    builder.setBorder(Borders.DIALOG_BORDER);
    CellConstraints cl = new CellConstraints();
    CellConstraints cc = new CellConstraints();
    
    controlSeparator = new JXTitledSeparator();
    controlSeparator.setName("controlSeparator");
    builder.add(controlSeparator, cc.xywh(1, 1, 4, 1));
    
    int labelColumn = 2;
    int widgetColumn = labelColumn + 2;
    int currentRow = 3;
    titleField = new JTextField(20);
    titleField.setName("titleField");
    
    JLabel titleLabel = builder.addLabel("", cl.xywh(labelColumn, currentRow, 1, 1),
            titleField, cc.xywh(widgetColumn, currentRow, 1, 1));
    currentRow += 2;
    
    titleLabel.setName("titleLabel");
    LabelHandler.bindLabelFor(titleLabel, titleField);
    
    fontChooserCombo = new JComboBox();
    fontChooserCombo.setName("fontChooserCombo");
    
    JLabel fontLabel = builder.addLabel("", cl.xywh(labelColumn, currentRow, 1, 1),
            fontChooserCombo, cc.xywh(widgetColumn, currentRow, 1, 1));
    currentRow += 2;
    fontLabel.setName("fontChooserLabel");
    LabelHandler.bindLabelFor(fontLabel, fontChooserCombo);
    
    backgroundChooserCombo = new JComboBox();
    backgroundChooserCombo.setName("backgroundChooserCombo");
    
    JLabel backgroundLabel = builder.addLabel("", cl.xywh(labelColumn, currentRow, 1, 1),
            backgroundChooserCombo, cc.xywh(widgetColumn, currentRow, 1, 1));
    currentRow += 2;
    backgroundLabel.setName("backgroundChooserLabel");
    LabelHandler.bindLabelFor(backgroundLabel, backgroundChooserCombo);
    
    
    visibleBox = new JCheckBox();
    visibleBox.setName("visibleBox");
    
    builder.add(visibleBox, cc.xywh(widgetColumn, currentRow, 1, 1));
    currentRow += 2;
    return control;
}
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:60,代码来源:TitledPanelDemo.java

示例15: createAreaPainterControlPanel

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
/**
 * @return
 */
private JXCollapsiblePane createAreaPainterControlPanel() {
    JXCollapsiblePane painterControl = new JXCollapsiblePane();
    FormLayout formLayout = new FormLayout(
            "5dlu, r:d:n, l:4dlu:n, f:d:n", // columns
            "c:d:n " +
            ", t:4dlu:n, c: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, painterControl);
    builder.setBorder(Borders.DLU4_BORDER);
    CellConstraints cl = new CellConstraints();
    CellConstraints cc = new CellConstraints();
    
    areaSeparator = new JXTitledSeparator();
    areaSeparator.setName("areaPainterSeparator");
    builder.add(areaSeparator, cc.xywh(1, 1, 4, 1));
    
    int labelColumn = 2;
    int widgetColumn = labelColumn + 2;
    int currentRow = 3;
    styleBox = new JComboBox();
    styleBox.setName("styleBox");
    
    JLabel styleBoxLabel = builder.addLabel("", cl.xywh(labelColumn, currentRow, 1, 1),
            styleBox, cc.xywh(widgetColumn, currentRow, 1, 1));
    currentRow += 2;
    styleBoxLabel.setName("styleBoxLabel");
    LabelHandler.bindLabelFor(styleBoxLabel, styleBox);
    
    effectBox = new JComboBox();
    effectBox.setName("areaEffectBox");
    
    JLabel effectLabel = builder.addLabel("", cl.xywh(labelColumn, currentRow, 1, 1),
            effectBox, cc.xywh(widgetColumn, currentRow, 1, 1));
    currentRow += 2;
    effectLabel.setName("effectLabel");
    LabelHandler.bindLabelFor(effectLabel, effectBox);
    
    borderWidthSlider = new JSlider(0, 100, 0);
    borderWidthSlider.setPaintLabels(true);
    borderWidthSlider.setPaintTicks(true);
    borderWidthSlider.setMajorTickSpacing(50);
    
    JLabel insets = builder.addLabel("", cl.xywh(labelColumn, currentRow, 1, 1), borderWidthSlider,
            cc.xywh(widgetColumn, currentRow, 1, 1));
    insets.setName("borderWidthLabel");
    LabelHandler.bindLabelFor(insets, borderWidthSlider);
    currentRow += 2;
    
    paintStretchedBox = new JCheckBox();
    paintStretchedBox.setName("paintStretchedBox");
    builder.add(paintStretchedBox, cc.xywh(widgetColumn, currentRow, 1, 1));
    currentRow += 2;
    
    return painterControl;
}
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:62,代码来源:PainterDemo.java


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