Search in sources :

Example 96 with CellConstraints

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

the class RecurringEntryDialog method createFreqPanel.

private JPanel createFreqPanel() {
    FormLayout layout = new FormLayout("right:p, 4dlu, max(48dlu;min), 6dlu, p, f:p:g", "f:p, 3dlu, min");
    CellConstraints cc = new CellConstraints();
    JPanel p = new JPanel(layout);
    startDateField = new DatePanel();
    enabledCheckBox = new JCheckBox(rb.getString("Button.Enabled"));
    freqTab = new JTabbedPane();
    freqTab.add(rb.getString("Tab.None"), new NoneTab());
    freqTab.add(rb.getString("Tab.Day"), new DayTab());
    freqTab.add(rb.getString("Tab.Week"), new WeekTab());
    freqTab.add(rb.getString("Tab.Month"), new MonthTab());
    freqTab.add(rb.getString("Tab.Year"), new YearTab());
    tabMap.put(OneTimeReminder.class, 0);
    tabMap.put(DailyReminder.class, 1);
    tabMap.put(WeeklyReminder.class, 2);
    tabMap.put(MonthlyReminder.class, 3);
    tabMap.put(YearlyReminder.class, 4);
    p.add(new JLabel(rb.getString("Label.FirstPayDate")), cc.xy(1, 1));
    p.add(startDateField, cc.xy(3, 1));
    p.add(enabledCheckBox, cc.xy(5, 1));
    p.add(freqTab, cc.xywh(1, 3, 6, 1));
    return p;
}
Also used : FormLayout(com.jgoodies.forms.layout.FormLayout) JCheckBox(javax.swing.JCheckBox) JPanel(javax.swing.JPanel) DatePanel(jgnash.ui.components.DatePanel) JTabbedPane(javax.swing.JTabbedPane) JLabel(javax.swing.JLabel) CellConstraints(com.jgoodies.forms.layout.CellConstraints)

Example 97 with CellConstraints

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

the class WeekTab method layoutMainPanel.

private void layoutMainPanel() {
    FormLayout layout = new FormLayout("right:p, $lcgap, f:p, 2dlu, max(48dlu;min), $lcgap, f:p, 2dlu, f:d", "f:p, $lgap, f:p, $lgap, f:p");
    layout.setRowGroups(new int[][] { { 1, 3, 5 } });
    setLayout(layout);
    setBorder(Borders.DIALOG);
    CellConstraints cc = new CellConstraints();
    noEndButton = new JRadioButton(rb.getString("Button.NoEndDate"));
    endButton = new JRadioButton();
    endDateField = new DatePanel();
    group.add(noEndButton);
    group.add(endButton);
    numberSpinner = new JSpinner(new SpinnerNumberModel(1, 1, 52, 1));
    add(new JLabel(rb.getString("Label.Every")), cc.xy(1, 1));
    add(numberSpinner, cc.xywh(3, 1, 3, 1));
    add(new JLabel(rb.getString("Tab.Week")), cc.xy(7, 1));
    add(new JLabel(rb.getString("Label.EndOn")), cc.xy(1, 3));
    add(noEndButton, cc.xywh(3, 3, 5, 1));
    add(endButton, cc.xy(3, 5));
    add(endDateField, cc.xy(5, 5));
}
Also used : FormLayout(com.jgoodies.forms.layout.FormLayout) SpinnerNumberModel(javax.swing.SpinnerNumberModel) JRadioButton(javax.swing.JRadioButton) DatePanel(jgnash.ui.components.DatePanel) JSpinner(javax.swing.JSpinner) JLabel(javax.swing.JLabel) CellConstraints(com.jgoodies.forms.layout.CellConstraints)

Example 98 with CellConstraints

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

the class MainViewPanel method layoutPanel.

private void layoutPanel() {
    FormLayout layout = new FormLayout("min, $lcgap, fill:min:g", "fill:p:g");
    CellConstraints cc = new CellConstraints();
    setLayout(layout);
    add(buttonPanel, cc.xy(1, 1));
    add(contentPanel, cc.xy(3, 1));
}
Also used : FormLayout(com.jgoodies.forms.layout.FormLayout) CellConstraints(com.jgoodies.forms.layout.CellConstraints)

Example 99 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 100 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)

Aggregations

CellConstraints (com.jgoodies.forms.layout.CellConstraints)126 FormLayout (com.jgoodies.forms.layout.FormLayout)81 JPanel (javax.swing.JPanel)60 Dimension (java.awt.Dimension)41 JLabel (javax.swing.JLabel)29 JScrollPane (javax.swing.JScrollPane)26 TitledSeparator (com.jeta.forms.components.separator.TitledSeparator)6 DatePanel (jgnash.ui.components.DatePanel)5 JRadioButton (javax.swing.JRadioButton)4 JSpinner (javax.swing.JSpinner)4 SpinnerNumberModel (javax.swing.SpinnerNumberModel)4 GridConstraints (com.intellij.uiDesigner.core.GridConstraints)3 DefaultFormBuilder (com.jgoodies.forms.builder.DefaultFormBuilder)3 FileChooserDescriptor (com.intellij.openapi.fileChooser.FileChooserDescriptor)2 TextFieldWithBrowseButton (com.intellij.openapi.ui.TextFieldWithBrowseButton)2 PanelBuilder (com.jgoodies.forms.builder.PanelBuilder)2 ResourceBundle (java.util.ResourceBundle)2 JButton (javax.swing.JButton)2 JCheckBox (javax.swing.JCheckBox)2 UserActivityListener (com.intellij.ui.UserActivityListener)1