本文整理汇总了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();
}
示例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);
}