Search in sources :

Example 56 with FormLayout

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

the class AbstractCrosstabReport method getReportController.

/**
     * Creates a report control panel. May return null if a panel is not used
     *
     * @return control panel
     */
@Override
public JPanel getReportController() {
    FormLayout layout = new FormLayout("p, 4dlu, max(p;45dlu), 8dlu, p, 4dlu, max(p;45dlu), 8dlu, p, 4dlu, p, 8dlu, p, p", "");
    DefaultFormBuilder builder = new DefaultFormBuilder(layout);
    builder.border(Borders.DIALOG);
    builder.append(rb.getString("Label.StartDate"), startDateField);
    builder.append(rb.getString("Label.EndDate"), endDateField);
    builder.append(rb.getString("Label.Resolution"), resolutionList);
    builder.append(refreshButton);
    builder.nextLine();
    builder.append(rb.getString("Label.SortOrder"), sortOrderList);
    builder.append(showLongNamesCheckBox, 4);
    builder.append(hideZeroBalanceAccounts, 4);
    return builder.getPanel();
}
Also used : FormLayout(com.jgoodies.forms.layout.FormLayout) DefaultFormBuilder(com.jgoodies.forms.builder.DefaultFormBuilder)

Example 57 with FormLayout

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

the class MonthBalanceCSV method getOptions.

private void getOptions() {
    final DatePanel startField = new DatePanel();
    final DatePanel endField = new DatePanel();
    ButtonGroup group = new ButtonGroup();
    JRadioButton vButton = new JRadioButton(rb.getString("Button.Vertical"));
    JRadioButton hButton = new JRadioButton(rb.getString("Button.Horizontal"));
    group.add(vButton);
    group.add(hButton);
    vButton.setSelected(true);
    FormLayout layout = new FormLayout("right:p, 4dlu, p:g", "");
    DefaultFormBuilder builder = new DefaultFormBuilder(layout);
    builder.rowGroupingEnabled(true);
    builder.append(rb.getString("Label.StartDate"), startField);
    builder.append(rb.getString("Label.EndDate"), endField);
    builder.append(rb.getString("Label.Layout"), vButton);
    builder.append("", hButton);
    builder.nextLine();
    builder.appendUnrelatedComponentsGapRow();
    builder.nextLine();
    JPanel panel = builder.getPanel();
    int option = JOptionPane.showConfirmDialog(null, new Object[] { panel }, rb.getString("Message.StartEndDate"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);
    if (option == JOptionPane.OK_OPTION) {
        startDate = startField.getLocalDate();
        endDate = endField.getLocalDate();
    }
    vertical = vButton.isSelected();
}
Also used : FormLayout(com.jgoodies.forms.layout.FormLayout) JPanel(javax.swing.JPanel) JRadioButton(javax.swing.JRadioButton) ButtonGroup(javax.swing.ButtonGroup) DatePanel(jgnash.ui.components.DatePanel) DefaultFormBuilder(com.jgoodies.forms.builder.DefaultFormBuilder)

Example 58 with FormLayout

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

the class AbstractSumByTypeReport method getReportController.

/**
     * Creates a report control panel. May return null if a panel is not used
     * 
     * @return control panel
     */
@Override
public JPanel getReportController() {
    FormLayout layout = new FormLayout("p, $lcgap, max(p;55dlu), 8dlu, p, $lcgap, max(p;55dlu), 8dlu, p", "");
    DefaultFormBuilder builder = new DefaultFormBuilder(layout);
    builder.border(Borders.DIALOG);
    builder.append(rb.getString("Label.StartDate"), startDateField);
    builder.append(rb.getString("Label.EndDate"), endDateField);
    builder.append(refreshButton);
    builder.nextLine();
    builder.append(hideZeroBalanceAccounts, 9);
    return builder.getPanel();
}
Also used : FormLayout(com.jgoodies.forms.layout.FormLayout) DefaultFormBuilder(com.jgoodies.forms.builder.DefaultFormBuilder)

Example 59 with FormLayout

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

the class AccountRegisterReport method createDatePanel.

private JPanel createDatePanel() {
    FormLayout layout = new FormLayout("p, $lcgap, max(48dlu;min), 8dlu, p, $lcgap, max(48dlu;min)", "");
    DefaultFormBuilder builder = new DefaultFormBuilder(layout);
    builder.append(rb.getString("Label.StartDate"), startDateField);
    builder.append(rb.getString("Label.EndDate"), endDateField);
    return builder.getPanel();
}
Also used : FormLayout(com.jgoodies.forms.layout.FormLayout) DefaultFormBuilder(com.jgoodies.forms.builder.DefaultFormBuilder)

Example 60 with FormLayout

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

the class AccountRegisterReport method getReportController.

/**
     * Creates a report control panel.  May return null if a panel is not used
     * The ReportController is responsible for dynamic report options with the exception
     * of page format options
     *
     * @return control panel
     */
@Override
public JPanel getReportController() {
    FormLayout layout = new FormLayout("p, $lcgap, p:g, 8dlu, p, 8dlu, p", "f:d, $lgap, f:d");
    DefaultFormBuilder builder = new DefaultFormBuilder(layout);
    builder.border(Borders.DIALOG);
    builder.append(rb.getString("Label.Account"), accountCombo);
    builder.append(refreshButton, 3);
    builder.nextLine();
    builder.nextLine();
    builder.append(createDatePanel(), 5);
    builder.append(detailSplitsCheckBox);
    builder.nextLine();
    builder.append(createFilterPanel(), 3);
    layout.addGroupedRow(1);
    layout.addGroupedRow(3);
    layout.addGroupedRow(5);
    return builder.getPanel();
}
Also used : FormLayout(com.jgoodies.forms.layout.FormLayout) 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