Search in sources :

Example 76 with FormLayout

use of com.jgoodies.forms.layout.FormLayout in project jgnash by ccavanaugh.

the class ReconcileSettingsDialog method layoutMainPanel.

private void layoutMainPanel() {
    final FormLayout layout = new FormLayout("p:g, $lcgap, max(70dlu;min)", "");
    final DefaultFormBuilder builder = new DefaultFormBuilder(layout);
    builder.border(Borders.DIALOG);
    builder.rowGroupingEnabled(true);
    builder.append(rb.getString("Label.StatementDate"), datePanel);
    builder.append(rb.getString("Label.OpeningBalance"), openField);
    builder.append(rb.getString("Label.EndingBalance"), closeField);
    builder.nextLine();
    builder.appendUnrelatedComponentsGapRow();
    builder.nextLine();
    builder.append(StaticUIMethods.buildOKCancelBar(okButton, cancelButton), 3);
    getContentPane().add(builder.getPanel());
    pack();
}
Also used : FormLayout(com.jgoodies.forms.layout.FormLayout) DefaultFormBuilder(com.jgoodies.forms.builder.DefaultFormBuilder)

Example 77 with FormLayout

use of com.jgoodies.forms.layout.FormLayout 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)

Example 78 with FormLayout

use of com.jgoodies.forms.layout.FormLayout in project jgnash by ccavanaugh.

the class ReconcileDialog method layoutMainPanel.

private void layoutMainPanel() {
    initComponents();
    FormLayout layout = new FormLayout("min:grow(0.5), 7dlu, min:grow(0.5)", "fill:min:g, 7dlu, p, 14dlu, p");
    layout.addGroupedColumn(1);
    layout.addGroupedColumn(3);
    CellConstraints cc = new CellConstraints();
    String[] columnNames = RegisterFactory.getCreditDebitTabNames(account);
    FormLayout dLayout = new FormLayout("fill:min:g(1.0)", "fill:min:g, 4dlu, p");
    JPanel dPanel = new JPanel(dLayout);
    dPanel.add(buildTablePanel(columnNames[1], debitTotalLabel, debitTable), cc.xy(1, 1));
    dPanel.add(StaticUIMethods.buildLeftAlignedBar(debitSelectAllButton, debitClearAllButton), cc.xy(1, 3));
    FormLayout cLayout = new FormLayout("fill:min:g(1.0)", "fill:min:g, 4dlu, p");
    JPanel cPanel = new JPanel(cLayout);
    cPanel.add(buildTablePanel(columnNames[0], creditTotalLabel, creditTable), cc.xy(1, 1));
    cPanel.add(StaticUIMethods.buildLeftAlignedBar(creditSelectAllButton, creditClearAllButton), cc.xy(1, 3));
    JPanel p = new JPanel(layout);
    p.setBorder(Borders.DIALOG);
    p.add(dPanel, cc.xywh(1, 1, 1, 3));
    p.add(cPanel, cc.xy(3, 1));
    p.add(buildStatPanel(), cc.xy(3, 3));
    p.add(StaticUIMethods.buildRightAlignedBar(cancelButton, finishLaterButton, finishButton), cc.xywh(1, 5, 3, 1));
    getContentPane().add(p);
    pack();
    setMinimumSize(getSize());
    // this will size and locate the dialog
    DialogUtils.addBoundsListener(this);
}
Also used : FormLayout(com.jgoodies.forms.layout.FormLayout) JPanel(javax.swing.JPanel) CellConstraints(com.jgoodies.forms.layout.CellConstraints)

Example 79 with FormLayout

use of com.jgoodies.forms.layout.FormLayout in project jgnash by ccavanaugh.

the class AbstractExchangeTransactionPanel method createBottomPanel.

protected JPanel createBottomPanel() {
    FormLayout layout = new FormLayout("m, $ugap, m, $ugap, right:m:g", "f:d");
    DefaultFormBuilder builder = new DefaultFormBuilder(layout);
    builder.append(getReconcileCheckBox(), attachmentPanel, StaticUIMethods.buildOKCancelBar(enterButton, cancelButton));
    return builder.getPanel();
}
Also used : FormLayout(com.jgoodies.forms.layout.FormLayout) DefaultFormBuilder(com.jgoodies.forms.builder.DefaultFormBuilder)

Example 80 with FormLayout

use of com.jgoodies.forms.layout.FormLayout in project jgnash by ccavanaugh.

the class YearTab 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, 100, 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.Year")), 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

FormLayout (com.jgoodies.forms.layout.FormLayout)318 CellConstraints (com.jgoodies.forms.layout.CellConstraints)136 DefaultFormBuilder (com.jgoodies.forms.builder.DefaultFormBuilder)128 JPanel (javax.swing.JPanel)109 JScrollPane (javax.swing.JScrollPane)76 PanelBuilder (com.jgoodies.forms.builder.PanelBuilder)63 JLabel (javax.swing.JLabel)55 JButton (javax.swing.JButton)41 BorderLayout (java.awt.BorderLayout)32 FormBuilder (com.jgoodies.forms.builder.FormBuilder)19 JTextField (javax.swing.JTextField)19 ButtonBarBuilder (com.jgoodies.forms.builder.ButtonBarBuilder)18 JCheckBox (javax.swing.JCheckBox)18 Dimension (java.awt.Dimension)12 ActionEvent (java.awt.event.ActionEvent)12 DatePanel (jgnash.ui.components.DatePanel)11 TextAdapter (org.apache.cayenne.modeler.util.TextAdapter)11 JRadioButton (javax.swing.JRadioButton)10 ActionListener (java.awt.event.ActionListener)9 AbstractAction (javax.swing.AbstractAction)9