Search in sources :

Example 66 with CellConstraints

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

the class InvestmentTransactionDialog method layoutMainPanel.

private void layoutMainPanel() {
    ResourceBundle rb = ResourceUtils.getBundle();
    FormLayout layout = new FormLayout("right:d, 4dlu, f:d:g", "f:d, 3dlu, f:d, 8dlu, f:d");
    CellConstraints cc = new CellConstraints();
    JPanel p = new JPanel(layout);
    p.add(new JLabel(rb.getString("Label.BaseAccount")), cc.xy(1, 1));
    p.add(new JLabel(account.getPathName()), cc.xy(3, 1));
    p.add(transactionPanel, cc.xyw(1, 3, 3));
    p.setBorder(Borders.DIALOG);
    getContentPane().setLayout(new java.awt.BorderLayout());
    getContentPane().add(p, java.awt.BorderLayout.CENTER);
    pack();
}
Also used : FormLayout(com.jgoodies.forms.layout.FormLayout) JPanel(javax.swing.JPanel) JLabel(javax.swing.JLabel) ResourceBundle(java.util.ResourceBundle) CellConstraints(com.jgoodies.forms.layout.CellConstraints)

Example 67 with CellConstraints

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

the class SellSharePanel method layoutMainPanel.

private void layoutMainPanel() {
    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);
    /* Create a sub panel to work around a column spanning problem in FormLayout */
    JPanel subPanel = buildHorizontalSubPanel("max(48dlu;min):g(0.5), 8dlu, d, $lcgap, max(48dlu;min):g(0.5), 8dlu, d, 4dlu, max(48dlu;min)", ValidationFactory.wrap(priceField), "Label.Quantity", ValidationFactory.wrap(quantityField), "Label.Gains", gainsPanel);
    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.Price", cc.xy(1, 3));
    add(subPanel, cc.xy(3, 3));
    add("Label.Fees", cc.xy(5, 3));
    add(feePanel, cc.xy(7, 3));
    add("Label.Memo", cc.xy(1, 5));
    add(memoField, cc.xy(3, 5));
    add("Label.Total", cc.xy(5, 5));
    add(totalField, cc.xy(7, 5));
    add(getReconcileCheckBox(), cc.xyw(5, 7, 3));
    add("Label.Account", cc.xy(1, 7));
    add(accountExchangePanel, cc.xy(3, 7));
}
Also used : FormLayout(com.jgoodies.forms.layout.FormLayout) JPanel(javax.swing.JPanel) CellConstraints(com.jgoodies.forms.layout.CellConstraints)

Example 68 with CellConstraints

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

the class SplitMergeSharePanel method layoutMainPanel.

private void layoutMainPanel() {
    focusFirstComponent();
    final FormLayout layout = new FormLayout("right:d, $lcgap, 50dlu:g, 8dlu, right:d, $lcgap, max(65dlu;min)", "f:d, $nlgap, f:d, $nlgap, f:d");
    layout.setRowGroups(new int[][] { { 1, 3, 5 } });
    final CellConstraints cc = new CellConstraints();
    setLayout(layout);
    /* Create a sub panel to work around a column spanning problem in FormLayout */
    final JPanel subPanel = buildHorizontalSubPanel("max(48dlu;min):g(0.5), 8dlu, d, $lcgap, max(48dlu;min):g(0.5)", ValidationFactory.wrap(priceField), "Label.Quantity", ValidationFactory.wrap(quantityField));
    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.Price", cc.xy(1, 3));
    add(subPanel, cc.xy(3, 3));
    add("Label.Total", cc.xy(5, 3));
    add(totalField, cc.xy(7, 3));
    add("Label.Memo", cc.xy(1, 5));
    add(memoField, cc.xy(3, 5));
    add(getReconcileCheckBox(), cc.xyw(5, 5, 3));
}
Also used : FormLayout(com.jgoodies.forms.layout.FormLayout) JPanel(javax.swing.JPanel) CellConstraints(com.jgoodies.forms.layout.CellConstraints)

Example 69 with CellConstraints

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

the class ReinvestDividendPanel method layoutMainPanel.

private void layoutMainPanel() {
    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);
    /* Create a sub panel to work around a column spanning problem in FormLayout */
    JPanel subPanel = buildHorizontalSubPanel("max(48dlu;min):g(0.5), 8dlu, d, $lcgap, max(48dlu;min):g(0.5), 8dlu, d, 4dlu, max(48dlu;min)", ValidationFactory.wrap(priceField), "Label.Quantity", ValidationFactory.wrap(quantityField), "Label.Gains", gainsPanel);
    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.Price", cc.xy(1, 3));
    add(subPanel, cc.xy(3, 3));
    add("Label.Fees", cc.xy(5, 3));
    add(feePanel, cc.xy(7, 3));
    add("Label.Memo", cc.xy(1, 5));
    add(memoField, cc.xy(3, 5));
    add("Label.Total", cc.xy(5, 5));
    add(totalField, cc.xy(7, 5));
    add(getReconcileCheckBox(), cc.xyw(1, 7, 5));
}
Also used : FormLayout(com.jgoodies.forms.layout.FormLayout) JPanel(javax.swing.JPanel) CellConstraints(com.jgoodies.forms.layout.CellConstraints)

Example 70 with CellConstraints

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

the class WizardDialog method layoutMainPanel.

private void layoutMainPanel() {
    initComponents();
    CellConstraints cc = new CellConstraints();
    FormLayout lay = new FormLayout("p, $rgap, min(220dlu;d):g", "");
    DefaultFormBuilder builder = new DefaultFormBuilder(lay);
    builder.border(Borders.DIALOG);
    builder.appendRow(RowSpec.decode("f:p:g"));
    builder.append(buildTaskPanel(), pagePanel);
    builder.appendSeparator();
    builder.nextLine();
    builder.appendRelatedComponentsGapRow();
    builder.nextLine();
    builder.appendRow("p");
    builder.add(buildButtonPanel(), cc.xyw(1, builder.getRow(), 3));
    getContentPane().add(builder.getPanel());
}
Also used : FormLayout(com.jgoodies.forms.layout.FormLayout) DefaultFormBuilder(com.jgoodies.forms.builder.DefaultFormBuilder) 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