Search in sources :

Example 41 with FormLayout

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

the class NewFileTwo method layoutMainPanel.

private void layoutMainPanel() {
    initComponents();
    FormLayout layout = new FormLayout("p, 8dlu, f:d:g", "");
    DefaultFormBuilder builder = new DefaultFormBuilder(layout, this);
    builder.appendSeparator(rb.getString("Title.DefDefCurr"));
    builder.nextLine();
    builder.appendRelatedComponentsGapRow();
    builder.nextLine();
    builder.append(helpPane, 3);
    builder.nextLine();
    builder.appendRelatedComponentsGapRow();
    builder.nextLine();
    builder.append(rb.getString("Label.DefaultCurrency"), currencyCombo);
}
Also used : FormLayout(com.jgoodies.forms.layout.FormLayout) DefaultFormBuilder(com.jgoodies.forms.builder.DefaultFormBuilder)

Example 42 with FormLayout

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

the class BudgetPeriodPanel method layoutMainPanel.

private void layoutMainPanel() {
    FormLayout layout = new FormLayout("d:g", "d");
    DefaultFormBuilder builder = new DefaultFormBuilder(layout, this);
    setLayout(layout);
    table = new AccountPeriodResultsTable(model);
    table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    table.setFocusable(false);
    table.setCellSelectionEnabled(false);
    JTableHeader header = new JTableHeader(table.getColumnModel());
    header.setReorderingAllowed(false);
    header.setResizingAllowed(false);
    header.setTable(table);
    buildHeader(header);
    buildFooter();
    JTableUtils.packTables(table, footerTable);
    builder.add(table, CC.xy(1, 1));
    setBorder(ShadowBorder.getCompondShadowBorder());
    ToolTipManager.sharedInstance().unregisterComponent(table);
    ToolTipManager.sharedInstance().unregisterComponent(header);
}
Also used : FormLayout(com.jgoodies.forms.layout.FormLayout) DefaultFormBuilder(com.jgoodies.forms.builder.DefaultFormBuilder) JTableHeader(javax.swing.table.JTableHeader)

Example 43 with FormLayout

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

the class BudgetWizardDialog method layoutMainPanel.

private void layoutMainPanel() {
    initComponents();
    FormLayout layout = new FormLayout("p, $lcgap, f:p:g", "");
    DefaultFormBuilder builder = new DefaultFormBuilder(layout);
    builder.border(Borders.DIALOG);
    builder.appendRow(RowSpec.decode("f:p:g"));
    builder.append(helpPane, 3);
    builder.nextLine();
    builder.appendRelatedComponentsGapRow();
    builder.nextLine();
    builder.append(new JLabel(rb.getString("Label.Name")), ValidationFactory.wrap(budgetNameField));
    builder.nextLine();
    builder.appendRelatedComponentsGapRow();
    builder.nextLine();
    builder.append(rb.getString("Label.Period"), budgetPeriodCombo);
    builder.nextLine();
    builder.appendRelatedComponentsGapRow();
    builder.nextLine();
    builder.append(roundButton, 3);
    builder.nextLine();
    builder.appendUnrelatedComponentsGapRow();
    builder.nextLine();
    builder.append(StaticUIMethods.buildOKCancelBar(okButton, cancelButton), 3);
    getContentPane().add(builder.getPanel());
    pack();
    setMinimumSize(getSize());
}
Also used : FormLayout(com.jgoodies.forms.layout.FormLayout) DefaultFormBuilder(com.jgoodies.forms.builder.DefaultFormBuilder) JLabel(javax.swing.JLabel)

Example 44 with FormLayout

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

the class AccountRowFooterPanel method buildFooter.

private JComponent buildFooter() {
    FormLayout layout = new FormLayout("d:g", "d");
    DefaultFormBuilder builder = new DefaultFormBuilder(layout, new JXPanel());
    NumberFormat format = CommodityFormat.getFullNumberFormat(resultsModel.getBaseCurrency());
    footerTable = new BudgetResultsTable(new FooterModel(), format);
    footerTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    footerTable.setFocusable(false);
    footerTable.setCellSelectionEnabled(false);
    builder.add(footerTable, CC.xy(1, 1));
    builder.border(ShadowBorder.getCompondShadowBorder());
    return builder.getPanel();
}
Also used : FormLayout(com.jgoodies.forms.layout.FormLayout) DefaultFormBuilder(com.jgoodies.forms.builder.DefaultFormBuilder) JXPanel(org.jdesktop.swingx.JXPanel) NumberFormat(java.text.NumberFormat)

Example 45 with FormLayout

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

the class CheckDesignDialog method buildRightPanel.

private JPanel buildRightPanel() {
    FormLayout formLayout = new FormLayout("right:p, $lcgap, p:g", "");
    DefaultFormBuilder builder = new DefaultFormBuilder(formLayout);
    // JScrollPane fills and grows
    builder.appendRow(RowSpec.decode("f:p:g"));
    builder.append(new JScrollPane(objectList), 3);
    builder.append(StaticUIMethods.buildAddRemoveBar(addButton, removeButton), 3);
    builder.nextLine();
    builder.appendUnrelatedComponentsGapRow();
    builder.nextLine();
    builder.rowGroupingEnabled(true);
    builder.append(rb.getString("Label.Type"), typeCombo);
    builder.append(rb.getString("Label.Name"), nameField);
    builder.append(rb.getString("Label.XPos"), xPosField);
    builder.append(rb.getString("Label.YPos"), yPosField);
    builder.rowGroupingEnabled(false);
    builder.nextLine();
    builder.appendUnrelatedComponentsGapRow();
    builder.nextLine();
    builder.append(StaticUIMethods.buildOKCancelBar(clearButton, applyButton), 3);
    return builder.getPanel();
}
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)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