List of usage examples for com.jgoodies.forms.layout CellConstraints xy
public CellConstraints xy(int col, int row)
Examples:
cc.xy(1, 1); cc.xy(1, 3);
From source file:com.salas.bb.utils.uif.HeaderPanelExt.java
License:Open Source License
/** * Builds the panel./*from w w w .ja v a 2 s. c o m*/ */ private void build() { setLayout(new FormLayout(COLUMNS, ROWS)); CellConstraints cc = new CellConstraints(); add(buildCenterComponent(), cc.xy(1, 1)); add(buildBottomComponent(), cc.xy(1, 2, CellConstraints.FILL, CellConstraints.BOTTOM)); }
From source file:com.salas.bb.utils.uif.HeaderPanelExt.java
License:Open Source License
/** * Builds and answers the panel's center component. *//*from w w w. j a v a 2s. c o m*/ protected JComponent buildCenterComponent() { FormLayout fl = new FormLayout("7dlu, 9dlu, pref:grow, 14dlu, pref, 4dlu", "7dlu, pref, 2dlu, pref, 7dlu:grow"); JPanel panel = new JPanel(fl); // if (height != HEIGHT_AUTO) // { Dimension size = new Dimension(300, height); panel.setMinimumSize(size); panel.setPreferredSize(size); // } panel.setOpaque(false); CellConstraints cc = new CellConstraints(); panel.add(titleLabel, cc.xyw(2, 2, 2)); panel.add(descriptionArea, cc.xy(3, 4)); panel.add(iconLabel, cc.xywh(5, 1, 1, 5)); return panel; }
From source file:com.salas.bb.utils.uif.ProgressPanel.java
License:Open Source License
/** * Create a new panel.// w w w . jav a 2 s .com * * @param progressLabel a label to show above the progress bar. */ public ProgressPanel(String progressLabel) { setLayout(new FormLayout("5dlu, center:pref:grow, 5dlu", "5dlu:grow, pref, 5dlu, pref, 5dlu:grow")); JLabel label = new JLabel(progressLabel); label.setBackground(Color.WHITE); setBackground(Color.WHITE); progressBar = new JProgressBar(0, 99); progressBar.setPreferredSize(new Dimension(250, (int) progressBar.getPreferredSize().getHeight())); CellConstraints cc = new CellConstraints(); add(label, cc.xy(2, 2)); add(progressBar, cc.xy(2, 4)); }
From source file:com.salas.bb.views.ArticleListPanel.java
License:Open Source License
/** * Creates a sub-toolbar with two models. * * @return sub-toolbar./*from w w w.ja va 2s.c o m*/ */ private JToolBar createSubtoolbar() { final JToolBar toolbar = new JToolBar(); toolbar.setRollover(true); toolbar.setAlignmentY(0.0f); toolbar.setOpaque(false); toolbar.setBorder(null); toolbar.setBorderPainted(false); ToolBarBuilder subTBbldr = new ToolBarBuilder(toolbar); final JComboBox comboBox = new JComboBox(); // Indexes of items in this list should correspond to the values of // filter setting from FeedRenderingSettings class (FILTER_XYZ constants) createNAddComboBoxAction(comboBox, ActionsTable.CMD_ARTICLE_SHOW_ALL_TB); createNAddComboBoxAction(comboBox, ActionsTable.CMD_ARTICLE_SHOW_UNREAD_TB); createNAddComboBoxAction(comboBox, ActionsTable.CMD_ARTICLE_SHOW_PINNED_TB); if (SentimentsFeature.isAvailable()) { createNAddComboBoxAction(comboBox, ActionsTable.CMD_ARTICLE_SHOW_POSITIVE_TB); createNAddComboBoxAction(comboBox, ActionsTable.CMD_ARTICLE_SHOW_NEGATIVE_TB); createNAddComboBoxAction(comboBox, ActionsTable.CMD_ARTICLE_SHOW_NON_NEGATIVE_TB); } int filter = Math.min(RenderingManager.getArticleFilter(), comboBox.getItemCount() - 1); comboBox.addActionListener(JComboBoxActionItem.getComboBoxListener()); comboBox.setOpaque(!SystemUtils.IS_OS_MAC); comboBox.setFocusable(false); comboBox.setSelectedIndex(filter); // Listen to changes of FILTER property and update the selection RenderingManager.addPropertyChangeListener(RenderingSettingsNames.ARTICLE_FILTER, new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { comboBox.setSelectedIndex(RenderingManager.getArticleFilter()); } }); JPanel comboboxPanel = new JPanel(new FormLayout("10px, p", SystemUtils.IS_OS_MAC ? "1px, p" : "0, 20px")); CellConstraints cc = new CellConstraints(); comboboxPanel.add(comboBox, cc.xy(2, 2)); // Mac OS Aqua look has a bug with JComboBox sizing depending on the font size // The report: http://lists.apple.com/archives/Java-dev/2005/Jan/msg00510.html // and the answer: http://lists.apple.com/archives/Java-dev/2005/Jan/msg00511.html // // The page with screenshots of how the Quaqua library deals with the JComboBox // look through the custom component look painting (not a native component): // http://www.randelshofer.ch/quaqua/guide/jcombobox.html if (!SystemUtils.IS_OS_MAC) { comboBox.setFont(new Font("Tahoma", Font.PLAIN, 10)); } comboboxPanel.setOpaque(false); subTBbldr.add(comboboxPanel); subTBbldr.addGap(); subTBbldr.add(new ViewModeSelector(GlobalModel.SINGLETON.getViewModeValueModel())); return toolbar; }
From source file:com.salas.bb.views.feeds.html.ArticlesGroup.java
License:Open Source License
/** GUI initialization. */ private void initGUI() { setLayout(new FormLayout("5dlu, center:min, 5dlu, left:min:grow, 5dlu", "1dlu, pref, 1dlu")); CellConstraints cc = new CellConstraints(); add(lbSign, cc.xy(2, 2)); add(lbTitle, cc.xy(4, 2));/*from ww w . j a v a2 s . c om*/ setBorder(new UpDownBorder(Color.decode("#7a7a7a"))); }
From source file:com.salas.bb.views.feeds.NoFeedDisplay.java
License:Open Source License
/** * Creates feed display.// w w w . j av a 2 s .c om * * @param aConfig configuration. * @param pageCountModel model. */ public NoFeedDisplay(IFeedDisplayConfig aConfig, ValueModel pageCountModel) { super(null, null, pageCountModel); // There are no pages pageCountModel.setValue(0); config = aConfig; viewportSizeMonitor = new ViewportSizeMonitor(); setLayout(new FormLayout("5dlu, center:pref:grow, 5dlu", "5dlu:grow, pref, 5dlu:grow")); JLabel label = new JLabel(Strings.message("panel.articles.no.feed.selected")); label.setBackground(config.getDisplayBGColor()); setBackground(config.getDisplayBGColor()); CellConstraints cc = new CellConstraints(); add(label, cc.xy(2, 2)); }
From source file:com.salas.bb.whatshot.Dialog.java
License:Open Source License
/** * Creates top bar with progress indicator, results count and search field. * * @return top bar component./* w w w. java 2s. c om*/ */ private Component buildTopBar() { BBFormBuilder builder = new BBFormBuilder("p, 5px, p, 5px, p, 5px:grow, p"); builder.append(starz); builder.append(cbTimeOptions); if (SystemUtils.IS_OS_MAC) { CellConstraints cc = new CellConstraints(); JPanel p1 = new JPanel(new FormLayout("p", "p")); p1.add(chOnlyUnread, cc.xy(1, 1)); builder.append(p1); p1 = new JPanel(new FormLayout("p", "p, 4px")); p1.add(btnSetup, cc.xy(1, 1)); builder.append(p1); } else { builder.append(chOnlyUnread); builder.append(btnSetup); } builder.appendUnrelatedComponentsGapRow(); return builder.getPanel(); }
From source file:com.spirit.cartera.gui.panel.JDAddingAccountBank.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner Open Source Project license - unknown jdAddingAccountBank = new JPanel(); jpConfirmation = new JPanel(); lblMessage = new JLabel(); lblBank = new JLabel(); cmbBank = new JComboBox(); lblAccountBank = new JLabel(); txtAccountBank = new JTextField(); lblAccountType = new JLabel(); rbCheckingAccount = new JRadioButton(); rbSavingsAccount = new JRadioButton(); jpButtons = new JPanel(); btnAccept = new JButton(); btnCancel = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setTitle("Nueva cuenta bancaria"); Container contentPane = getContentPane(); contentPane.setLayout(new BorderLayout()); //======== jdAddingAccountBank ======== {// ww w . ja va 2 s .co m jdAddingAccountBank.setBorder(Borders.DIALOG_BORDER); jdAddingAccountBank.setLayout(new BorderLayout()); //======== jpConfirmation ======== { jpConfirmation.setBorder(new EtchedBorder()); jpConfirmation.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec("max(default;150dlu)"), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(10)) }, new RowSpec[] { new RowSpec(Sizes.dluY(10)), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.dluY(10)) })); //---- lblMessage ---- lblMessage.setText("Ingrese los datos de la nueva cuenta bancaria:"); lblMessage.setFont(new Font("Tahoma", Font.BOLD, 11)); jpConfirmation.add(lblMessage, cc.xywh(3, 3, 5, 1)); //---- lblBank ---- lblBank.setText("Banco:"); lblBank.setFont(new Font("Tahoma", Font.BOLD, 11)); jpConfirmation.add(lblBank, cc.xy(3, 7)); jpConfirmation.add(cmbBank, cc.xywh(5, 7, 3, 1)); //---- lblAccountBank ---- lblAccountBank.setText("Cuenta bancaria:"); lblAccountBank.setFont(new Font("Tahoma", Font.BOLD, 11)); jpConfirmation.add(lblAccountBank, cc.xy(3, 9)); jpConfirmation.add(txtAccountBank, cc.xywh(5, 9, 3, 1)); //---- lblAccountType ---- lblAccountType.setText("Tipo de cuenta:"); lblAccountType.setFont(new Font("Tahoma", Font.BOLD, 11)); jpConfirmation.add(lblAccountType, cc.xy(3, 11)); //---- rbCheckingAccount ---- rbCheckingAccount.setText("Corriente"); rbCheckingAccount.setSelected(true); jpConfirmation.add(rbCheckingAccount, cc.xy(5, 11)); //---- rbSavingsAccount ---- rbSavingsAccount.setText("Ahorros"); jpConfirmation.add(rbSavingsAccount, cc.xy(7, 11)); } jdAddingAccountBank.add(jpConfirmation, BorderLayout.CENTER); //======== jpButtons ======== { jpButtons.setBorder(Borders.BUTTON_BAR_GAP_BORDER); jpButtons.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.GLUE_COLSPEC, FormFactory.BUTTON_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC }, RowSpec.decodeSpecs("pref"))); //---- btnAccept ---- btnAccept.setText("Aceptar"); jpButtons.add(btnAccept, cc.xy(2, 1)); //---- btnCancel ---- btnCancel.setText("Cancelar"); jpButtons.add(btnCancel, cc.xy(4, 1)); } jdAddingAccountBank.add(jpButtons, BorderLayout.SOUTH); } contentPane.add(jdAddingAccountBank, BorderLayout.CENTER); pack(); setLocationRelativeTo(getOwner()); //---- bgAccountTypes ---- ButtonGroup bgAccountTypes = new ButtonGroup(); bgAccountTypes.add(rbCheckingAccount); bgAccountTypes.add(rbSavingsAccount); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:com.spirit.cartera.gui.panel.JDApplyWalletTransaction.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner Open Source Project license - unknown DefaultComponentFactory compFactory = DefaultComponentFactory.getInstance(); JDApplyWalletTransaction = new JPanel(); JPApplyWalletTransaction = new JPanel(); jfsPendingAccounts = compFactory.createSeparator("Cuentas pendientes"); jpFilteredBy = new JPanel(); lblToFilter = new JLabel(); btnRemoveFilters = new JButton(); btnFilterList = new JButton(); lblTransaction = new JLabel(); cmbTransaction = new JComboBox(); lblInitialDate = new JLabel(); txtInitialDate = new JFormattedTextField(); lblFinalDate = new JLabel(); txtFinalDate = new JFormattedTextField(); lblOverdueDays = new JLabel(); cmbOverdueDays = new JComboBox(); lblValueGreaterThan = new JLabel(); txtValueGreaterThan = new JFormattedTextField(); lblBalanceGreaterThan = new JLabel(); txtBalanceGreaterThan = new JFormattedTextField(); spTblPendingAccounts = new JScrollPane(); tblPendingAccounts = new JTable(); jfsApplyingDocuments = compFactory.createSeparator("Documentos a aplicar"); jpApplyingDocuments = new JPanel(); spApplyingDocuments = new JScrollPane(); tblApplyingDocuments = new JTable(); btnAccept = new JButton(); btnCancel = new JButton(); btnUndo = new JButton(); btnApply = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setTitle("Cruce de cuentas"); Container contentPane = getContentPane(); contentPane.setLayout(new BorderLayout()); //======== JDApplyWalletTransaction ======== {/*w w w . j a va2s .c o m*/ JDApplyWalletTransaction.setBorder(Borders.DIALOG_BORDER); JDApplyWalletTransaction.setLayout(new BorderLayout()); //======== JPApplyWalletTransaction ======== { JPApplyWalletTransaction.setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec(Sizes.dluX(10)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(10)) }, new RowSpec[] { new RowSpec(Sizes.dluY(10)), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.dluY(75)), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.dluY(10)), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec("max(default;75dlu)"), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); JPApplyWalletTransaction.add(jfsPendingAccounts, cc.xywh(3, 1, 11, 1)); //======== jpFilteredBy ======== { jpFilteredBy.setBorder(new EtchedBorder()); jpFilteredBy.setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec(Sizes.DLUX3), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec("max(default;100dlu)"), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec("max(default;75dlu)"), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec("max(default;75dlu)"), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.DLUX3) }, new RowSpec[] { new RowSpec(Sizes.DLUY3), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.DLUY3) })); //---- lblToFilter ---- lblToFilter.setText("Filtrar:"); lblToFilter.setFont(new Font("Tahoma", Font.BOLD, 11)); lblToFilter.setForeground(UIManager.getColor("TitledBorder.titleColor")); jpFilteredBy.add(lblToFilter, cc.xy(3, 3)); //---- btnRemoveFilters ---- btnRemoveFilters.setText("Remover filtros"); jpFilteredBy.add(btnRemoveFilters, cc.xywh(9, 3, 3, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- btnFilterList ---- btnFilterList.setText("Filtrar listado"); jpFilteredBy.add(btnFilterList, cc.xy(13, 3)); //---- lblTransaction ---- lblTransaction.setText("Transacci\u00f3n:"); lblTransaction.setFont(new Font("Tahoma", Font.BOLD, 11)); jpFilteredBy.add(lblTransaction, cc.xy(3, 5)); jpFilteredBy.add(cmbTransaction, cc.xy(5, 5)); //---- lblInitialDate ---- lblInitialDate.setText("Fecha inicial:"); lblInitialDate.setFont(new Font("Tahoma", Font.BOLD, 11)); jpFilteredBy.add(lblInitialDate, cc.xy(7, 5)); //---- txtInitialDate ---- txtInitialDate.setHorizontalAlignment(SwingConstants.CENTER); jpFilteredBy.add(txtInitialDate, cc.xy(9, 5)); //---- lblFinalDate ---- lblFinalDate.setText("Fecha final:"); lblFinalDate.setFont(new Font("Tahoma", Font.BOLD, 11)); jpFilteredBy.add(lblFinalDate, cc.xy(11, 5)); //---- txtFinalDate ---- txtFinalDate.setHorizontalAlignment(SwingConstants.CENTER); jpFilteredBy.add(txtFinalDate, cc.xy(13, 5)); //---- lblOverdueDays ---- lblOverdueDays.setText("D\u00edas vencidos:"); lblOverdueDays.setFont(new Font("Tahoma", Font.BOLD, 11)); jpFilteredBy.add(lblOverdueDays, cc.xy(3, 7)); //---- cmbOverdueDays ---- cmbOverdueDays .setModel(new DefaultComboBoxModel(new String[] { "-", ">30", ">60", ">90", ">120" })); jpFilteredBy.add(cmbOverdueDays, cc.xy(5, 7)); //---- lblValueGreaterThan ---- lblValueGreaterThan.setText("Valor mayor a:"); lblValueGreaterThan.setFont(new Font("Tahoma", Font.BOLD, 11)); jpFilteredBy.add(lblValueGreaterThan, cc.xy(7, 7)); //---- txtValueGreaterThan ---- txtValueGreaterThan.setHorizontalAlignment(SwingConstants.RIGHT); jpFilteredBy.add(txtValueGreaterThan, cc.xy(9, 7)); //---- lblBalanceGreaterThan ---- lblBalanceGreaterThan.setText("Saldo mayor a:"); lblBalanceGreaterThan.setFont(new Font("Tahoma", Font.BOLD, 11)); jpFilteredBy.add(lblBalanceGreaterThan, cc.xy(11, 7)); //---- txtBalanceGreaterThan ---- txtBalanceGreaterThan.setHorizontalAlignment(SwingConstants.RIGHT); jpFilteredBy.add(txtBalanceGreaterThan, cc.xy(13, 7)); } JPApplyWalletTransaction.add(jpFilteredBy, cc.xywh(3, 3, 11, 1)); //======== spTblPendingAccounts ======== { //---- tblPendingAccounts ---- tblPendingAccounts.setModel(new DefaultTableModel(new Object[][] {}, new String[] { "Selec.", "Transacci\u00f3n", "Fecha", "Dias vencidos", "Valor", "Saldo" }) { Class[] columnTypes = new Class[] { Boolean.class, Object.class, Object.class, Object.class, Object.class, Object.class }; boolean[] columnEditable = new boolean[] { true, false, false, false, false, false }; @Override public Class<?> getColumnClass(int columnIndex) { return columnTypes[columnIndex]; } @Override public boolean isCellEditable(int rowIndex, int columnIndex) { return columnEditable[columnIndex]; } }); spTblPendingAccounts.setViewportView(tblPendingAccounts); } JPApplyWalletTransaction.add(spTblPendingAccounts, cc.xywh(3, 5, 11, 1)); JPApplyWalletTransaction.add(jfsApplyingDocuments, cc.xywh(3, 7, 11, 1)); //======== jpApplyingDocuments ======== { jpApplyingDocuments.setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(100)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(100)) }, new RowSpec[] { new RowSpec("max(default;75dlu)"), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.dluY(10)) })); //======== spApplyingDocuments ======== { //---- tblApplyingDocuments ---- tblApplyingDocuments.setModel(new DefaultTableModel(new Object[][] {}, new String[] { "Transacci\u00f3n", "Saldo", "Valor a aplicar", "Fecha de aplicaci\u00f3n" }) { Class[] columnTypes = new Class[] { Object.class, Double.class, Double.class, Object.class }; boolean[] columnEditable = new boolean[] { false, false, true, true }; @Override public Class<?> getColumnClass(int columnIndex) { return columnTypes[columnIndex]; } @Override public boolean isCellEditable(int rowIndex, int columnIndex) { return columnEditable[columnIndex]; } }); spApplyingDocuments.setViewportView(tblApplyingDocuments); } jpApplyingDocuments.add(spApplyingDocuments, cc.xywh(1, 1, 5, 1)); } JPApplyWalletTransaction.add(jpApplyingDocuments, cc.xywh(3, 9, 11, 3)); //---- btnAccept ---- btnAccept.setText("Aceptar"); JPApplyWalletTransaction.add(btnAccept, cc.xy(7, 13)); //---- btnCancel ---- btnCancel.setText("Cancelar"); JPApplyWalletTransaction.add(btnCancel, cc.xy(9, 13)); //---- btnUndo ---- btnUndo.setText("Deshacer"); JPApplyWalletTransaction.add(btnUndo, cc.xy(11, 13)); //---- btnApply ---- btnApply.setText("Aplicar"); JPApplyWalletTransaction.add(btnApply, cc.xy(13, 13)); } JDApplyWalletTransaction.add(JPApplyWalletTransaction, BorderLayout.CENTER); } contentPane.add(JDApplyWalletTransaction, BorderLayout.NORTH); pack(); setLocationRelativeTo(getOwner()); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:com.spirit.cartera.gui.panel.JDLevelingConfirmation.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner Open Source Project license - unknown jdPendingBalancesConfirmation = new JPanel(); jpConfirmation = new JPanel(); lblQuestion = new JLabel(); rbOptionYes = new JRadioButton(); cmbLevelingDocument = new JComboBox(); cbGenerateAdvancePayment = new JCheckBox(); cmbAdvancePaymentDocument = new JComboBox(); rbOptionNo = new JRadioButton(); jpButtons = new JPanel(); btnAccept = new JButton(); btnCancel = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setTitle("Confirmaci\u00f3n de nivelaci\u00f3n"); Container contentPane = getContentPane(); contentPane.setLayout(new BorderLayout()); //======== jdPendingBalancesConfirmation ======== {//from w w w . j av a 2s . c o m jdPendingBalancesConfirmation.setBorder(Borders.DIALOG_BORDER); jdPendingBalancesConfirmation.setLayout(new BorderLayout()); //======== jpConfirmation ======== { jpConfirmation.setBorder(new EtchedBorder()); jpConfirmation.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec("max(default;200dlu):grow"), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(10)) }, new RowSpec[] { new RowSpec(Sizes.dluY(10)), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.dluY(10)) })); //---- lblQuestion ---- lblQuestion.setText("\u00bfDesea nivelar el saldo pendiente de este comprobante?"); lblQuestion.setFont(new Font("Tahoma", Font.BOLD, 11)); jpConfirmation.add(lblQuestion, cc.xywh(3, 3, 3, 1)); //---- rbOptionYes ---- rbOptionYes.setText("S\u00ed, deseo nivelarlo con un comprobante de este tipo:"); jpConfirmation.add(rbOptionYes, cc.xy(3, 7)); jpConfirmation.add(cmbLevelingDocument, cc.xy(5, 7)); //---- cbGenerateAdvancePayment ---- cbGenerateAdvancePayment.setHorizontalAlignment(SwingConstants.RIGHT); cbGenerateAdvancePayment.setText("Generar anticipo:"); jpConfirmation.add(cbGenerateAdvancePayment, cc.xy(3, 9)); jpConfirmation.add(cmbAdvancePaymentDocument, cc.xy(5, 9)); //---- rbOptionNo ---- rbOptionNo.setText( "No, deseo mantener el saldo pendiente en este comprobante y cruzarlo posteriormente"); jpConfirmation.add(rbOptionNo, cc.xywh(3, 11, 3, 1)); } jdPendingBalancesConfirmation.add(jpConfirmation, BorderLayout.CENTER); //======== jpButtons ======== { jpButtons.setBorder(Borders.BUTTON_BAR_GAP_BORDER); jpButtons.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.GLUE_COLSPEC, FormFactory.BUTTON_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC }, RowSpec.decodeSpecs("pref"))); //---- btnAccept ---- btnAccept.setText("Aceptar"); jpButtons.add(btnAccept, cc.xy(2, 1)); //---- btnCancel ---- btnCancel.setText("Cancelar"); jpButtons.add(btnCancel, cc.xy(4, 1)); } jdPendingBalancesConfirmation.add(jpButtons, BorderLayout.SOUTH); } contentPane.add(jdPendingBalancesConfirmation, BorderLayout.CENTER); pack(); setLocationRelativeTo(getOwner()); //---- bgOptions ---- ButtonGroup bgOptions = new ButtonGroup(); bgOptions.add(rbOptionYes); bgOptions.add(rbOptionNo); // JFormDesigner - End of component initialization //GEN-END:initComponents }