Search in sources :

Example 31 with FormLayout

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

the class ReturnOfCapitalPanel method layoutPanel.

private void layoutPanel() {
    removeAll();
    FormLayout layout = new FormLayout("right:d, $lcgap, 50dlu:g, 8dlu, right:d, $lcgap, max(65dlu;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);
    add("Label.Security", cc.xy(1, 1));
    add(ValidationFactory.wrap(securityCombo), cc.xy(3, 1));
    add("Label.Date", cc.xy(5, 1));
    add(datePanel, cc.xy(7, 1));
    add("Label.Memo", cc.xy(1, 3));
    add(memoField, cc.xy(3, 3));
    add("Label.ReturnOfCapital", cc.xy(5, 3));
    add(ValidationFactory.wrap(dividendField), cc.xy(7, 3));
    add("Label.IncomeAccount", cc.xy(1, 5));
    add(incomeExchangePanel, cc.xy(3, 5));
    add(getReconcileCheckBox(), cc.xyw(5, 5, 3));
    add("Label.Account", cc.xy(1, 7));
    add(accountExchangePanel, cc.xy(3, 7));
}
Also used : FormLayout(com.jgoodies.forms.layout.FormLayout) CellConstraints(com.jgoodies.forms.layout.CellConstraints)

Example 32 with FormLayout

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

the class GainsPanel method layoutPanel.

private void layoutPanel() {
    FormLayout layout = new FormLayout("55dlu:g, 1px, min", "f:p");
    DefaultFormBuilder builder = new DefaultFormBuilder(layout, this);
    builder.append(gainsField, gainsButton);
}
Also used : FormLayout(com.jgoodies.forms.layout.FormLayout) DefaultFormBuilder(com.jgoodies.forms.builder.DefaultFormBuilder)

Example 33 with FormLayout

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

the class IncomeDialog method layoutMainPanel.

private void layoutMainPanel() {
    initComponents();
    FormLayout layout = new FormLayout("d:g", "80dlu:g");
    DefaultFormBuilder builder = new DefaultFormBuilder(layout);
    builder.border(Borders.DIALOG);
    builder.append(new JScrollPane(table));
    // build the button bar
    ButtonBarBuilder bbb = new ButtonBarBuilder();
    bbb.addButton(newButton, deleteButton);
    bbb.addUnrelatedGap();
    bbb.addGlue();
    bbb.addButton(deleteAllButton);
    builder.append(bbb.getPanel());
    builder.append(tabbedPane);
    builder.nextLine();
    builder.appendUnrelatedComponentsGapRow();
    builder.nextLine();
    builder.append(StaticUIMethods.buildOKCancelBar(okButton, cancelButton));
    getContentPane().add(builder.getPanel(), BorderLayout.CENTER);
}
Also used : FormLayout(com.jgoodies.forms.layout.FormLayout) JScrollPane(javax.swing.JScrollPane) DefaultFormBuilder(com.jgoodies.forms.builder.DefaultFormBuilder) ButtonBarBuilder(com.jgoodies.forms.builder.ButtonBarBuilder)

Example 34 with FormLayout

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

the class InvestmentRegisterPanel method layoutMainPanel.

private void layoutMainPanel() {
    FormLayout layout = new FormLayout("p:g", "");
    DefaultFormBuilder builder = new DefaultFormBuilder(layout, this);
    builder.border(Borders.DIALOG);
    builder.append(createTopPanel());
    builder.nextLine();
    builder.appendRelatedComponentsGapRow();
    builder.nextLine();
    builder.appendRow(RowSpec.decode("fill:60dlu:g"));
    builder.append(jScrollPane);
    builder.append(createButtonPanel());
    builder.append(transactionPanel);
}
Also used : FormLayout(com.jgoodies.forms.layout.FormLayout) DefaultFormBuilder(com.jgoodies.forms.builder.DefaultFormBuilder)

Example 35 with FormLayout

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

the class InvestmentTransactionPanel method layoutMainPanel.

private void layoutMainPanel() {
    initComponents();
    FormLayout layout = new FormLayout("d, 4dlu, m:g, 4dlu, m", "f:d, $ugap, f:d");
    CellConstraints cc = new CellConstraints();
    setBorder(new CompoundBorder(new ShadowBorder(), Borders.TABBED_DIALOG));
    setLayout(layout);
    add(cardPanel, cc.xyw(1, 1, 5));
    add(new JSeparator(), cc.xyw(1, 2, 5));
    add(new JLabel(rb.getString("Label.Action")), cc.xy(1, 3));
    add(actionCombo, cc.xy(3, 3));
    add(StaticUIMethods.buildOKCancelBar(enterButton, cancelButton), cc.xy(5, 3));
}
Also used : FormLayout(com.jgoodies.forms.layout.FormLayout) ShadowBorder(jgnash.ui.components.ShadowBorder) JLabel(javax.swing.JLabel) CompoundBorder(javax.swing.border.CompoundBorder) JSeparator(javax.swing.JSeparator) CellConstraints(com.jgoodies.forms.layout.CellConstraints)

Aggregations

FormLayout (com.jgoodies.forms.layout.FormLayout)250 DefaultFormBuilder (com.jgoodies.forms.builder.DefaultFormBuilder)122 CellConstraints (com.jgoodies.forms.layout.CellConstraints)97 JPanel (javax.swing.JPanel)90 JScrollPane (javax.swing.JScrollPane)60 JLabel (javax.swing.JLabel)44 JButton (javax.swing.JButton)36 BorderLayout (java.awt.BorderLayout)27 FormBuilder (com.jgoodies.forms.builder.FormBuilder)19 ButtonBarBuilder (com.jgoodies.forms.builder.ButtonBarBuilder)18 PanelBuilder (com.jgoodies.forms.builder.PanelBuilder)18 JTextField (javax.swing.JTextField)17 JCheckBox (javax.swing.JCheckBox)13 DatePanel (jgnash.ui.components.DatePanel)11 TextAdapter (org.apache.cayenne.modeler.util.TextAdapter)11 JRadioButton (javax.swing.JRadioButton)10 ButtonGroup (javax.swing.ButtonGroup)9 ActionEvent (java.awt.event.ActionEvent)8 AbstractAction (javax.swing.AbstractAction)8 JDialog (javax.swing.JDialog)8