use of com.jgoodies.forms.layout.CellConstraints in project jgnash by ccavanaugh.
the class AdjustmentPanel method layoutMainPanel.
private void layoutMainPanel() {
FormLayout layout = new FormLayout("right:d, $lcgap, 50dlu:g, 8dlu, right:d, $lcgap, max(48dlu;min)", "f:d, $nlgap, f:d, $nlgap, f:d, $nlgap, f:d");
layout.setRowGroups(new int[][] { { 1, 3, 5, 7 } });
CellConstraints cc = new CellConstraints();
setLayout(layout);
setBorder(Borders.DIALOG);
add("Label.Payee", cc.xy(1, 1));
add(payeeField, cc.xy(3, 1));
add("Label.Number", cc.xy(5, 1));
add(numberField, cc.xy(7, 1));
add("Label.Memo", cc.xy(1, 3));
add(memoField, cc.xy(3, 3));
add("Label.Date", cc.xy(5, 3));
add(datePanel, cc.xy(7, 3));
add(getReconcileCheckBox(), cc.xywh(1, 5, 3, 1));
add("Label.Amount", cc.xy(5, 5));
add(ValidationFactory.wrap(amountField), cc.xy(7, 5));
add(StaticUIMethods.buildHelpBar(convertButton, enterButton, cancelButton), cc.xywh(1, 7, 7, 1));
}
use of com.jgoodies.forms.layout.CellConstraints in project jgnash by ccavanaugh.
the class AbstractTransactionEntryPanel method layoutMainPanel.
private void layoutMainPanel() {
init();
FormLayout layout = new FormLayout("d, 4dlu, d:g, 8dlu, d, 4dlu, 45dlu", "f:d, $nlgap, f:d, $nlgap, f:d");
layout.setRowGroups(new int[][] { { 1, 3, 5 } });
CellConstraints cc = new CellConstraints();
setLayout(layout);
setBorder(Borders.DIALOG);
add("Label.Account", cc.xy(1, 1));
add(accountPanel, cc.xy(3, 1));
add("Label.Amount", cc.xy(5, 1));
add(amountField, cc.xy(7, 1));
add("Label.Memo", cc.xy(1, 3));
add(memoField, cc.xywh(3, 3, 5, 1));
add(createBottomPanel(), cc.xywh(1, 5, 7, 1));
clearForm();
}
use of com.jgoodies.forms.layout.CellConstraints 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.CellConstraints 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.CellConstraints in project jgnash by ccavanaugh.
the class DayTab method layoutMainPanel.
private void layoutMainPanel() {
FormLayout layout = new FormLayout("right:p, $lcgap, f:p, 2dlu, max(48dlu;min), 2dlu, f:p", "f:p, $lgap, f:p, $lgap, f:p");
layout.setRowGroups(new int[][] { { 1, 3, 5 } });
setLayout(layout);
setBorder(Borders.DIALOG);
CellConstraints cc = new CellConstraints();
noEndButton = new JRadioButton(rb.getString("Button.NoEndDate"));
endButton = new JRadioButton();
endDateField = new DatePanel();
group.add(noEndButton);
group.add(endButton);
numberSpinner = new JSpinner(new SpinnerNumberModel(1, 1, 365, 1));
add(new JLabel(rb.getString("Label.Every")), cc.xy(1, 1));
add(numberSpinner, cc.xywh(3, 1, 3, 1));
add(new JLabel(rb.getString("Tab.Day")), cc.xy(7, 1));
add(new JLabel(rb.getString("Label.EndOn")), cc.xy(1, 3));
add(noEndButton, cc.xywh(3, 3, 5, 1));
add(endButton, cc.xy(3, 5));
add(endDateField, cc.xy(5, 5));
}
Aggregations