use of com.jgoodies.forms.builder.ButtonBarBuilder in project jgnash by ccavanaugh.
the class StaticUIMethods method buildHelpBar.
/**
* Builds and returns a right aligned bar with help and other buttons.
*
* @param help the help button to add on the left side
* @param buttons an array of buttons to add
* @return a right aligned button bar with the given buttons
*/
@SuppressWarnings("ConfusingArgumentToVarargsMethod")
public static JPanel buildHelpBar(final JButton help, final AbstractButton... buttons) {
ButtonBarBuilder builder = new ButtonBarBuilder();
builder.addButton(help);
builder.addUnrelatedGap();
builder.addGlue();
builder.addButton(buttons);
return builder.getPanel();
}
use of com.jgoodies.forms.builder.ButtonBarBuilder in project jgnash by ccavanaugh.
the class IncomeDialog method layoutMainPanel.
private void layoutMainPanel() {
initComponents();
FormLayout layout = new FormLayout("d:g", "80dlu:g");
DefaultFormBuilder builder = new DefaultFormBuilder(layout);
builder.border(Borders.DIALOG);
builder.append(new JScrollPane(table));
// build the button bar
ButtonBarBuilder bbb = new ButtonBarBuilder();
bbb.addButton(newButton, deleteButton);
bbb.addUnrelatedGap();
bbb.addGlue();
bbb.addButton(deleteAllButton);
builder.append(bbb.getPanel());
builder.append(tabbedPane);
builder.nextLine();
builder.appendUnrelatedComponentsGapRow();
builder.nextLine();
builder.append(StaticUIMethods.buildOKCancelBar(okButton, cancelButton));
getContentPane().add(builder.getPanel(), BorderLayout.CENTER);
}
use of com.jgoodies.forms.builder.ButtonBarBuilder in project jgnash by ccavanaugh.
the class CurrencyExchangeDialog method layoutMainPanel.
private void layoutMainPanel() {
initComponents();
FormLayout layout = new FormLayout("f:p:g", "");
DefaultFormBuilder builder = new DefaultFormBuilder(layout);
builder.border(Borders.DIALOG);
builder.appendSeparator(rb.getString("Title.Currencies"));
builder.nextLine();
builder.appendRelatedComponentsGapRow();
builder.nextLine();
builder.append(layoutTopPanel());
builder.appendSeparator(rb.getString("Title.ExchangeRate"));
builder.nextLine();
builder.appendRelatedComponentsGapRow();
builder.nextLine();
builder.appendRow(RowSpec.decode("f:max(50dlu;p):g"));
builder.append(layoutMiddlePanel());
builder.appendSeparator();
builder.append(layoutBottomPanel());
builder.nextLine();
builder.appendUnrelatedComponentsGapRow();
builder.nextLine();
builder.append(new ButtonBarBuilder().addGlue().addButton(closeButton).build());
getContentPane().add(builder.getPanel(), BorderLayout.CENTER);
pack();
setMinimumSize(getSize());
}
use of com.jgoodies.forms.builder.ButtonBarBuilder in project jgnash by ccavanaugh.
the class SecuritiesHistoryDialog method buildButtonBar.
private JPanel buildButtonBar() {
ButtonBarBuilder builder = new ButtonBarBuilder();
builder.addButton(deleteButton, clearButton, applyButton);
builder.addGlue();
builder.addButton(closeButton);
return builder.getPanel();
}
use of com.jgoodies.forms.builder.ButtonBarBuilder in project jgnash by ccavanaugh.
the class RecurringEntryDialog method createTransactionPanel.
private JPanel createTransactionPanel() {
FormLayout layout = new FormLayout("left:p, 4dlu, p:g, 4dlu, p", "f:p, 3dlu, f:p, 3dlu, f:p, 3dlu, f:40dlu:g");
layout.setRowGroups(new int[][] { { 1, 3, 5 } });
CellConstraints cc = new CellConstraints();
JPanel p = new JPanel(layout);
descriptionField = new JTextFieldEx();
accountCombo = new AccountListComboBox();
notesArea = new JTextArea(5, 20);
notesArea.setLineWrap(true);
notesArea.setAutoscrolls(true);
JScrollPane pane = new JScrollPane(notesArea);
pane.setAutoscrolls(true);
transactionField = new JTextFieldEx();
transactionField.setEditable(false);
editButton = new JButton(rb.getString("Button.Edit"));
deleteButton = new JButton(rb.getString("Button.Delete"));
p.add(new JLabel(rb.getString("Label.Account")), cc.xy(1, 1));
p.add(accountCombo, cc.xywh(3, 1, 3, 1));
p.add(new JLabel(rb.getString("Label.Description")), cc.xy(1, 3));
p.add(descriptionField, cc.xywh(3, 3, 3, 1));
p.add(new JLabel(rb.getString("Label.Transaction")), cc.xy(1, 5));
p.add(transactionField, cc.xy(3, 5));
p.add(new ButtonBarBuilder().addButton(editButton, deleteButton).build(), cc.xy(5, 5));
p.add(new JLabel(rb.getString("Label.Notes")), cc.xy(1, 7));
p.add(pane, cc.xywh(3, 7, 3, 1));
return p;
}
Aggregations