Search in sources :

Example 36 with CellConstraints

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));
}
Also used : FormLayout(com.jgoodies.forms.layout.FormLayout) CellConstraints(com.jgoodies.forms.layout.CellConstraints)

Example 37 with CellConstraints

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();
}
Also used : FormLayout(com.jgoodies.forms.layout.FormLayout) CellConstraints(com.jgoodies.forms.layout.CellConstraints)

Example 38 with CellConstraints

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;
}
Also used : FormLayout(com.jgoodies.forms.layout.FormLayout) JCheckBox(javax.swing.JCheckBox) JIntegerField(jgnash.ui.components.JIntegerField) JDateField(jgnash.ui.components.JDateField) JPanel(javax.swing.JPanel) JLabel(javax.swing.JLabel) CellConstraints(com.jgoodies.forms.layout.CellConstraints)

Example 39 with CellConstraints

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;
}
Also used : FormLayout(com.jgoodies.forms.layout.FormLayout) JScrollPane(javax.swing.JScrollPane) JPanel(javax.swing.JPanel) JTextArea(javax.swing.JTextArea) ButtonBarBuilder(com.jgoodies.forms.builder.ButtonBarBuilder) JButton(javax.swing.JButton) JLabel(javax.swing.JLabel) JTextFieldEx(jgnash.ui.components.JTextFieldEx) AccountListComboBox(jgnash.ui.components.AccountListComboBox) CellConstraints(com.jgoodies.forms.layout.CellConstraints)

Example 40 with CellConstraints

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));
}
Also used : FormLayout(com.jgoodies.forms.layout.FormLayout) SpinnerNumberModel(javax.swing.SpinnerNumberModel) JRadioButton(javax.swing.JRadioButton) DatePanel(jgnash.ui.components.DatePanel) JSpinner(javax.swing.JSpinner) JLabel(javax.swing.JLabel) CellConstraints(com.jgoodies.forms.layout.CellConstraints)

Aggregations

CellConstraints (com.jgoodies.forms.layout.CellConstraints)142 FormLayout (com.jgoodies.forms.layout.FormLayout)97 JPanel (javax.swing.JPanel)65 Dimension (java.awt.Dimension)42 JLabel (javax.swing.JLabel)30 JScrollPane (javax.swing.JScrollPane)29 PanelBuilder (com.jgoodies.forms.builder.PanelBuilder)18 BorderLayout (java.awt.BorderLayout)12 JButton (javax.swing.JButton)7 TitledSeparator (com.jeta.forms.components.separator.TitledSeparator)6 JRadioButton (javax.swing.JRadioButton)6 DatePanel (jgnash.ui.components.DatePanel)5 TextAdapter (org.apache.cayenne.modeler.util.TextAdapter)5 FlowLayout (java.awt.FlowLayout)4 JSpinner (javax.swing.JSpinner)4 JTextField (javax.swing.JTextField)4 SpinnerNumberModel (javax.swing.SpinnerNumberModel)4 GridConstraints (com.intellij.uiDesigner.core.GridConstraints)3 DefaultFormBuilder (com.jgoodies.forms.builder.DefaultFormBuilder)3 JCayenneCheckBox (org.apache.cayenne.swing.components.JCayenneCheckBox)3