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


Java PanelBuilder.border方法代码示例

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


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

示例1: buildPanel

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
public JPanel buildPanel() {
	FormLayout layout = new FormLayout("left:pref, 400:grow");
	PanelBuilder builder = new PanelBuilder(layout);
	builder.border(new EmptyBorder(10, 10, 10, 10));
	int y = 0;

	builder.appendRow(rspec);
	editBar = new JPanel();
	editBar.setLayout(new BoxLayout(editBar, BoxLayout.X_AXIS));
	builder.add(editBar, cc.xyw(1, ++y, 2));
	if (/*renderer.loaded &&*/ !renderer.isFileless()) {
		buildEditBar(false);
	}
	builder.appendRow(rspec);
	builder.addLabel(" ", cc.xy(1, ++y));

	y = addMap(renderer.getDetails(), builder, y);
	if (renderer.isUpnp()) {
		y = addStrings("Services", WordUtils.wrap(StringUtils.join(renderer.getUpnpServices(), ", "), 60).split("\n"),
			builder, y);
	}

	if (renderer.isControllable()) {
		builder.appendRow(rspec);
		builder.addLabel(" ", cc.xy(1, ++y));
		builder.appendRow(rspec);
		builder.addSeparator(Messages.getString("RendererPanel.1"), cc.xyw(1, ++y, 2));
		builder.appendRow(rspec);
		builder.add(new PlayerControlPanel(renderer.getPlayer()), cc.xyw(1, ++y, 2));
	}
	return builder.getPanel();
}
 
开发者ID:DigitalMediaServer,项目名称:DigitalMediaServer,代码行数:33,代码来源:RendererPanel.java

示例2: jbInit

import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
private void jbInit() throws Exception
{
    this.setLayout(layout);
    
    FormLayout formLayout1 = new FormLayout("fill:pref, $rgap, pref");
    PanelBuilder builder = new PanelBuilder (formLayout1, hexLines);
    CellConstraints cc = new CellConstraints();
    builder.border(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
   
    int lines = prefs.getScaleLayout(scale).getLineCount();
    
    builder.appendRow("$rgap:grow");
    
    for (int i = 0; i < lines; i++)
    {
        builder.appendRow(FormSpecs.PREF_ROWSPEC);
        builder.appendRow(FormSpecs.RELATED_GAP_ROWSPEC);
        builder.add (new HexLinePanel (prefs.getScaleLayout(scale).getLine(i)),
                    cc.xy(1, i * 2 + 2));
    }
    builder.appendRow ("$rgap:grow");
    
    hexOptions = new HexOptionPanel (prefs.getScaleLayout(scale));
    hexOptions.setMapData(prefs.getMapData());
    hexOptions.setMapScale(scale);
    switch (scale)
    {
        case SCALE_1: hexOptions.setMapScope(MapScope.DOMAIN); break;
        case SCALE_2: hexOptions.setMapScope(MapScope.SECTOR); break;
        case SCALE_3: hexOptions.setMapScope(MapScope.QUADRANT); break;
        case SCALE_4:
        case SCALE_5: hexOptions.setMapScope(MapScope.SUBSECTOR); break;
    }
    
    add (hexLines, BorderLayout.CENTER);
    add (hexOptions, BorderLayout.EAST);
}
 
开发者ID:makhidkarun,项目名称:cartography,代码行数:38,代码来源:HexLayoutPanel.java


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