use of jgnash.ui.components.AccountListComboBox 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 jgnash.ui.components.AccountListComboBox in project jgnash by ccavanaugh.
the class ImportOne method initComponents.
private void initComponents() {
accountCombo = new AccountListComboBox();
helpPane = new JTextPane();
helpPane.setEditable(false);
helpPane.setEditorKit(new StyledEditorKit());
helpPane.setBackground(getBackground());
helpPane.setText(TextResource.getString("ImportOne.txt"));
}
use of jgnash.ui.components.AccountListComboBox in project jgnash by ccavanaugh.
the class PartialOne method initComponents.
private void initComponents() {
accountCombo = new AccountListComboBox();
helpPane = new JTextPane();
helpPane.setEditable(false);
helpPane.setEditorKit(new StyledEditorKit());
helpPane.setBackground(getBackground());
helpPane.setText(TextResource.getString("QifOne.txt"));
/* Create the combo for date format selection */
dateFormatCombo = new JComboBox<>(DateFormat.values());
dateFormatCombo.addActionListener(this);
dateFormatCombo.setSelectedIndex(pref.getInt(DATE_FORMAT, 0));
accountCombo.addActionListener(this);
/* Try a set the comboBox to the last selected account */
String lastAccount = pref.get(LAST_ACCOUNT, "");
final Engine engine = EngineFactory.getEngine(EngineFactory.DEFAULT);
Objects.requireNonNull(engine);
final Account last = engine.getAccountByUuid(lastAccount);
if (last != null) {
setAccount(last);
}
}
Aggregations