List of usage examples for com.jgoodies.forms.layout CellConstraints xyw
public CellConstraints xyw(int col, int row, int colSpan)
Examples:
cc.xyw(1, 3, 7); cc.xyw(1, 3, 2);
From source file:jgnash.ui.recurring.RecurringEntryDialog.java
License:Open Source License
private void layoutMainPanel() { FormLayout layout = new FormLayout("10dlu, p:g", "p, 3dlu, f:p:g, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 6dlu, p"); PanelBuilder builder = new PanelBuilder(layout); CellConstraints cc = new CellConstraints(); okButton = new JButton(rb.getString("Button.Ok")); cancelButton = new JButton(rb.getString("Button.Cancel")); builder.setBorder(Borders.DIALOG_BORDER); builder.addSeparator(rb.getString("Title.Transaction"), cc.xyw(1, 1, 2)); builder.add(createTransactionPanel(), cc.xy(2, 3)); builder.addSeparator(rb.getString("Title.Frequency"), cc.xyw(1, 5, 2)); builder.add(createFreqPanel(), cc.xy(2, 7)); builder.addSeparator(rb.getString("Title.Entry"), cc.xyw(1, 9, 2)); builder.add(createEntryPanel(), cc.xy(2, 11)); builder.add(ButtonBarFactory.buildOKCancelBar(okButton, cancelButton), cc.xy(2, 13)); getContentPane().add(builder.getPanel(), BorderLayout.CENTER); pack();// w w w . j a v a 2 s . c om }
From source file:jgnash.ui.register.DateChkNumberDialog.java
License:Open Source License
private void buildPanel() { initComponents();/* w ww . ja va2s . c o m*/ FormLayout layout = new FormLayout("max(20dlu;d), 4dlu, 75dlu:grow(1.0)", "f:d, 3dlu, f:d, 10dlu, f:d"); CellConstraints cc = new CellConstraints(); layout.setRowGroups(new int[][] { { 1, 3, 5 } }); JPanel p = new JPanel(layout); p.setBorder(Borders.DIALOG_BORDER); p.add(new JLabel(rb.getString("Label.Date")), cc.xy(1, 1)); p.add(datePanel, cc.xy(3, 1)); p.add(new JLabel(rb.getString("Label.Number")), cc.xy(1, 3)); p.add(numberCombo, cc.xy(3, 3)); p.add(ButtonBarFactory.buildOKCancelBar(okButton, cancelButton), cc.xyw(1, 5, 3)); getContentPane().add(p, BorderLayout.CENTER); }
From source file:jgnash.ui.register.invest.AddRemoveSharePanel.java
License:Open Source License
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"); layout.setRowGroups(new int[][] { { 1, 3, 5 } }); CellConstraints cc = new CellConstraints(); setLayout(layout);/*from w w w.ja v a 2 s .c o m*/ /* 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)", 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(reconciledButton, cc.xyw(5, 5, 3)); }
From source file:jgnash.ui.register.invest.BuySharePanel.java
License:Open Source License
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);/*from www . j a va 2 s .com*/ /* 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)", 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.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("Label.Account", cc.xy(1, 7)); add(accountExchangePanel, cc.xy(3, 7)); add(reconciledButton, cc.xyw(5, 7, 3)); }
From source file:jgnash.ui.register.invest.DividendPanel.java
License:Open Source License
private void layoutPanel() { removeAll();/* w ww . j a va2 s. c o m*/ 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); 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.Memo", cc.xy(1, 3)); add(memoField, cc.xy(3, 3)); add("Label.Dividend", cc.xy(5, 3)); add(ValidationFactory.wrap(dividendField), cc.xy(7, 3)); add("Label.IncomeAccount", cc.xy(1, 5)); add(incomeExchangePanel, cc.xy(3, 5)); add(reconciledButton, cc.xyw(5, 5, 3)); add("Label.Account", cc.xy(1, 7)); add(accountExchangePanel, cc.xy(3, 7)); }
From source file:jgnash.ui.register.invest.InvestmentTransactionDialog.java
License:Open Source License
private void layoutMainPanel() { Resource rb = Resource.get(); 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_BORDER);// w ww .j ava 2s . com getContentPane().setLayout(new java.awt.BorderLayout()); getContentPane().add(p, java.awt.BorderLayout.CENTER); pack(); }
From source file:jgnash.ui.register.invest.InvestmentTransactionPanel.java
License:Open Source License
private void layoutMainPanel() { initComponents();/* ww w .ja v a2s .c om*/ FormLayout layout = new FormLayout("d, 4dlu, m:g, 4dlu, m", "f:d, $ugap, f:d"); CellConstraints cc = new CellConstraints(); setBorder(new CompoundBorder(new ShadowBorder(), Borders.TABBED_DIALOG_BORDER)); setLayout(layout); add(cardPanel, cc.xyw(1, 1, 5)); add(new JSeparator(), cc.xyw(1, 2, 5)); add(new JLabel(rb.getString("Label.Action")), cc.xy(1, 3)); add(actionCombo, cc.xy(3, 3)); add(ButtonBarFactory.buildOKCancelBar(enterButton, cancelButton), cc.xy(5, 3)); }
From source file:jgnash.ui.register.invest.ReinvestDividendPanel.java
License:Open Source License
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);/*from w w w . j a v a 2 s. c o m*/ /* 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(reconciledButton, cc.xyw(1, 7, 5)); }
From source file:jgnash.ui.register.invest.ReturnOfCapitalPanel.java
License:Open Source License
private void layoutPanel() { removeAll();/* ww w . j av a2 s . c o m*/ 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); 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.Memo", cc.xy(1, 3)); add(memoField, cc.xy(3, 3)); add("Label.ReturnOfCapital", cc.xy(5, 3)); add(ValidationFactory.wrap(dividendField), cc.xy(7, 3)); add("Label.IncomeAccount", cc.xy(1, 5)); add(incomeExchangePanel, cc.xy(3, 5)); add(reconciledButton, cc.xyw(5, 5, 3)); add("Label.Account", cc.xy(1, 7)); add(accountExchangePanel, cc.xy(3, 7)); }
From source file:jgnash.ui.register.invest.SellSharePanel.java
License:Open Source License
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);//w w w .j a va 2 s .c om /* 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(reconciledButton, cc.xyw(5, 7, 3)); add("Label.Account", cc.xy(1, 7)); add(accountExchangePanel, cc.xy(3, 7)); }