List of usage examples for com.jgoodies.forms.layout Sizes dluY
public static ConstantSize dluY(int value)
From source file:NewLinksDialog.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner Open Source Project license - unknown ResourceBundle bundle = ResourceBundle.getBundle("NewLinksDialog"); JPanel dialogPane = new JPanel(); JPanel contentPanel = new JPanel(); JLabel labelLinks = new JLabel(); JScrollPane scrollPane1 = new JScrollPane(); JEditorPane urlsArea = ComponentFactory.getURLsEditorPane(); JLabel labelSaveTo = new JLabel(); comboPath = new JComboBox(); btnSelectPath = new JButton(); JLabel labelDescription = new JLabel(); JScrollPane scrollPane2 = new JScrollPane(); descriptionArea = ComponentFactory.getTextArea(); JXButtonPanel buttonBar = new JXButtonPanel(); btnPasteFromClipboard = new JButton(); okButton = new JButton(); btnStartPaused = new JButton(); cancelButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== Container contentPane = getContentPane(); contentPane.setLayout(new BorderLayout()); //======== dialogPane ======== {/*from w w w . j a va 2 s . c o m*/ dialogPane.setBorder(Borders.DIALOG); dialogPane.setLayout(new BorderLayout()); //======== contentPanel ======== { //---- labelLinks ---- labelLinks.setText(bundle.getString("labelLinks.text")); labelLinks.setLabelFor(urlsArea); //======== scrollPane1 ======== { scrollPane1.setViewportView(urlsArea); } //---- labelSaveTo ---- labelSaveTo.setText(bundle.getString("labelSaveTo.text")); labelSaveTo.setLabelFor(comboPath); //---- comboPath ---- comboPath.setEditable(true); //---- btnSelectPath ---- btnSelectPath.setText(bundle.getString("btnSelectPath.text")); //---- labelDescription ---- labelDescription.setText(bundle.getString("labelDescription.text")); labelDescription.setLabelFor(descriptionArea); //======== scrollPane2 ======== { scrollPane2.setViewportView(descriptionArea); } PanelBuilder contentPanelBuilder = new PanelBuilder(new FormLayout( new ColumnSpec[] { FormSpecs.DEFAULT_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.PREFERRED, FormSpec.DEFAULT_GROW), FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.MIN_COLSPEC }, new RowSpec[] { FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.PREFERRED, FormSpec.DEFAULT_GROW), FormSpecs.LINE_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.bounded(Sizes.PREFERRED, Sizes.dluY(40), Sizes.dluY(55)), FormSpec.DEFAULT_GROW) }), contentPanel); contentPanelBuilder.add(labelLinks, cc.xy(1, 1)); contentPanelBuilder.add(scrollPane1, cc.xywh(1, 3, 5, 1)); contentPanelBuilder.add(labelSaveTo, cc.xy(1, 5)); contentPanelBuilder.add(comboPath, cc.xy(3, 5)); contentPanelBuilder.add(btnSelectPath, cc.xy(5, 5)); contentPanelBuilder.add(labelDescription, cc.xy(1, 7)); contentPanelBuilder.add(scrollPane2, cc.xywh(3, 7, 3, 1)); } dialogPane.add(contentPanel, BorderLayout.CENTER); //======== buttonBar ======== { buttonBar.setBorder(new EmptyBorder(12, 0, 0, 0)); //---- btnPasteFromClipboard ---- btnPasteFromClipboard.setText(bundle.getString("btnPasteFromClipboard.text")); //---- okButton ---- okButton.setText(bundle.getString("okButton.text")); //---- btnStartPaused ---- btnStartPaused.setText(bundle.getString("btnStartPaused.text")); //---- cancelButton ---- cancelButton.setText(bundle.getString("cancelButton.text")); PanelBuilder buttonBarBuilder = new PanelBuilder(new FormLayout( new ColumnSpec[] { FormSpecs.PREF_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormSpecs.UNRELATED_GAP_COLSPEC, FormSpecs.PREF_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.PREF_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("fill:pref")), buttonBar); ((FormLayout) buttonBar.getLayout()).setColumnGroups(new int[][] { { 5, 7, 9 } }); buttonBarBuilder.add(btnPasteFromClipboard, cc.xy(1, 1)); buttonBarBuilder.add(okButton, cc.xy(5, 1)); buttonBarBuilder.add(btnStartPaused, cc.xy(7, 1)); buttonBarBuilder.add(cancelButton, cc.xy(9, 1)); } dialogPane.add(buttonBar, BorderLayout.SOUTH); } contentPane.add(dialogPane, BorderLayout.CENTER); pack(); setLocationRelativeTo(getOwner()); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:InformationDialog.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner Open Source Project license - unknown ResourceBundle bundle = ResourceBundle.getBundle("InformationDialog"); JPanel dialogPane = new JPanel(); JPanel contentPanel = new JPanel(); iconLabel = new JLabel(); pathLabel = new JLabel(); JLabel labelFrom = new JLabel(); fieldFrom = new JTextField(); JLabel labelSize = new JLabel(); fieldSize = new JTextField(); JLabel labelDescription = new JLabel(); JScrollPane scrollPane1 = new JScrollPane(); descriptionArea = ComponentFactory.getTextArea(); JPanel optionsPanel = new JPanel(); JLabel saveToLabel = new JLabel(); comboPath = new JComboBox(); btnSelectPath = new JButton(); progressBar = new JProgressBar(); JLabel labelRemaining = new JLabel(); remainingLabel = new JLabel(); JLabel labelEstimateTime = new JLabel(); estTimeLabel = new JLabel(); JLabel labelCurrentSpeed = new JLabel(); currentSpeedLabel = new JLabel(); JLabel labelAverageSpeed = new JLabel(); avgSpeedLabel = new JLabel(); JXButtonPanel buttonBar = new JXButtonPanel(); okButton = new JButton(); cancelButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== Container contentPane = getContentPane(); contentPane.setLayout(new BorderLayout()); //======== dialogPane ======== {//www . j ava 2s . c om dialogPane.setBorder(Borders.DIALOG); dialogPane.setLayout(new BorderLayout()); //======== contentPanel ======== { //---- iconLabel ---- iconLabel.setText(bundle.getString("iconLabel.text")); //---- pathLabel ---- pathLabel.setText(bundle.getString("pathLabel.text")); pathLabel.setFont(new Font("Tahoma", Font.BOLD, 12)); //---- labelFrom ---- labelFrom.setText(bundle.getString("labelFrom.text")); //---- fieldFrom ---- fieldFrom.setBorder(null); fieldFrom.setOpaque(false); fieldFrom.setText(bundle.getString("fieldFrom.text")); //---- labelSize ---- labelSize.setText(bundle.getString("labelSize.text")); //---- fieldSize ---- fieldSize.setBorder(null); fieldSize.setOpaque(false); //---- labelDescription ---- labelDescription.setText(bundle.getString("labelDescription.text")); //======== scrollPane1 ======== { scrollPane1.setViewportView(descriptionArea); } //======== optionsPanel ======== { //---- saveToLabel ---- saveToLabel.setText(bundle.getString("saveToLabel.text")); saveToLabel.setLabelFor(comboPath); //---- comboPath ---- comboPath.setEditable(true); //---- btnSelectPath ---- btnSelectPath.setText(bundle.getString("btnSelectPath.text")); PanelBuilder optionsPanelBuilder = new PanelBuilder(new FormLayout( new ColumnSpec[] { FormSpecs.DEFAULT_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default")), optionsPanel); optionsPanelBuilder.add(saveToLabel, cc.xy(1, 1)); optionsPanelBuilder.add(comboPath, cc.xy(3, 1)); optionsPanelBuilder.add(btnSelectPath, cc.xy(5, 1)); } //---- progressBar ---- progressBar.setFont(new Font("Tahoma", Font.BOLD, 16)); //---- labelRemaining ---- labelRemaining.setText(bundle.getString("labelRemaining.text")); //---- remainingLabel ---- remainingLabel.setText(bundle.getString("remainingLabel.text")); remainingLabel.setFont(new Font("Tahoma", Font.BOLD, 12)); //---- labelEstimateTime ---- labelEstimateTime.setText(bundle.getString("labelEstimateTime.text")); //---- estTimeLabel ---- estTimeLabel.setText(bundle.getString("estTimeLabel.text")); estTimeLabel.setFont(new Font("Tahoma", Font.BOLD, 12)); //---- labelCurrentSpeed ---- labelCurrentSpeed.setText(bundle.getString("labelCurrentSpeed.text")); //---- currentSpeedLabel ---- currentSpeedLabel.setText(bundle.getString("currentSpeedLabel.text")); currentSpeedLabel.setFont(new Font("Tahoma", Font.BOLD, 12)); //---- labelAverageSpeed ---- labelAverageSpeed.setText(bundle.getString("labelAverageSpeed.text")); //---- avgSpeedLabel ---- avgSpeedLabel.setText(bundle.getString("avgSpeedLabel.text")); avgSpeedLabel.setFont(new Font("Tahoma", Font.BOLD, 12)); PanelBuilder contentPanelBuilder = new PanelBuilder( new FormLayout(new ColumnSpec[] { new ColumnSpec(Sizes.dluX(49)), FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, ColumnSpec.decode("max(min;70dlu)") }, new RowSpec[] { FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.bounded(Sizes.PREFERRED, Sizes.dluY(40), Sizes.dluY(50)), FormSpec.DEFAULT_GROW), FormSpecs.LINE_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC, RowSpec.decode("fill:max(pref;20dlu)"), FormSpecs.LINE_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC }), contentPanel); contentPanelBuilder.add(iconLabel, cc.xywh(1, 1, 1, 5)); contentPanelBuilder.add(pathLabel, cc.xywh(3, 1, 7, 1)); contentPanelBuilder.add(labelFrom, cc.xy(3, 3)); contentPanelBuilder.add(fieldFrom, cc.xywh(5, 3, 5, 1)); contentPanelBuilder.add(labelSize, cc.xy(3, 5)); contentPanelBuilder.add(fieldSize, cc.xywh(5, 5, 3, 1)); contentPanelBuilder.add(labelDescription, cc.xy(1, 7)); contentPanelBuilder.add(scrollPane1, cc.xywh(1, 9, 9, 1)); contentPanelBuilder.add(optionsPanel, cc.xywh(1, 11, 9, 1)); contentPanelBuilder.add(progressBar, cc.xywh(1, 13, 9, 1)); contentPanelBuilder.add(labelRemaining, cc.xy(1, 15)); contentPanelBuilder.add(remainingLabel, cc.xywh(3, 15, 3, 1)); contentPanelBuilder.add(labelEstimateTime, cc.xy(7, 15)); contentPanelBuilder.add(estTimeLabel, cc.xy(9, 15)); contentPanelBuilder.add(labelCurrentSpeed, cc.xy(1, 17)); contentPanelBuilder.add(currentSpeedLabel, cc.xywh(3, 17, 3, 1)); contentPanelBuilder.add(labelAverageSpeed, cc.xy(7, 17)); contentPanelBuilder.add(avgSpeedLabel, cc.xy(9, 17)); } dialogPane.add(contentPanel, BorderLayout.CENTER); //======== buttonBar ======== { buttonBar.setBorder(new EmptyBorder(12, 0, 0, 0)); //---- okButton ---- okButton.setText(bundle.getString("okButton.text")); //---- cancelButton ---- cancelButton.setText(bundle.getString("cancelButton.text")); PanelBuilder buttonBarBuilder = new PanelBuilder(new FormLayout( new ColumnSpec[] { new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormSpecs.UNRELATED_GAP_COLSPEC, ColumnSpec.decode("max(pref;55dlu)"), FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("fill:pref")), buttonBar); ((FormLayout) buttonBar.getLayout()).setColumnGroups(new int[][] { { 3, 5 } }); buttonBarBuilder.add(okButton, cc.xy(3, 1)); buttonBarBuilder.add(cancelButton, cc.xy(5, 1)); } dialogPane.add(buttonBar, BorderLayout.SOUTH); } contentPane.add(dialogPane, BorderLayout.CENTER); pack(); setLocationRelativeTo(getOwner()); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:JPFamiliaGenerico.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner Open Source Project license - unknown lblCodigo = new JLabel(); txtCodigo = new JTextField(); lblNombre = new JLabel(); txtNombre = new JTextField(); spTblFamiliaGenerico = new JScrollPane(); tblFamiliaGenerico = new JTable(); CellConstraints cc = new CellConstraints(); //======== this ======== 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(Sizes.dluX(50)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(150)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.dluX(60), FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(10)) }, new RowSpec[] { new RowSpec(Sizes.dluY(10)), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.dluY(15)), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.dluY(15)), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.dluY(10)), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.CENTER, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.dluY(10)) })); //---- lblCodigo ---- lblCodigo.setText("C\u00f3digo:"); lblCodigo.setHorizontalAlignment(SwingConstants.RIGHT); add(lblCodigo, cc.xywh(3, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); add(txtCodigo, cc.xywh(5, 3, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblNombre ---- lblNombre.setText("Nombre:"); lblNombre.setHorizontalAlignment(SwingConstants.RIGHT); add(lblNombre, cc.xywh(3, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); add(txtNombre, cc.xywh(5, 5, 3, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //======== spTblFamiliaGenerico ======== {//from w ww .ja va2 s .co m //---- tblFamiliaGenerico ---- tblFamiliaGenerico .setModel(new DefaultTableModel(new Object[][] {}, new String[] { "C\u00f3digo", "Nombre" }) { boolean[] columnEditable = new boolean[] { false, false }; @Override public boolean isCellEditable(int rowIndex, int columnIndex) { return columnEditable[columnIndex]; } }); spTblFamiliaGenerico.setViewportView(tblFamiliaGenerico); } add(spTblFamiliaGenerico, cc.xywh(3, 9, 7, 5)); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:MultipleSettingsDialog.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner Open Source Project license - unknown ResourceBundle bundle = ResourceBundle.getBundle("MultipleSettingsDialog"); JPanel dialogPane = new JPanel(); JPanel contentPanel = new JPanel(); JLabel iconLabel = new JLabel(); titleLabel = new JLabel(); JLabel labelSize = new JLabel(); fieldSize = new JTextField(); JLabel labelDescription = new JLabel(); JScrollPane scrollPane1 = new JScrollPane(); descriptionArea = ComponentFactory.getTextArea(); JPanel optionsPanel = new JPanel(); JLabel saveToLabel = new JLabel(); comboPath = new JComboBox(); btnSelectPath = new JButton(); JXButtonPanel buttonBar = new JXButtonPanel(); okButton = new JButton(); cancelButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== Container contentPane = getContentPane(); contentPane.setLayout(new BorderLayout()); //======== dialogPane ======== {/*www. ja va 2 s . co m*/ dialogPane.setBorder(Borders.DIALOG); dialogPane.setLayout(new BorderLayout()); //======== contentPanel ======== { //---- iconLabel ---- iconLabel.setText(bundle.getString("iconLabel.text")); //---- titleLabel ---- titleLabel.setText(bundle.getString("titleLabel.text")); titleLabel.setFont(new Font("Tahoma", Font.BOLD, 12)); //---- labelSize ---- labelSize.setText(bundle.getString("labelSize.text")); //---- fieldSize ---- fieldSize.setBorder(null); fieldSize.setOpaque(false); fieldSize.setEditable(false); //---- labelDescription ---- labelDescription.setText(bundle.getString("labelDescription.text")); //======== scrollPane1 ======== { scrollPane1.setViewportView(descriptionArea); } //======== optionsPanel ======== { //---- saveToLabel ---- saveToLabel.setText(bundle.getString("saveToLabel.text")); saveToLabel.setLabelFor(comboPath); //---- comboPath ---- comboPath.setEditable(true); //---- btnSelectPath ---- btnSelectPath.setText(bundle.getString("btnSelectPath.text")); PanelBuilder optionsPanelBuilder = new PanelBuilder(new FormLayout( new ColumnSpec[] { FormSpecs.DEFAULT_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default")), optionsPanel); optionsPanelBuilder.add(saveToLabel, cc.xy(1, 1)); optionsPanelBuilder.add(comboPath, cc.xy(3, 1)); optionsPanelBuilder.add(btnSelectPath, cc.xy(5, 1)); } PanelBuilder contentPanelBuilder = new PanelBuilder(new FormLayout( new ColumnSpec[] { new ColumnSpec(Sizes.dluX(49)), FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, ColumnSpec.decode("max(min;70dlu)") }, new RowSpec[] { FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.TOP, Sizes.PREFERRED, FormSpec.NO_GROW), FormSpecs.RELATED_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.bounded(Sizes.PREFERRED, Sizes.dluY(40), Sizes.dluY(50)), FormSpec.DEFAULT_GROW), FormSpecs.LINE_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC }), contentPanel); contentPanelBuilder.add(iconLabel, cc.xywh(1, 1, 1, 5, CellConstraints.DEFAULT, CellConstraints.FILL)); contentPanelBuilder.add(titleLabel, cc.xywh(3, 1, 5, 1)); contentPanelBuilder.add(labelSize, cc.xy(3, 3)); contentPanelBuilder.add(fieldSize, cc.xywh(5, 3, 3, 1)); contentPanelBuilder.add(labelDescription, cc.xy(1, 7)); contentPanelBuilder.add(scrollPane1, cc.xywh(1, 9, 7, 1)); contentPanelBuilder.add(optionsPanel, cc.xywh(1, 11, 7, 1)); } dialogPane.add(contentPanel, BorderLayout.CENTER); //======== buttonBar ======== { buttonBar.setBorder(new EmptyBorder(12, 0, 0, 0)); //---- okButton ---- okButton.setText(bundle.getString("okButton.text")); //---- cancelButton ---- cancelButton.setText(bundle.getString("cancelButton.text")); PanelBuilder buttonBarBuilder = new PanelBuilder(new FormLayout( new ColumnSpec[] { new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormSpecs.UNRELATED_GAP_COLSPEC, ColumnSpec.decode("max(pref;55dlu)"), FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("fill:pref")), buttonBar); ((FormLayout) buttonBar.getLayout()).setColumnGroups(new int[][] { { 3, 5 } }); buttonBarBuilder.add(okButton, cc.xy(3, 1)); buttonBarBuilder.add(cancelButton, cc.xy(5, 1)); } dialogPane.add(buttonBar, BorderLayout.SOUTH); } contentPane.add(dialogPane, BorderLayout.CENTER); pack(); setLocationRelativeTo(getOwner()); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:anl.verdi.area.AreaFilePanel.java
private void initComponents() { Logger.debug("in AreaFilePanel.initComponents"); // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license areaFilesPanel = new JPanel(); areaFiles = new JPanel(); btnAdd = new JButton(); btnDelete = new JButton(); scrollPaneAreaFiles = new JScrollPane(); areaFileList = new JList(); areasPanel = new JPanel(); scrollPane6 = new JScrollPane(); areaList = new JList(); CellConstraints cc = new CellConstraints(); //======== this ======== setLayout(new FormLayout("pref:grow", "fill:default:grow")); //======== areaFilesPanel ======== {//from w ww . j a v a 2 s . c o m areaFilesPanel.setBorder(null); // 2014 - underlying jgoodies class changed ColumnSpec[] aColumnSpec = ColumnSpec.decodeSpecs("pref:grow"); RowSpec[] aRowSpec = RowSpec.decodeSpecs("fill:max(pref;125dlu):grow"); areaFilesPanel.setLayout(new FormLayout(aColumnSpec, new RowSpec[] { new RowSpec(Sizes.dluY(108)), new RowSpec(Sizes.dluY(92)), FormFactory.PREF_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.PREF_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, aRowSpec[0] })); // areaFilesPanel.setLayout(new FormLayout( // ColumnSpec.decodeSpecs("pref:grow"), // new RowSpec[] { // new RowSpec(Sizes.dluY(108)), // new RowSpec(Sizes.dluY(92)), // FormFactory.PREF_ROWSPEC, // FormFactory.LINE_GAP_ROWSPEC, // FormFactory.PREF_ROWSPEC, // FormFactory.LINE_GAP_ROWSPEC, // new RowSpec("fill:max(pref;125dlu):grow") // })); //======== areaFiles ======== { areaFiles.setBorder(new TitledBorder("Area Files")); // 2014 ColumnSpec bColumnSpec = new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW); RowSpec bRowSpec = new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW); areaFiles.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, bColumnSpec }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC, bRowSpec })); // areaFiles.setLayout(new FormLayout( // new ColumnSpec[] { // FormFactory.DEFAULT_COLSPEC, // FormFactory.RELATED_GAP_COLSPEC, // FormFactory.DEFAULT_COLSPEC, // new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) // }, // new RowSpec[] { // FormFactory.DEFAULT_ROWSPEC, // FormFactory.RELATED_GAP_ROWSPEC, // new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) // })); // 2014 set up file names String verdiHome = Tools.getVerdiHome(); // 2014 new method for reading in an image file String separator = "/"; // use forward slash only for constructor ImageIcon(String filename); String pathName = verdiHome + separator + "plugins" + separator + "core" + separator + "icons" + separator; //---- btnAdd ---- String filePlus = new String(pathName + "plus.png"); // btnAdd.setIcon(new ImageIcon(getClass().getResource("/plus.png"))); btnAdd.setIcon(new ImageIcon(filePlus)); btnAdd.setToolTipText("Add Area File"); areaFiles.add(btnAdd, cc.xy(1, 1)); //---- btnDelete ---- String fileMinus = new String(pathName + "Minus.png"); // btnDelete.setIcon(new ImageIcon(getClass().getResource("/minus.png"))); btnDelete.setIcon(new ImageIcon(fileMinus)); btnDelete.setToolTipText("Delete Area File"); areaFiles.add(btnDelete, cc.xy(3, 1)); //======== scrollPaneAreaFiles ======== { //---- areaFileList ---- areaFileList.setSelectedIndex(0); areaFileList.setMaximumSize(new Dimension(300, 100)); areaFileList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); areaFileList.setPrototypeCellValue("RADM_CONC_!"); scrollPaneAreaFiles.setViewportView(areaFileList); } areaFiles.add(scrollPaneAreaFiles, cc.xywh(1, 3, 4, 1)); } areaFilesPanel.add(areaFiles, cc.xy(1, 1)); //======== areasPanel ======== { areasPanel.setBorder(new TitledBorder("Areas")); areasPanel.setLayout(new BorderLayout()); //======== scrollPane6 ======== { //---- areaList ---- areaList.setPrototypeCellValue("O3[1]"); scrollPane6.setViewportView(areaList); } areasPanel.add(scrollPane6, BorderLayout.CENTER); } areaFilesPanel.add(areasPanel, cc.xywh(1, 2, 1, 6)); } add(areaFilesPanel, cc.xy(1, 1)); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:anl.verdi.area.target.FormulaDialog.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license DefaultComponentFactory compFactory = DefaultComponentFactory.getInstance(); dialogPane = new JPanel(); contentPanel = new JPanel(); separator2 = compFactory.createSeparator("View Area Values for the Selected Formulas"); label2 = new JLabel(); radioButton1 = new JRadioButton(); radioButton2 = new JRadioButton(); label1 = new JLabel(); scrollPane1 = new JScrollPane(); formulaList = new JList(); buttonBar = new JPanel(); separator1 = new JSeparator(); errorMessage = new JLabel(); okButton = new JButton(); cancelButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setModal(true);//ww w .j a v a 2 s.com setTitle("Area Information"); Container contentPane = getContentPane(); contentPane.setLayout(new BorderLayout()); //======== dialogPane ======== { dialogPane.setBorder(Borders.DIALOG_BORDER); dialogPane.setMinimumSize(new Dimension(445, 400)); dialogPane.setLayout(new BorderLayout()); //======== contentPanel ======== { contentPanel.setPreferredSize(new Dimension(400, 75)); contentPanel.setMinimumSize(new Dimension(423, 75)); // 2014 - underlyaing jgoodies class changed ColumnSpec[] aColumnSpec = ColumnSpec.decodeSpecs("min(min;5dlu):grow"); ColumnSpec[] bColumnSpec = ColumnSpec.decodeSpecs("max(min;75dlu)"); contentPanel.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.PREF_COLSPEC, aColumnSpec[0], FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, bColumnSpec[0], FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); // contentPanel.setLayout(new FormLayout( // new ColumnSpec[] { // FormFactory.DEFAULT_COLSPEC, // FormFactory.PREF_COLSPEC, // new ColumnSpec("min(min;5dlu):grow"), // FormFactory.LABEL_COMPONENT_GAP_COLSPEC, // FormFactory.LABEL_COMPONENT_GAP_COLSPEC, // FormFactory.DEFAULT_COLSPEC, // FormFactory.LABEL_COMPONENT_GAP_COLSPEC, // FormFactory.LABEL_COMPONENT_GAP_COLSPEC, // FormFactory.RELATED_GAP_COLSPEC, // FormFactory.LABEL_COMPONENT_GAP_COLSPEC, // new ColumnSpec("max(min;75dlu)"), // FormFactory.LABEL_COMPONENT_GAP_COLSPEC, // FormFactory.DEFAULT_COLSPEC // }, // new RowSpec[] { // FormFactory.DEFAULT_ROWSPEC, // FormFactory.LINE_GAP_ROWSPEC, // FormFactory.DEFAULT_ROWSPEC, // FormFactory.LINE_GAP_ROWSPEC, // FormFactory.DEFAULT_ROWSPEC // })); contentPanel.add(separator2, cc.xywh(1, 1, 13, 1)); //---- label2 ---- label2.setText("Areas:"); contentPanel.add(label2, cc.xy(1, 3)); //---- radioButton1 ---- radioButton1.setText("Selected"); radioButton1.setSelected(true); contentPanel.add(radioButton1, cc.xy(2, 3)); //---- radioButton2 ---- radioButton2.setText("All"); contentPanel.add(radioButton2, cc.xywh(3, 3, 9, 1)); //---- label1 ---- label1.setText("Formulas:"); contentPanel.add(label1, cc.xy(1, 5)); } dialogPane.add(contentPanel, BorderLayout.NORTH); //======== scrollPane1 ======== { scrollPane1.setMinimumSize(new Dimension(300, 400)); scrollPane1.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane1.setPreferredSize(new Dimension(350, 200)); scrollPane1.setMaximumSize(new Dimension(1000, 1000)); //---- formulaList ---- formulaList.setMinimumSize(new Dimension(300, 200)); formulaList.setMaximumSize(new Dimension(300, 500)); formulaList.setPreferredSize(new Dimension(300, 200)); scrollPane1.setViewportView(formulaList); } dialogPane.add(scrollPane1, BorderLayout.CENTER); //======== buttonBar ======== { buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER); buttonBar.setPreferredSize(new Dimension(181, 60)); buttonBar.setLayout(new FormLayout( new ColumnSpec[] { 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.GLUE_COLSPEC, FormFactory.BUTTON_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC }, new RowSpec[] { new RowSpec(Sizes.dluY(15)), FormFactory.PREF_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); buttonBar.add(separator1, cc.xywh(2, 1, 9, 1)); //---- errorMessage ---- errorMessage .setFont(errorMessage.getFont().deriveFont(errorMessage.getFont().getStyle() | Font.BOLD)); buttonBar.add(errorMessage, cc.xywh(2, 2, 6, 1)); //---- okButton ---- okButton.setText("OK"); buttonBar.add(okButton, cc.xy(8, 2)); //---- cancelButton ---- cancelButton.setText("Cancel"); buttonBar.add(cancelButton, cc.xy(10, 2)); } dialogPane.add(buttonBar, BorderLayout.SOUTH); } contentPane.add(dialogPane, BorderLayout.CENTER); setSize(375, 345); setLocationRelativeTo(getOwner()); //---- buttonGroup1 ---- ButtonGroup buttonGroup1 = new ButtonGroup(); buttonGroup1.add(radioButton1); buttonGroup1.add(radioButton2); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:anl.verdi.gui.DataSetPanel.java
private void initComponents() { Logger.debug("in DataSetPanel initComponents"); // JFormDesigner - Component initialization - DO NOT MODIFY // //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license dataSetPanel = new JPanel(); dataSets = new JPanel(); btnAdd = new JButton(); btnDelete = new JButton(); btnAddRemote = new JButton(); scrollPaneDataset = new JScrollPane(); dataList = new JList(); variablesPanel = new JPanel(); scrollPane6 = new JScrollPane(); variableList = new JList(); timePanel = new TimePanel(); layerPanel1 = new LayerPanel(); domainPanel1 = new DomainPanel(); CellConstraints cc = new CellConstraints(); // ======== this ======== setLayout(new FormLayout("pref:grow", "fill:default:grow")); // ======== dataSetPanel ======== {//from ww w . j av a2s . c o m dataSetPanel.setBorder(null); // 2014 RowSpec[] aRowSpec = RowSpec.decodeSpecs("fill:max(pref;125dlu):grow"); ColumnSpec[] aColumnSpec = ColumnSpec.decodeSpecs("pref:grow"); dataSetPanel.setLayout(new FormLayout(aColumnSpec, new RowSpec[] { new RowSpec(Sizes.dluY(108)), new RowSpec(Sizes.dluY(92)), FormFactory.PREF_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.PREF_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, aRowSpec[0] })); // dataSetPanel.setLayout(new FormLayout(ColumnSpec // .decodeSpecs("pref:grow"), new RowSpec[] { // new RowSpec(Sizes.dluY(108)), new RowSpec(Sizes.dluY(92)), // FormFactory.PREF_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, // FormFactory.PREF_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, // new RowSpec("fill:max(pref;125dlu):grow") })); // ======== dataSets ======== { dataSets.setBorder(new TitledBorder("Datasets")); // 2014 ColumnSpec cColumnSpec = new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW); RowSpec cRowSpec = new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW); dataSets.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, cColumnSpec }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC, cRowSpec })); // dataSets.setLayout(new FormLayout(new ColumnSpec[] { // FormFactory.DEFAULT_COLSPEC, // FormFactory.RELATED_GAP_COLSPEC, // FormFactory.DEFAULT_COLSPEC, // FormFactory.RELATED_GAP_COLSPEC, // FormFactory.DEFAULT_COLSPEC, // new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, // FormSpec.DEFAULT_GROW) }, new RowSpec[] { // FormFactory.DEFAULT_ROWSPEC, // FormFactory.RELATED_GAP_ROWSPEC, // new RowSpec(RowSpec.FILL, Sizes.DEFAULT, // FormSpec.DEFAULT_GROW) })); String verdiHome = Tools.getVerdiHome(); // 2014 new method for reading in an image file String separator = "/"; // use forward slash only for constructor ImageIcon(String filename); String pathName = verdiHome + separator + "plugins" + separator + "core" + separator + "icons" + separator; // ---- btnAdd ---- String filePlus = new String(pathName + "plus.png"); // btnAdd.setIcon(new ImageIcon(getClass().getResource("/plus.png"))); btnAdd.setIcon(new ImageIcon(filePlus)); btnAdd.setToolTipText("Add local dataset"); dataSets.add(btnAdd, cc.xy(1, 1)); // ---- btnDelete ---- String fileMinus = new String(pathName + "minus.png"); // btnDelete.setIcon(new ImageIcon(getClass().getResource("/minus.png"))); btnDelete.setIcon(new ImageIcon(fileMinus)); btnDelete.setToolTipText("Remove local dataset"); dataSets.add(btnDelete, cc.xy(3, 1)); // ---- btnAddRemote ---- String filePlusRemote = new String(pathName + "plus-remote.png"); // btnAddRemote.setIcon(new ImageIcon(getClass().getResource("/plus-remote.png"))); btnAddRemote.setIcon(new ImageIcon(filePlusRemote)); btnAddRemote.setToolTipText("Add remote dataset"); dataSets.add(btnAddRemote, cc.xy(5, 1)); // ======== scrollPaneDataset ======== { // ---- dataList ---- dataList.setSelectedIndex(0); dataList.setMaximumSize(new Dimension(300, 100)); dataList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); dataList.setPrototypeCellValue("RADM_CONC_!"); scrollPaneDataset.setViewportView(dataList); } dataSets.add(scrollPaneDataset, cc.xywh(1, 3, 6, 1)); } dataSetPanel.add(dataSets, cc.xy(1, 1)); // ======== variablesPanel ======== { variablesPanel.setBorder(new TitledBorder("Variables")); variablesPanel.setLayout(new BorderLayout(2, 5)); // ======== scrollPane6 ======== { // ---- variableList ---- variableList.setPrototypeCellValue("O3[1]"); scrollPane6.setViewportView(variableList); } variablesPanel.add(new JLabel("Double-click to add the variable as a formula."), BorderLayout.NORTH); variablesPanel.add(scrollPane6, BorderLayout.CENTER); } dataSetPanel.add(variablesPanel, cc.xy(1, 2)); dataSetPanel.add(timePanel, cc.xy(1, 3)); dataSetPanel.add(layerPanel1, cc.xy(1, 5)); dataSetPanel.add(domainPanel1, cc.xy(1, 7)); } add(dataSetPanel, cc.xy(1, 1)); // //GEN-END:initComponents }
From source file:anl.verdi.plot.anim.MultiPlotAnimation.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license DefaultComponentFactory compFactory = DefaultComponentFactory.getInstance(); separator1 = compFactory.createSeparator("Select Plots"); scrollPane1 = new JScrollPane(); plotList = new CheckBoxList(); panel1 = new JPanel(); label1 = new JLabel(); startSpinner = new JSpinner(); startLbl = new JLabel(); label2 = new JLabel(); endSpinner = new JSpinner(); endLbl = new JLabel(); panel2 = new JPanel(); gifChk = new JCheckBox(); gifFileLbl = new JLabel(); gifFileBtn = new JButton(); separator2 = compFactory.createSeparator(""); CellConstraints cc = new CellConstraints(); //======== this ======== // 2014//w w w . ja v a 2s.co m ColumnSpec[] aColumnSpec = ColumnSpec.decodeSpecs("default:grow"); RowSpec aRowSpec = new RowSpec(RowSpec.TOP, Sizes.dluY(84), 0.5); RowSpec bRowSpec = new RowSpec(RowSpec.FILL, Sizes.PREFERRED, 0.5); setLayout(new FormLayout(aColumnSpec, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC, aRowSpec, FormFactory.RELATED_GAP_ROWSPEC, bRowSpec, FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); // setLayout(new FormLayout( // ColumnSpec.decodeSpecs("default:grow"), // new RowSpec[] { // FormFactory.DEFAULT_ROWSPEC, // FormFactory.RELATED_GAP_ROWSPEC, // new RowSpec(RowSpec.TOP, Sizes.dluY(84), 0.5), // FormFactory.RELATED_GAP_ROWSPEC, // new RowSpec(RowSpec.FILL, Sizes.PREFERRED, 0.5), // FormFactory.RELATED_GAP_ROWSPEC, // FormFactory.DEFAULT_ROWSPEC, // FormFactory.LINE_GAP_ROWSPEC, // FormFactory.DEFAULT_ROWSPEC // })); add(separator1, cc.xy(1, 1)); //======== scrollPane1 ======== { scrollPane1.setViewportView(plotList); } add(scrollPane1, cc.xy(1, 3)); //======== panel1 ======== { // 2014 ColumnSpec[] dColumnSpec = ColumnSpec.decodeSpecs("max(pref;40dlu)"); ColumnSpec[] eColumnSpec = ColumnSpec.decodeSpecs("max(pref;40dlu):grow"); panel1.setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec(Sizes.dluX(71)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, dColumnSpec[0], FormFactory.UNRELATED_GAP_COLSPEC, eColumnSpec[0] }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); // panel1.setLayout(new FormLayout( // new ColumnSpec[] { // new ColumnSpec(Sizes.dluX(71)), // FormFactory.LABEL_COMPONENT_GAP_COLSPEC, // new ColumnSpec("max(pref;40dlu)"), // FormFactory.UNRELATED_GAP_COLSPEC, // new ColumnSpec("max(pref;40dlu):grow") // }, // new RowSpec[] { // FormFactory.DEFAULT_ROWSPEC, // FormFactory.LINE_GAP_ROWSPEC, // FormFactory.DEFAULT_ROWSPEC // })); //---- label1 ---- label1.setText("Starting Time Step:"); panel1.add(label1, cc.xy(1, 1)); panel1.add(startSpinner, cc.xy(3, 1)); //---- startLbl ---- startLbl.setFont(new Font("Tahoma", Font.BOLD, 11)); panel1.add(startLbl, cc.xy(5, 1)); //---- label2 ---- label2.setText("Ending Time Step:"); panel1.add(label2, cc.xy(1, 3)); panel1.add(endSpinner, cc.xy(3, 3)); //---- endLbl ---- endLbl.setFont(new Font("Tahoma", Font.BOLD, 11)); panel1.add(endLbl, cc.xy(5, 3)); } add(panel1, cc.xywh(1, 5, 1, 1, CellConstraints.DEFAULT, CellConstraints.TOP)); //======== panel2 ======== { // 2014 ColumnSpec fColumnSpec = new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW); RowSpec[] fRowSpec = RowSpec.decodeSpecs("default"); panel2.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, fColumnSpec, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, fRowSpec)); // panel2.setLayout(new FormLayout( // new ColumnSpec[] { // 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 // }, // RowSpec.decodeSpecs("default"))); //---- gifChk ---- gifChk.setText("Make Animated GIF(s)"); panel2.add(gifChk, cc.xy(1, 1)); panel2.add(gifFileLbl, cc.xy(3, 1)); //---- gifFileBtn ---- gifFileBtn.setText("..."); gifFileBtn.setMaximumSize(new Dimension(23, 23)); gifFileBtn.setMinimumSize(new Dimension(23, 23)); gifFileBtn.setPreferredSize(new Dimension(23, 23)); gifFileBtn.setEnabled(false); panel2.add(gifFileBtn, cc.xy(5, 1)); } add(panel2, cc.xy(1, 7)); add(separator2, cc.xy(1, 9)); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:com.salas.bb.reports.ReportsDialog.java
License:Open Source License
private JComponent buildButtonBar() { JButton btnReset = new JButton(new ResetAction()); JPanel bar = ButtonBarFactory.buildHelpBar(btnReset, createCloseButton(true)); bar.setBorder(Borders.createEmptyBorder(LayoutStyle.getCurrent().getDialogMarginY(), Sizes.dluX(0), Sizes.dluY(0), Sizes.dluX(0))); return bar;//w ww . j ava2 s. co m }
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 ======== {//from w ww . j ava 2s.c o 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 }