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;
}
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));
}
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));
}
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();
}
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));
}
Aggregations