本文整理汇总了Java中com.jgoodies.forms.builder.PanelBuilder.addLabel方法的典型用法代码示例。如果您正苦于以下问题:Java PanelBuilder.addLabel方法的具体用法?Java PanelBuilder.addLabel怎么用?Java PanelBuilder.addLabel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.jgoodies.forms.builder.PanelBuilder
的用法示例。
在下文中一共展示了PanelBuilder.addLabel方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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));
}
示例2: 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;
}
示例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;
}
示例4: 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);
}
示例5: ParamEditorElem
import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
/**
* Create a {@link VirtualDevice virtual device} display element.
*
* @param group - the product group
*/
public ParamEditorElem(ProductGroup group)
{
this.group = group;
FormLayout layout = new FormLayout("6dlu, l:p, 3dlu, f:p:g, 6dlu",
"8dlu, p, 6dlu, f:p:g, 3dlu, f:p:g, 3dlu");
PanelBuilder builder = new PanelBuilder(layout);
CellConstraints cc = new CellConstraints();
JLabel lbl;
int row = 2;
lbl = builder.addLabel(I18n.getMessage("ParamEditorTester.caption"), cc.rcw(row, 2, 3));
lbl.setFont(FontUtils.getCaptionFont());
lbl.setOpaque(false);
row = 4;
pagesList.setCellRenderer(new ParameterListCellRenderer());
builder.add(new JScrollPane(pagesList), cc.rc(row, 2));
detailsPanel = builder.build();
updateContents();
}
示例6: genUI
import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
private void genUI() {
prepareComponent();
FormLayout layout = new FormLayout("3dlu:grow, right:pref, 3dlu, pref, 3dlu:grow",
"3dlu, pref, 3dlu, pref, 3dlu, pref, 3dlu, pref, 3dlu:grow");
PanelBuilder builder = new PanelBuilder(layout);
CellConstraints cc = new CellConstraints();
builder.addLabel("JList :", cc.xy(2, 2));
builder.add(mList, cc.xy(4, 2));
builder.addLabel("JSpinner :", cc.xy(2, 4));
builder.add(mSpinner, cc.xy(4, 4));
builder.addLabel("JSlider :", cc.xy(2, 6));
builder.add(mSlider, cc.xy(4, 6));
builder.addLabel("JComboBox :", cc.xy(2, 8));
builder.add(mCombo, cc.xy(4, 8));
setLayout(new BorderLayout());
add(builder.getPanel(), BorderLayout.CENTER);
}
示例7: genUI
import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
private void genUI() {
prepareComponent();
FormLayout layout = new FormLayout("3dlu:grow, right:pref, 3dlu, pref, 3dlu:grow",
"3dlu, pref, 3dlu, pref, 3dlu, pref, 3dlu, pref, 3dlu:grow");
PanelBuilder builder = new PanelBuilder(layout);
CellConstraints cc = new CellConstraints();
builder.addLabel("JList :", cc.xy(2, 2));
builder.add(mList, cc.xy(4, 2));
builder.addLabel("JSpinner :", cc.xy(2, 4));
builder.add(mSpinner, cc.xy(4, 4));
builder.addLabel("JSlider :", cc.xy(2, 6));
builder.add(mSlider, cc.xy(4, 6));
builder.addLabel("JComboBox :", cc.xy(2, 8));
builder.add(mCombo, cc.xy(4, 8));
setLayout(new BorderLayout());
add(builder.getPanel(), BorderLayout.CENTER);
}
示例8: genUI
import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
private void genUI() {
prepareComponent();
FormLayout layout = new FormLayout("3dlu:grow, right:pref, 3dlu, pref, 3dlu:grow",
"3dlu,pref, 3dlu, pref, 3dlu, pref, 3dlu:grow");
PanelBuilder builder = new PanelBuilder(layout);
CellConstraints cc = new CellConstraints();
builder.addLabel("JCheckBox :", cc.xy(2, 2));
builder.add(mCheck, cc.xy(4, 2));
builder.addLabel("JRadioButton :", cc.xy(2, 4));
builder.add(mRadio, cc.xy(4, 4));
builder.addLabel("JToggleButton :", cc.xy(2, 6));
builder.add(mToggle, cc.xy(4, 6));
setLayout(new BorderLayout());
add(builder.getPanel(), BorderLayout.CENTER);
}
示例9: genUI
import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
private void genUI() {
prepareComponent();
FormLayout layout = new FormLayout("3dlu:grow, right:pref, 3dlu, pref, 3dlu:grow",
"3dlu, pref, 3dlu, pref, 3dlu, pref, 3dlu, pref, 3dlu:grow");
PanelBuilder builder = new PanelBuilder(layout);
CellConstraints cc = new CellConstraints();
builder.addLabel("JTextField :", cc.xy(2, 2));
builder.add(mTextField, cc.xy(4, 2));
builder.addLabel("JFormattedTextField :", cc.xy(2, 4));
builder.add(mFormattedTextField, cc.xy(4, 4));
builder.addLabel("JPasswordField :", cc.xy(2, 6));
builder.add(mPasswordField, cc.xy(4, 6));
builder.addLabel("JTextArea :", cc.xy(2, 8));
builder.add(new JScrollPane(mTextArea), cc.xy(4, 8));
setLayout(new BorderLayout());
add(builder.getPanel(), BorderLayout.CENTER);
}
示例10: 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();
}
示例11: addItem
import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
public int addItem(String key, String value, PanelBuilder builder, int y) {
builder.appendRow(rspec);
builder.addLabel(key.length() > 0 ? key + ": " : "", cc.xy(1, ++y));
JTextField val = new JTextField(value);
val.setEditable(false);
val.setBackground(Color.white);
builder.add(val, cc.xy(2, y));
return y;
}
示例12: makePanel
import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
private void makePanel() {
FormLayout layout = new FormLayout(
"2dlu:grow, 15dlu, 18dlu, 15dlu, 18dlu, 3dlu, 90dlu, 15dlu, 18dlu, 15dlu, 18dlu, 30dlu, 55dlu, 5dlu, 55dlu, 2dlu:grow", //$NON-NLS-1$
"5dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 20dlu, pref, 2dlu, pref, 5dlu, pref, 5dlu, pref, 2dlu, 80dlu, 2dlu, 18dlu, 2dlu:grow "); //$NON-NLS-1$
CellConstraints cc = new CellConstraints();
pb = new PanelBuilder(layout);
pb.setDefaultDialogBorder();
pb.addSeparator(Messages.getString("circulation.info"), cc.xyw(2,2,14)); //$NON-NLS-1$
pb.addLabel(Messages.getString("circulation.user"), cc.xyw(2,4,4,"right, center")); //$NON-NLS-1$ //$NON-NLS-2$
pb.add(getLUser(), cc.xyw(7,4,4));
pb.addLabel(Messages.getString("circulation.mmbrexpirdate"), cc.xyw(2,6,4,"right, center")); //$NON-NLS-1$ //$NON-NLS-2$
pb.add(getLUntilDate(), cc.xyw(7,6,4));
pb.addLabel(Messages.getString("circulation.note"), cc.xyw(2,8,4,"right, center")); //$NON-NLS-1$ //$NON-NLS-2$
pb.add(getLNote(), cc.xyw(7,8,4));
pb.add(getLBlockCard(), cc.xyw(11,4,5));
pb.add(getLDuplicate(), cc.xyw(11,6,5));
pb.addSeparator(Messages.getString("circulation.charging"), cc.xyw(2,16,14)); //$NON-NLS-1$
pb.add(getJScrollPane(), cc.xyw(2,18,14));
pb.add(getBtnReturn(), cc.xy(3,20,"fill, fill")); //$NON-NLS-1$
pb.add(getBtnResume(), cc.xy(5,20,"fill, fill")); //$NON-NLS-1$
pb.add(getBtnRevers(), cc.xy(13,20));
pb.add(getBtnHistory(), cc.xy(15,20));
pb.addSeparator(Messages.getString("circulation.checkout"), cc.xyw(2,10,10)); //$NON-NLS-1$
pb.addLabel(Messages.getString("circulation.acquisitionnumber"), cc.xyw(2,12,4,"right, center")); //$NON-NLS-1$ //$NON-NLS-2$
pb.add(getTfCtlgNo(), cc.xy(7,12));
pb.add(getBtnLend(), cc.xy(9,12,"fill, fill")); //$NON-NLS-1$
pb.add(getBtnSearch(), cc.xy(11,12,"fill, fill")); //$NON-NLS-1$
pb.add(getLWarnings(), cc.xyw(13,10,3,"right, center")); //$NON-NLS-1$
pb.add(getBtnWarnings(), cc.xy(15,12,"fill, fill")); //$NON-NLS-1$
}
示例13: getJContentPane
import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
private JPanel getJContentPane() {
if (jContentPane == null) {
FormLayout layout = new FormLayout(
"2dlu:grow ,left:100dlu, 2dlu:grow", //$NON-NLS-1$
"5dlu, pref, 2dlu, pref, 2dlu:grow"); //$NON-NLS-1$
CellConstraints cc = new CellConstraints();
pb = new PanelBuilder(layout);
pb.setDefaultDialogBorder();
pb.addLabel(Messages.getString("circulation.note"), cc.xy(2,2)); //$NON-NLS-1$
pb.add(getJTextField(), cc.xy(2,4,"fill, fill")); //$NON-NLS-1$
jContentPane = pb.getPanel();
}
return jContentPane;
}
示例14: makePanel
import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
private void makePanel() {
FormLayout layout = new FormLayout(
"2dlu:grow ,right:50dlu, 3dlu, 15dlu, 2dlu, 45dlu, 8dlu, 40dlu, 35dlu, right:60dlu, 3dlu, 85dlu, 5dlu, 18dlu, 2dlu:grow", //$NON-NLS-1$
"5dlu, pref, 2dlu, 15dlu, 2dlu, pref, 35dlu, pref, 2dlu, 15dlu, 30dlu, pref, 2dlu, 5dlu, 18dlu, 6dlu, 18dlu, 6dlu, 18dlu, 5dlu, 2dlu:grow"); //$NON-NLS-1$
CellConstraints cc = new CellConstraints();
pb = new PanelBuilder(layout);
pb.setDefaultDialogBorder();
pb.addSeparator(Messages.getString("circulation.usernumber"), cc.xyw(2,2,7)); //$NON-NLS-1$
pb.addLabel(Messages.getString("circulation.location"), cc.xy(2,4)); //$NON-NLS-1$
pb.add(getCmbBranchID(), cc.xyw(4,4,5,"fill, fill")); //$NON-NLS-1$
pb.add(getUserIDLabel(), cc.xy(2,6));
pb.add(getTfBranch(), cc.xy(4,6));
pb.add(getTfUserID(), cc.xy(6,6));
pb.add(getBtnAuto(), cc.xy(8,6));
pb.addSeparator("", cc.xyw(2,8,7)); //$NON-NLS-1$
pb.add(getUserCategLabel(), cc.xy(2,10));
pb.add(getCmbCateg(), cc.xyw(4,10,5,"fill, fill")); //$NON-NLS-1$
pb.addSeparator("",cc.xyw(10,8,5)); //$NON-NLS-1$
pb.add(getMmbrTypeLabel(), cc.xy(10,10));
pb.add(getCmbMmbrType(), cc.xyw(12,10,3,"fill, fill")); //$NON-NLS-1$
pb.addSeparator(Messages.getString("circulation.corporate"), cc.xyw(10,2,5)); //$NON-NLS-1$
pb.add(getRbGroupY(), cc.xy(10,4));
pb.add(getRbGroupN(), cc.xy(10,6));
pb.add(getCmbGroups(), cc.xyw(12,4,3,"fill, fill")); //$NON-NLS-1$
pb.addSeparator(Messages.getString("circulation.membershipfee"),cc.xyw(2,12,13)); //$NON-NLS-1$
pb.add(getJScrollPane(), cc.xywh(2,14,11,7));
pb.add(getBtnAdd(), cc.xy(14,15,"fill, fill")); //$NON-NLS-1$
pb.add(getBtnRemove(), cc.xy(14,17,"fill, fill")); //$NON-NLS-1$
pb.add(getBtnPrint(), cc.xy(14,19,"fill, fill")); //$NON-NLS-1$
}
示例15: createFileList
import com.jgoodies.forms.builder.PanelBuilder; //导入方法依赖的package包/类
private Component createFileList() {
String rowLayout = "4dlu,pref,15dlu,4dlu,";
for(int i = 0; i < files.size(); i++) {
rowLayout = rowLayout + "pref,4dlu,";
}
rowLayout = rowLayout + "4dlu";
FormLayout layout = new FormLayout("4dlu,pref,4dlu,pref,5dlu", rowLayout);
CellConstraints cc = new CellConstraints();
PanelBuilder panel = new PanelBuilder(layout);
panel.setBackground(Color.white);
panel.addLabel("Please select all files that implement the PathVisio plugin interface.", cc.xy(2, 2));
panel.addSeparator("", cc.xyw(2, 3, 3));
int row = 5;
for(File f : files) {
panel.add(new JLabel(f.getName()), cc.xy(2, row));
JCheckBox cb = new JCheckBox();
cb.setBackground(Color.white);
panel.add(cb, cc.xy(4, row));
cbs.put(f,cb);
row = row + 2;
}
JScrollPane pane = new JScrollPane(panel.getPanel());
pane.setBackground(Color.white);
return pane;
}