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