use of com.jgoodies.forms.layout.FormLayout in project jgnash by ccavanaugh.
the class SecuritiesHistoryDialog method layoutMainPanel.
private JPanel layoutMainPanel() {
initComponents();
FormLayout layout = new FormLayout("r:p, $lcgap, max(75dlu;p):g(0.5), 8dlu, r:p, $lcgap, max(75dlu;p):g(0.5)", "");
DefaultFormBuilder builder = new DefaultFormBuilder(layout);
builder.border(Borders.DIALOG);
builder.appendRow(RowSpec.decode("f:p:g"));
builder.append(new JScrollPane(table), 7);
builder.nextLine();
builder.append(chartPanel, 7);
builder.nextLine();
builder.appendUnrelatedComponentsGapRow();
builder.nextLine();
builder.rowGroupingEnabled(true);
builder.append(rb.getString("Label.Security"), securityCombo, 5);
builder.nextLine();
builder.append(rb.getString("Label.Date"), dateField);
builder.append("", updateButton);
builder.nextLine();
builder.append(rb.getString("Label.Close"), closeField);
builder.append(rb.getString("Label.Volume"), volumeField);
builder.nextLine();
builder.append(rb.getString("Label.High"), highField);
builder.append(rb.getString("Label.Low"), lowField);
builder.rowGroupingEnabled(false);
builder.nextLine();
builder.appendUnrelatedComponentsGapRow();
builder.nextLine();
builder.append(buildButtonBar(), 7);
return builder.getPanel();
}
use of com.jgoodies.forms.layout.FormLayout in project jgnash by ccavanaugh.
the class NotificationDialog method layoutMainPanel.
private void layoutMainPanel() {
FormLayout layout = new FormLayout("right:p, 4dlu, fill:p:g", "");
DefaultFormBuilder builder = new DefaultFormBuilder(layout);
builder.border(Borders.DIALOG);
cancelButton = new JButton(rb.getString("Button.RemindLater"));
okButton = new JButton(rb.getString("Button.AckSel"));
table = new FormattedJTable(model);
table.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
table.getSelectionModel().addListSelectionListener(this);
table.setColumnSelectionAllowed(false);
JScrollPane scrollPane = new JScrollPane(table);
scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
scrollPane.setAutoscrolls(true);
builder.appendRow(RowSpec.decode("fill:80dlu:g"));
builder.append(scrollPane, 3);
builder.nextLine();
builder.appendUnrelatedComponentsGapRow();
builder.nextLine();
builder.append(rb.getString("Label.RemindLater"), periodCombo);
builder.nextLine();
builder.appendRelatedComponentsGapRow();
builder.nextLine();
builder.append(StaticUIMethods.buildOKCancelBar(okButton, cancelButton), 3);
getContentPane().add(builder.getPanel());
pack();
setMinimumSize(getSize());
}
use of com.jgoodies.forms.layout.FormLayout in project jgnash by ccavanaugh.
the class RecurringEntryDialog method createEntryPanel.
private JPanel createEntryPanel() {
FormLayout layout = new FormLayout("right:p, 4dlu, 45dlu", "f:p, 3dlu, f:p");
CellConstraints cc = new CellConstraints();
JPanel p = new JPanel(layout);
autoEnterCheckBox = new JCheckBox(rb.getString("Button.EnterDaysBefore"));
daysBeforeField = new JIntegerField();
lastOccurrenceField = new JDateField();
p.add(autoEnterCheckBox, cc.xy(1, 1));
p.add(daysBeforeField, cc.xy(3, 1));
p.add(new JLabel(rb.getString("Label.LastOccurrence")), cc.xy(1, 3));
p.add(lastOccurrenceField, cc.xy(3, 3));
// clear the date
lastOccurrenceField.setValue(null);
lastOccurrenceField.setEditable(false);
return p;
}
use of com.jgoodies.forms.layout.FormLayout 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;
}
use of com.jgoodies.forms.layout.FormLayout in project jgnash by ccavanaugh.
the class ReconcileDialog method buildStatPanel.
private JPanel buildStatPanel() {
FormLayout layout = new FormLayout("left:p, 8dlu, right:65dlu:g", "");
DefaultFormBuilder builder = new DefaultFormBuilder(layout);
builder.border(Borders.DIALOG);
builder.rowGroupingEnabled(true);
builder.append(rb.getString("Label.OpeningBalance"), openingBalanceLabel);
builder.append(rb.getString("Label.TargetBalance"), targetBalanceLabel);
builder.append(rb.getString("Label.ReconciledBalance"), reconciledBalanceLabel);
builder.appendSeparator();
builder.append(rb.getString("Label.Difference"), differenceLabel);
return builder.getPanel();
}
Aggregations