Search in sources :

Example 66 with FormLayout

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

the class CurrencyExchangeDialog method layoutMainPanel.

private void layoutMainPanel() {
    initComponents();
    FormLayout layout = new FormLayout("f:p:g", "");
    DefaultFormBuilder builder = new DefaultFormBuilder(layout);
    builder.border(Borders.DIALOG);
    builder.appendSeparator(rb.getString("Title.Currencies"));
    builder.nextLine();
    builder.appendRelatedComponentsGapRow();
    builder.nextLine();
    builder.append(layoutTopPanel());
    builder.appendSeparator(rb.getString("Title.ExchangeRate"));
    builder.nextLine();
    builder.appendRelatedComponentsGapRow();
    builder.nextLine();
    builder.appendRow(RowSpec.decode("f:max(50dlu;p):g"));
    builder.append(layoutMiddlePanel());
    builder.appendSeparator();
    builder.append(layoutBottomPanel());
    builder.nextLine();
    builder.appendUnrelatedComponentsGapRow();
    builder.nextLine();
    builder.append(new ButtonBarBuilder().addGlue().addButton(closeButton).build());
    getContentPane().add(builder.getPanel(), BorderLayout.CENTER);
    pack();
    setMinimumSize(getSize());
}
Also used : FormLayout(com.jgoodies.forms.layout.FormLayout) DefaultFormBuilder(com.jgoodies.forms.builder.DefaultFormBuilder) ButtonBarBuilder(com.jgoodies.forms.builder.ButtonBarBuilder)

Example 67 with FormLayout

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

the class CurrencyExchangeDialog method layoutBottomPanel.

private JPanel layoutBottomPanel() {
    FormLayout layout = new FormLayout("p, 8dlu, 60dlu:g, 8dlu, p", "");
    DefaultFormBuilder builder = new DefaultFormBuilder(layout);
    builder.append(updateButton, progressBar, stopButton);
    return builder.getPanel();
}
Also used : FormLayout(com.jgoodies.forms.layout.FormLayout) DefaultFormBuilder(com.jgoodies.forms.builder.DefaultFormBuilder)

Example 68 with FormLayout

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

the class PrintCheckDialog method layoutMainPanel.

private void layoutMainPanel() {
    initComponents();
    FormLayout layout = new FormLayout("p, 4dlu, 85dlu:g, 4dlu, p", "");
    DefaultFormBuilder builder = new DefaultFormBuilder(layout);
    builder.border(Borders.DIALOG);
    builder.rowGroupingEnabled(true);
    builder.append(rb.getString("Label.CheckLayout"), layoutField, selectButton);
    builder.append(rb.getString("Label.StartPos"), startSpinner);
    builder.nextLine();
    builder.append(incCheckBox, 5);
    builder.rowGroupingEnabled(false);
    builder.nextLine();
    builder.appendUnrelatedComponentsGapRow();
    builder.nextLine();
    builder.append(StaticUIMethods.buildOKCancelBar(printButton, cancelButton), 5);
    getContentPane().add(builder.getPanel(), BorderLayout.CENTER);
    pack();
    setMinimumSize(getSize());
}
Also used : FormLayout(com.jgoodies.forms.layout.FormLayout) DefaultFormBuilder(com.jgoodies.forms.builder.DefaultFormBuilder)

Example 69 with FormLayout

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

the class TransactionListDialog method layoutMainPanel.

private void layoutMainPanel() {
    initComponents();
    FormLayout layout = new FormLayout("p:g", "");
    DefaultFormBuilder builder = new DefaultFormBuilder(layout);
    builder.border(Borders.DIALOG);
    builder.appendTitle(rb.getString("Message.TransToPrint"));
    builder.append(StaticUIMethods.buildLeftAlignedBar(selectButton, clearButton, invertButton));
    builder.nextLine();
    builder.appendUnrelatedComponentsGapRow();
    builder.nextLine();
    builder.appendRow(RowSpec.decode("f:75dlu:g"));
    builder.append(new JScrollPane(table));
    builder.nextLine();
    builder.appendUnrelatedComponentsGapRow();
    builder.nextLine();
    builder.append(StaticUIMethods.buildOKCancelBar(okButton, cancelButton));
    getContentPane().add(builder.getPanel(), BorderLayout.CENTER);
    pack();
    setMinimumSize(getSize());
}
Also used : FormLayout(com.jgoodies.forms.layout.FormLayout) JScrollPane(javax.swing.JScrollPane) DefaultFormBuilder(com.jgoodies.forms.builder.DefaultFormBuilder)

Example 70 with FormLayout

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

the class CurrenciesPanel method layoutMainPanel.

private void layoutMainPanel() {
    initComponents();
    FormLayout layout = new FormLayout("d:g(0.5), 8dlu, p, 8dlu, d:g(0.5)", "");
    layout.addGroupedColumn(1);
    layout.addGroupedColumn(5);
    DefaultFormBuilder builder = new DefaultFormBuilder(layout, this);
    builder.appendTitle(rb.getString("Title.Available"));
    builder.append("");
    builder.appendTitle(rb.getString("Title.Current"));
    builder.nextLine();
    builder.appendRelatedComponentsGapRow();
    builder.nextLine();
    builder.appendRow("fill:80dlu:g");
    builder.append(new JScrollPane(aJList), buildCenterPanel(), new JScrollPane(cJList));
    builder.nextLine();
    builder.appendUnrelatedComponentsGapRow();
    builder.nextLine();
    builder.append(layoutCustomPanel(), 5);
    builder.appendSeparator();
}
Also used : FormLayout(com.jgoodies.forms.layout.FormLayout) JScrollPane(javax.swing.JScrollPane) DefaultFormBuilder(com.jgoodies.forms.builder.DefaultFormBuilder)

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