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


Java PanelBuilder.add方法代码示例

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


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

示例1: defineLayout

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
private void defineLayout ()
{
    FormLayout layout = Panel.makeFormLayout(1, 3);
    PanelBuilder builder = new PanelBuilder(layout, getBody());

    ///builder.setDefaultDialogBorder();
    CellConstraints cst = new CellConstraints();

    int r = 1; // --------------------------------
    builder.add(mean.getLabel(), cst.xy(1, r));
    builder.add(mean.getField(), cst.xy(3, r));

    builder.add(stdDev.getLabel(), cst.xy(5, r));
    builder.add(stdDev.getField(), cst.xy(7, r));

    builder.add(threshold.getLabel(), cst.xy(9, r));
    builder.add(threshold.getField(), cst.xy(11, r));
}
 
开发者ID:Audiveris,项目名称:audiveris,代码行数:19,代码来源:BinarizationBoard.java

示例2: defineLayout

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
private void defineLayout ()
{
    final String fieldInterline = Panel.getFieldInterline();

    String colSpec = Panel.makeColumns(3);
    FormLayout layout = new FormLayout(colSpec, "pref," + fieldInterline + "," + "pref");

    PanelBuilder builder = new PanelBuilder(layout, getBody());

    ///builder.setDefaultDialogBorder();
    CellConstraints cst = new CellConstraints();

    int r = 1; // --------------------------------
    builder.add(browser.count, cst.xy(1, r));
    builder.add(browser.spinner, cst.xy(3, r));
    builder.add(selectButton, cst.xywh(7, r, 5, 3));

    r += 2; // --------------------------------
    builder.add(filterButton, cst.xyw(1, r, 3));
}
 
开发者ID:Audiveris,项目名称:audiveris,代码行数:21,代码来源:ShapeFocusBoard.java

示例3: getPluginData

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
private PanelBuilder getPluginData(BundleVersion p) {
	FormLayout layout = new FormLayout("5dlu, fill:pref:grow, 5dlu","5dlu,pref,15dlu,pref,10dlu,pref,10dlu,pref,10dlu,pref,10dlu,pref,10dlu,pref,10dlu");
	PanelBuilder builder = new PanelBuilder(layout);
	CellConstraints cc = new CellConstraints();
	builder.setBackground(Color.white);
	
	builder.addLabel(p.getBundle().getName(), cc.xy(2, 2));
	builder.addSeparator("", cc.xyw(2, 3, 1));
	builder.addLabel((p.getBundle().getName().equals(p.getBundle().getSymbolicName()) ? "Version: " + p.getVersion() : ("<html>Version: " + p.getVersion() + "<br>" + p.getBundle().getSymbolicName() + "</html>")), cc.xy(2, 4));
	builder.addLabel((p.getBundle().getShortDescription() != null ? Utils.printDescription(p.getBundle().getShortDescription(), 40) : ""), cc.xy(2, 6));
	builder.addLabel((p.getReleaseDate() != null ? "Release date: " + p.getReleaseDate() : ""), cc.xy(2, 10));

	builder.addLabel(Utils.printAuthors(p), cc.xy(2, 12));
	builder.add(getWebsiteLabel(p), cc.xy(2, 14));
	return builder;
}
 
开发者ID:PathVisio,项目名称:pathvisio,代码行数:17,代码来源:InstalledPluginsPanel.java

示例4: defineLayout

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
private int defineLayout (PanelBuilder builder,
                          CellConstraints cst,
                          int r)
{
    builder.add(label, cst.xyw(5, r, 7));

    r += 2; // --

    builder.add(id.getLabel(), cst.xy(5, r));
    builder.add(id.getField(), cst.xy(7, r));

    builder.add(name.getLabel(), cst.xy(9, r));
    builder.add(name.getField(), cst.xy(11, r));

    r += 2; // --

    builder.add(midiLabel, cst.xy(5, r));
    builder.add(midiBox, cst.xyw(7, r, 5));

    return r;
}
 
开发者ID:Audiveris,项目名称:audiveris,代码行数:22,代码来源:ScoreParameters.java

示例5: makePanel

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

		FormLayout layout = new FormLayout(
				"2dlu:grow, right:80dlu, 5dlu, 70dlu, 10dlu, 70dlu, 5dlu, 30dlu, 50dlu, 2dlu:grow",
				"30dlu, pref, 20dlu, pref, 20dlu, pref, 10dlu, pref, 10dlu, pref, 10dlu, pref, 30dlu, pref, 2dlu:grow");
		CellConstraints cc = new CellConstraints();
		pb = new PanelBuilder(layout);
		pb.setDefaultDialogBorder();

		pb.add(getCmbReport(), cc.xyw(4, 2, 3));
		pb.add(getLName(), cc.xyw(2, 4, 8, "center, center"));

		pb.addSeparator("", cc.xyw(4, 6, 3));
		pb.add(getLTfCmb(), cc.xy(2, 8));
		pb.add(getTfNumber(), cc.xyw(4, 8, 3));
		pb.add(getCmbGroup(), cc.xyw(4, 8, 3));
		pb.addLabel("Datum", cc.xy(2, 10));
		pb.add(getTfStartDate(), cc.xy(4, 10));
		pb.addLabel("-", cc.xy(5, 10, "center, center"));
		pb.add(getTfEndDate(), cc.xy(6, 10));

		pb.addLabel("Odeljenje", cc.xy(2, 12));
		pb.add(getCmbLocation(), cc.xyw(4, 12, 3));

		pb.add(getButtonPanel(), cc.xyw(2, 14, 8));
	}
 
开发者ID:unsftn,项目名称:bisis-v4,代码行数:27,代码来源:Report.java

示例6: init

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
protected void init(String labelString, List<JComponent> components)
{
	JComponent componentToAdd;
       if (components.size() == 1) {
           componentToAdd = components.get(0);
       } else {
           componentToAdd = new JPanel(new FlowLayout(0, 0, FlowLayout.CENTER));
           componentToAdd.setOpaque(false);
           for (JComponent component : components) {
               componentToAdd.add(component);
           }
       }

       // definte the FormLayout columns and rows.
       FormLayout layout = new FormLayout("p", "fill:p:grow, p");
       // create the cell constraints to use in the layout.
       CellConstraints cc = new CellConstraints();
       // create the builder with our panel as the component to be filled.
       PanelBuilder builder = new PanelBuilder(layout, new JPanel());

       builder.add(componentToAdd, cc.xy(1, 1, "center, center"));
       builder.add(createLabel(labelString), cc.xy(1, 2, "center, top"));

       fComponent = builder.getPanel();
       fComponent.setOpaque(false);
}
 
开发者ID:mathieulegoc,项目名称:SmartTokens,代码行数:27,代码来源:LabeledComponentGroup.java

示例7: buildRatingPanel

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
private void buildRatingPanel() {
    fRatingIndicators.clear();
    fComponent.removeAll();

    // definte the FormLayout columns and rows.
    FormLayout layout = new FormLayout("", "fill:p:grow");
    PanelBuilder builder = new PanelBuilder(layout, fComponent);

    for (int i = 0; i < Rating.values().length - 1; i++) {
        RatingLabel label = new RatingLabel(i);
        fRatingIndicators.add(label);

        builder.appendColumn("p");
        builder.add(label, new CellConstraints().xy(builder.getColumn(), 1));
        builder.nextColumn();
    }
}
 
开发者ID:mathieulegoc,项目名称:SmartTokens,代码行数:18,代码来源:RatingComponent.java

示例8: 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

示例9: defineLayout

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
private JPanel defineLayout ()
{
    final JPanel          comp = new JPanel();
    final FormLayout      layout = new FormLayout(
        "right:40dlu, $lcgap, fill:0:grow, $lcgap, 33dlu",
        "pref");
    final CellConstraints cst = new CellConstraints();
    final PanelBuilder    builder = new PanelBuilder(layout, comp);

    // Label on left side
    builder.addROLabel("Languages", cst.xy(1, 1));

    // "Banner" for the center of the line
    banner = new Banner();
    builder.add(banner.getComponent(), cst.xy(3, 1));

    // "Add" button on right side
    JButton button = new JButton(new AddAction());
    builder.add(button, cst.xy(5, 1));

    return comp;
}
 
开发者ID:jlpoolen,项目名称:libreveris,代码行数:23,代码来源:LangSelector.java

示例10: defineLayout

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
@Override
public int defineLayout (PanelBuilder builder,
                         CellConstraints cst,
                         int r)
{
    r = super.defineLayout(builder, cst, r);

    for (ScorePart scorePart : score.getPartList()) {
        PartPanel partPanel = new PartPanel(scorePart);
        r = partPanel.defineLayout(builder, cst, r);
        partPanels.add(partPanel);
        builder.add(partPanel, cst.xy(1, r));
        r += 2;
    }

    return r;
}
 
开发者ID:jlpoolen,项目名称:libreveris,代码行数:18,代码来源:ScoreParameters.java

示例11: defineLayout

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
private void defineLayout ()
{
    final String fieldInterline = Panel.getFieldInterline();

    String colSpec = Panel.makeColumns(3);
    FormLayout layout = new FormLayout(
            colSpec,
            "pref," + fieldInterline + "," + "pref");

    PanelBuilder builder = new PanelBuilder(layout, getBody());
    builder.setDefaultDialogBorder();

    CellConstraints cst = new CellConstraints();

    int r = 1; // --------------------------------
    builder.add(browser.count, cst.xy(1, r));
    builder.add(browser.spinner, cst.xy(3, r));
    builder.add(selectButton, cst.xywh(7, r, 5, 3));

    r += 2; // --------------------------------
    builder.add(filterButton, cst.xyw(1, r, 3));
}
 
开发者ID:jlpoolen,项目名称:libreveris,代码行数:23,代码来源:ShapeFocusBoard.java

示例12: defineLayout

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
private JPanel defineLayout ()
{
    // Prepare layout elements
    final boolean         optional = companion.getNeed() != Need.MANDATORY;
    final CellConstraints cst = new CellConstraints();
    final String          colSpec = optional ? "pref,1dlu,center:pref"
                                    : "center:pref";
    final FormLayout      layout = new FormLayout(colSpec, "center:20dlu");
    final JPanel          panel = new MyPanel();
    final PanelBuilder    builder = new PanelBuilder(layout, panel);

    // Now add the desired components, using provided order
    if (optional) {
        builder.add(needBox, cst.xy(1, 1));
        builder.add(titleLabel, cst.xy(3, 1));
    } else {
        builder.add(titleLabel, cst.xy(1, 1));
    }

    panel.setPreferredSize(new Dimension(width, HEIGHT));
    panel.setOpaque(true);

    return panel;
}
 
开发者ID:jlpoolen,项目名称:libreveris,代码行数:25,代码来源:BasicCompanionView.java

示例13: getSelectorsPanel

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
private JPanel getSelectorsPanel ()
{
    FormLayout layout = new FormLayout(
            "max(100dlu;pref),max(150dlu;pref),max(200dlu;pref):grow", // Cols
            "pref:grow"); // Rows

    PanelBuilder builder = new PanelBuilder(layout);
    builder.setDefaultDialogBorder();

    CellConstraints cst = new CellConstraints();

    int r = 1; // --------------------------------
    builder.add(folderSelector, cst.xy(1, r));
    builder.add(shapeSelector, cst.xy(2, r));
    builder.add(glyphSelector, cst.xy(3, r));

    return builder.getPanel();
}
 
开发者ID:jlpoolen,项目名称:libreveris,代码行数:19,代码来源:SampleVerifier.java

示例14: setupDetails

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
protected void setupDetails()
{
   FormLayout layout = new FormLayout("2dlu, l:p, 4dlu, f:p:g, 2dlu", 
      "4dlu, p, 8dlu, p, 8dlu, p, 4dlu, p, 4dlu");
   PanelBuilder builder = new PanelBuilder(layout);
   CellConstraints cc = new CellConstraints();

   int row = 2;
   builder.addLabel(I18n.getMessage("ParameterTypeValue.name") + ':', cc.rcw(row, 2, 3));

   row = 4;
   builder.addLabel(I18n.getMessage("ParameterTypeValue.value"), cc.rc(row, 2));
   builder.add(valueField, cc.rc(row, 4));

   row = 6;
   builder.addLabel(I18n.getMessage("ParameterTypeValue.order"), cc.rc(row, 2));
   builder.add(orderField, cc.rc(row, 4));

   splitPane.setRightComponent(new JScrollPane(builder.build()));

   labelElems = MultiLingualTextUtil.createFormElements(builder, 3);
}
 
开发者ID:selfbus,项目名称:development-tools-incubation,代码行数:23,代码来源:ParameterTypeValues.java

示例15: defineLayout

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
private void defineLayout ()
{
    FormLayout layout = Panel.makeFormLayout(1, 3);
    PanelBuilder builder = new PanelBuilder(layout, getBody());
    builder.setDefaultDialogBorder();

    CellConstraints cst = new CellConstraints();
    int r = 1; // --------------------------------

    builder.add(rStart.getLabel(), cst.xy(1, r));
    builder.add(rStart.getField(), cst.xy(3, r));

    builder.add(rLength.getLabel(), cst.xy(5, r));
    builder.add(rLength.getField(), cst.xy(7, r));

    builder.add(rLevel.getLabel(), cst.xy(9, r));
    builder.add(rLevel.getField(), cst.xy(11, r));
}
 
开发者ID:jlpoolen,项目名称:libreveris,代码行数:19,代码来源:RunBoard.java


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