本文整理汇总了Java中com.jgoodies.forms.builder.PanelBuilder类的典型用法代码示例。如果您正苦于以下问题:Java PanelBuilder类的具体用法?Java PanelBuilder怎么用?Java PanelBuilder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PanelBuilder类属于com.jgoodies.forms.builder包,在下文中一共展示了PanelBuilder类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: definePanel
import com.jgoodies.forms.builder.PanelBuilder; //导入依赖的package包/类
private JPanel definePanel (Classifier classifier)
{
final String pi = Panel.getPanelInterline();
FormLayout layout = new FormLayout("pref", "pref," + pi + ",pref," + pi + ",pref");
CellConstraints cst = new CellConstraints();
PanelBuilder builder = new PanelBuilder(layout, new TitledPanel(classifier.getName()));
Task task = new Task(classifier);
int r = 1; // --------------------------------
builder.add(new TrainingPanel(task, selectionPanel).getComponent(), cst.xy(1, r));
r += 2; // --------------------------------
builder.add(new ValidationPanel(task, selectionPanel, true).getComponent(), cst.xy(1, r));
r += 2; // --------------------------------
builder.add(new ValidationPanel(task, selectionPanel, false).getComponent(), cst.xy(1, r));
return builder.getPanel();
}
示例2: 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));
}
示例3: defineLayout
import com.jgoodies.forms.builder.PanelBuilder; //导入依赖的package包/类
private void defineLayout ()
{
FormLayout layout = Panel.makeFormLayout(2, 3);
PanelBuilder builder = new PanelBuilder(layout, getBody());
///builder.setDefaultDialogBorder();
CellConstraints cst = new CellConstraints();
int r = 1; // --------------------------------
builder.add(evalField, cst.xy(1, r));
builder.add(anchorSpinner, cst.xyw(3, r, 3));
builder.add(shapeSpinner, cst.xyw(7, r, 5));
r += 2; // --------------------------------
builder.add(keyPointField.getLabel(), cst.xy(9, r));
builder.add(keyPointField.getField(), cst.xy(11, r));
}
示例4: defineLayout
import com.jgoodies.forms.builder.PanelBuilder; //导入依赖的package包/类
@Override
public int defineLayout (PanelBuilder builder,
CellConstraints cst,
int r)
{
r = super.defineLayout(builder, cst, r);
builder.add(kindLabel, cst.xyw(5, r, 3));
builder.add(kindCombo, cst.xyw(9, r, 3));
r += 2;
// Layout global and local data as mutual overlays
globalData.defineLayout(builder, cst, r);
r = localDataMean.defineLayout(builder, cst, r);
r = localDataDev.defineLayout(builder, cst, r);
return r;
}
示例5: 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));
}
示例6: getPanel
import com.jgoodies.forms.builder.PanelBuilder; //导入依赖的package包/类
public JPanel getPanel() {
if (_panel == null) {
PanelBuilder b = new PanelBuilder(new FormLayout(
"center:pref",
"max(140px;pref), 3dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref"
));
b.opaque(true);
CellConstraints cc = new CellConstraints();
b.add(icon, cc.xy(1, 1));
b.add(label, cc.xy(1, 3, CellConstraints.CENTER, CellConstraints.DEFAULT));
b.add(rendererProgressBar, cc.xy(1, 5));
b.add(playing, cc.xy(1, 7, CellConstraints.CENTER, CellConstraints.DEFAULT));
b.add(time, cc.xy(1, 9));
_panel = b.getPanel();
}
return _panel;
}
示例7: 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));
}
示例8: 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;
}
示例9: 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;
}
示例10: AtsPositionSlider
import com.jgoodies.forms.builder.PanelBuilder; //导入依赖的package包/类
public AtsPositionSlider(AtsPosition2D position) {
this.position = position;
FormLayout lm = new FormLayout("pref:grow, 1px, pref:grow", // columns
"p");
// new FormLayout("pref:grow, 2dlu, pref:grow, 2dlu, pref:grow, 2dlu,
// pref:grow", "");
PanelBuilder builder = new PanelBuilder(lm);
// builder.setDefaultDialogBorder();
setLayout(new GridLayout(1, 0));
AtsSlider x = new AtsSlider(0, 255, position.getX());
AtsSlider y = new AtsSlider(0, 255, position.getY());
x.addPropertyChangeListener(this);
y.addPropertyChangeListener(this);
CellConstraints cc = new CellConstraints();
builder.add(x, cc.xy(1, 1));
builder.add(y, cc.xy(3, 1));
add(builder.getPanel());
}
示例11: 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;
}
示例12: 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));
}
示例13: 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();
}
}
示例14: 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);
}
示例15: 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);
}