List of usage examples for com.jgoodies.forms.layout CellConstraints DEFAULT
Alignment DEFAULT
To view the source code for com.jgoodies.forms.layout CellConstraints DEFAULT.
Click Source Link
From source file:org.archiviststoolkit.maintenance.utilities.SelectUtility.java
License:Open Source License
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license utilities = new JComboBox(); scrollPane1 = new JScrollPane(); utilityDescription = new JTextArea(); CellConstraints cc = new CellConstraints(); //======== this ======== setLayout(new FormLayout(ColumnSpec.decodeSpecs("default:grow"), new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) })); //---- utilities ---- utilities.setOpaque(false);/* ww w .j a va2 s. c om*/ utilities.setName("selectedUtility"); utilities.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { utilitiesActionPerformed(); } }); add(utilities, cc.xywh(1, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //======== scrollPane1 ======== { scrollPane1.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); //---- utilityDescription ---- utilityDescription.setEditable(false); scrollPane1.setViewportView(utilityDescription); } add(scrollPane1, cc.xy(1, 3)); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:org.archiviststoolkit.structure.DatabaseFieldsForm.java
License:Open Source License
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license label1 = new JLabel(); fieldName = ATBasicComponentFactory/* w ww .j a va 2 s. com*/ .createTextField(detailsModel.getModel(DatabaseFields.PROPERTYNAME_FIELD_NAME)); label16 = new JLabel(); fieldLabel = ATBasicComponentFactory .createTextField(detailsModel.getBufferedModel(DatabaseFields.PROPERTYNAME_FIELD_LABEL)); label12 = new JLabel(); dataType = ATBasicComponentFactory .createTextField(detailsModel.getModel(DatabaseFields.PROPERTYNAME_DATA_TYPE)); lookupListLabel = new JLabel(); lookupList = ATBasicComponentFactory .createTextField(detailsModel.getModel(DatabaseFields.PROPERTYNAME_LOOKUP_LIST)); panel1 = new JPanel(); includeInSearchEditor = ATBasicComponentFactory.createCheckBox(detailsModel, DatabaseFields.PROPERTYNAME_INCLUDE_IN_SEARCH_EDITOR, DatabaseFields.class, true); label17 = new JLabel(); returnScreenOrder = ATBasicComponentFactory.createBufferedIntegerField(detailsModel, DatabaseFields.PROPERTYNAME_RETURN_SCREEN_ORDER); label14 = new JLabel(); scrollPane2 = new JScrollPane(); definition = ATBasicComponentFactory .createTextArea(detailsModel.getBufferedModel(DatabaseFields.PROPERTYNAME_DEFINITION)); label13 = new JLabel(); scrollPane1 = new JScrollPane(); examples = ATBasicComponentFactory .createTextArea(detailsModel.getBufferedModel(DatabaseFields.PROPERTYNAME_EXAMPLES)); CellConstraints cc = new CellConstraints(); //======== this ======== setBorder(Borders.DLU4_BORDER); setOpaque(false); setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); setPreferredSize(new Dimension(600, 500)); setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec("30px"), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec("max(default;400px):grow") }, new 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, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) })); //---- label1 ---- label1.setText("Field Name"); label1.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); add(label1, cc.xy(1, 1)); //---- fieldName ---- fieldName.setEditable(false); fieldName.setOpaque(false); fieldName.setBorder(null); fieldName.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); add(fieldName, cc.xywh(3, 1, 3, 1)); //---- label16 ---- label16.setText("Field Label"); label16.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); add(label16, cc.xy(1, 3)); //---- fieldLabel ---- fieldLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); add(fieldLabel, cc.xywh(3, 3, 3, 1)); //---- label12 ---- label12.setText("Data Type"); label12.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); add(label12, cc.xy(1, 5)); //---- dataType ---- dataType.setEditable(false); dataType.setBorder(null); dataType.setOpaque(false); dataType.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); add(dataType, cc.xywh(3, 5, 3, 1)); //---- lookupListLabel ---- lookupListLabel.setText("Lookup List"); lookupListLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); add(lookupListLabel, cc.xy(1, 7)); //---- lookupList ---- lookupList.setOpaque(false); lookupList.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); lookupList.setEditable(false); lookupList.setBorder(null); add(lookupList, cc.xywh(3, 7, 3, 1)); //======== panel1 ======== { panel1.setBackground(new Color(234, 201, 250)); panel1.setOpaque(false); panel1.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel1.setLayout(new FormLayout(new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default"))); //---- includeInSearchEditor ---- includeInSearchEditor.setBackground(new Color(234, 201, 250)); includeInSearchEditor.setText("Include In Search Editor"); includeInSearchEditor.setOpaque(false); includeInSearchEditor.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel1.add(includeInSearchEditor, cc.xy(1, 1)); } add(panel1, cc.xywh(3, 9, 3, 1)); //---- label17 ---- label17.setText("Return Screen Order"); label17.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); add(label17, cc.xy(1, 11)); //---- returnScreenOrder ---- returnScreenOrder.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); add(returnScreenOrder, cc.xywh(3, 11, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); //---- label14 ---- label14.setText("Definition"); label14.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); add(label14, cc.xywh(1, 13, 1, 1, CellConstraints.DEFAULT, CellConstraints.TOP)); //======== scrollPane2 ======== { scrollPane2.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); //---- definition ---- definition.setRows(5); definition.setLineWrap(true); definition.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); definition.setWrapStyleWord(true); scrollPane2.setViewportView(definition); } add(scrollPane2, cc.xywh(3, 13, 3, 1)); //---- label13 ---- label13.setText("Examples"); label13.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); add(label13, cc.xywh(1, 15, 1, 1, CellConstraints.DEFAULT, CellConstraints.TOP)); //======== scrollPane1 ======== { scrollPane1.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane1.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); //---- examples ---- examples.setRows(5); examples.setLineWrap(true); examples.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); examples.setWrapStyleWord(true); scrollPane1.setViewportView(examples); } add(scrollPane1, cc.xywh(3, 15, 3, 1)); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:org.archiviststoolkit.structure.DatabaseTablesForm.java
License:Open Source License
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license label1 = new JLabel(); tableName = ATBasicComponentFactory/*from w ww. ja v a2 s . co m*/ .createTextField(detailsModel.getModel(DatabaseTables.PROPERTYNAME_TABLE_NAME)); panel1 = new JPanel(); label2 = new JLabel(); scrollPane1 = new JScrollPane(); databaseFieldsTable = new DomainSortableTable(DatabaseFields.class, DatabaseFields.PROPERTYNAME_FIELD_NAME); panel2 = new JPanel(); deleteFieldButton = new JButton(); getFieldsButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setBorder(Borders.DLU4_BORDER); setOpaque(false); setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); setPreferredSize(new Dimension(800, 500)); setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec("max(default;400px):grow") }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) })); //---- label1 ---- label1.setText("Table Name"); label1.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); add(label1, cc.xy(1, 1)); //---- tableName ---- tableName.setEditable(false); tableName.setOpaque(false); tableName.setBorder(null); tableName.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); add(tableName, cc.xy(3, 1)); //======== panel1 ======== { panel1.setBackground(new Color(234, 201, 250)); panel1.setOpaque(false); panel1.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel1.setLayout(new FormLayout(ColumnSpec.decodeSpecs("default:grow"), new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //---- label2 ---- label2.setText("Fields"); label2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel1.add(label2, cc.xy(1, 1)); //======== scrollPane1 ======== { scrollPane1.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); //---- databaseFieldsTable ---- databaseFieldsTable.setPreferredScrollableViewportSize(new Dimension(450, 200)); scrollPane1.setViewportView(databaseFieldsTable); } panel1.add(scrollPane1, cc.xywh(1, 3, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); //======== panel2 ======== { panel2.setBackground(new Color(234, 201, 250)); panel2.setOpaque(false); panel2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel2.setLayout( new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default"))); //---- deleteFieldButton ---- deleteFieldButton.setText("Delete Field"); deleteFieldButton.setBackground(new Color(234, 201, 250)); deleteFieldButton.setOpaque(false); deleteFieldButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel2.add(deleteFieldButton, cc.xy(1, 1)); //---- getFieldsButton ---- getFieldsButton.setText("Get Fields"); getFieldsButton.setBackground(new Color(234, 201, 250)); getFieldsButton.setOpaque(false); getFieldsButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); getFieldsButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { getFieldsActionPerformed(e); } }); panel2.add(getFieldsButton, cc.xy(3, 1)); } panel1.add(panel2, cc.xywh(1, 5, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); } add(panel1, cc.xywh(1, 3, 3, 1)); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:org.archiviststoolkit.structure.DefaultValuesFields.java
License:Open Source License
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license lookupListLabel = new JLabel(); table = new JComboBox(new DefaultComboBoxModel(ATFieldInfo.getTableListForDefaultValues())); lookupListLabel2 = new JLabel(); field = new JComboBox(); label17 = new JLabel(); valuePlaceHolder = new JTextField(); CellConstraints cc = new CellConstraints(); //======== this ======== setBorder(Borders.DLU4_BORDER);/* w w w .ja v a 2 s. co m*/ setOpaque(false); setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); setPreferredSize(new Dimension(400, 130)); setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec("30px:grow") }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //---- lookupListLabel ---- lookupListLabel.setText("Table"); lookupListLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); add(lookupListLabel, cc.xy(1, 1)); //---- table ---- table.setOpaque(false); table.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); table.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { tableActionPerformed(e); } }); add(table, cc.xywh(3, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //---- lookupListLabel2 ---- lookupListLabel2.setText("Field"); lookupListLabel2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); add(lookupListLabel2, cc.xy(1, 3)); //---- field ---- field.setOpaque(false); field.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); field.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { fieldActionPerformed(e); } }); add(field, cc.xywh(3, 3, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //---- label17 ---- label17.setText("Value"); label17.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); add(label17, cc.xy(1, 5)); //---- valuePlaceHolder ---- valuePlaceHolder.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); add(valuePlaceHolder, cc.xywh(3, 5, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:org.archiviststoolkit.swing.ImportOptionsAccessions.java
License:Open Source License
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license label1 = new JLabel(); repositorySelector = new JComboBox(); dateFormatSelectorLabel = new JLabel(); dateFormatSelector = new JComboBox(); resourceRecordCreationLabel = new JLabel(); resourceRecordCreationSelector = ATBasicComponentFactory .createUnboundComboBox(DelimitedAccessionImportHandler.getResourceRecordCreationValues()); CellConstraints cc = new CellConstraints(); //======== this ======== setBorder(Borders.DLU2_BORDER);/*from w ww. j a v a 2 s . c om*/ setLayout(new FormLayout(ColumnSpec.decodeSpecs("default"), new 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, FormFactory.DEFAULT_ROWSPEC })); //---- label1 ---- label1.setText("Select a Repository"); add(label1, cc.xy(1, 1)); add(repositorySelector, cc.xywh(1, 3, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //---- dateFormatSelectorLabel ---- dateFormatSelectorLabel.setText("Select a Date Format"); add(dateFormatSelectorLabel, cc.xy(1, 5)); //---- dateFormatSelector ---- dateFormatSelector.setModel( new DefaultComboBoxModel(new String[] { "yyyy-M-d", "yyyy/M/d", "M-d-yyyy", "M/d/yyyy" })); add(dateFormatSelector, cc.xywh(1, 7, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //---- resourceRecordCreationLabel ---- resourceRecordCreationLabel.setText("Resource record creation"); add(resourceRecordCreationLabel, cc.xy(1, 9)); add(resourceRecordCreationSelector, cc.xywh(1, 11, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:org.archiviststoolkit.swing.ImportOptionsDigitalObjects.java
License:Open Source License
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license label1 = new JLabel(); repositorySelector = new JComboBox(); dateFormatSelectorLabel = new JLabel(); dateFormatSelector = new JComboBox(); CellConstraints cc = new CellConstraints(); //======== this ======== setBorder(Borders.DLU2_BORDER);//from w w w . java2 s .c o m setLayout(new FormLayout(ColumnSpec.decodeSpecs("default"), new 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 })); //---- label1 ---- label1.setText("Select a Repository"); add(label1, cc.xy(1, 1)); add(repositorySelector, cc.xywh(1, 3, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //---- dateFormatSelectorLabel ---- dateFormatSelectorLabel.setText("Select a Date Format"); add(dateFormatSelectorLabel, cc.xy(1, 5)); //---- dateFormatSelector ---- dateFormatSelector.setModel( new DefaultComboBoxModel(new String[] { "yyyy-M-d", "yyyy/M/d", "M-d-yyyy", "M/d/yyyy" })); add(dateFormatSelector, cc.xywh(1, 7, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:org.archiviststoolkit.swing.ImportOptionsEAD.java
License:Open Source License
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license label1 = new JLabel(); repositorySelector = new JComboBox(); CellConstraints cc = new CellConstraints(); //======== this ======== setBorder(Borders.DLU2_BORDER);//from w w w .j a v a2 s . co m setLayout(new FormLayout(ColumnSpec.decodeSpecs("default"), new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //---- label1 ---- label1.setText("Select a Repository"); add(label1, cc.xy(1, 1)); add(repositorySelector, cc.xywh(1, 3, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:org.archiviststoolkit.swing.ImportOptionsMARC.java
License:Open Source License
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license label1 = new JLabel(); repositorySelector = new JComboBox(); label2 = new JLabel(); resourceLevelSelector = ATBasicComponentFactory .createUnboundComboBox(LookupListUtils.getLookupListValues("Resource levels")); label3 = new JLabel(); panel1 = new JPanel(); resourceIdentifier1 = new JTextField(); resourceIdentifier2 = new JTextField(); resourceIdentifier3 = new JTextField(); resourceIdentifier4 = new JTextField(); label4 = new JLabel(); panel2 = new JPanel(); entireMarcRecord = new JRadioButton(); subjectHeadingsOnly = new JRadioButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setBorder(Borders.DLU2_BORDER);//from w w w.j a va 2s . com setLayout(new FormLayout(ColumnSpec.decodeSpecs("default:grow"), new 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, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //---- label1 ---- label1.setText("Select a Repository"); add(label1, cc.xy(1, 1)); add(repositorySelector, cc.xywh(1, 3, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //---- label2 ---- label2.setText("Resource Level"); add(label2, cc.xy(1, 5)); add(resourceLevelSelector, cc.xywh(1, 7, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //---- label3 ---- label3.setText("Resource Identifier"); add(label3, cc.xy(1, 9)); //======== panel1 ======== { panel1.setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, RowSpec.decodeSpecs("default"))); ((FormLayout) panel1.getLayout()).setColumnGroups(new int[][] { { 1, 3, 5, 7 } }); panel1.add(resourceIdentifier1, cc.xywh(1, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); panel1.add(resourceIdentifier2, cc.xywh(3, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); panel1.add(resourceIdentifier3, cc.xywh(5, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); panel1.add(resourceIdentifier4, cc.xywh(7, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); } add(panel1, cc.xywh(1, 11, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); //---- label4 ---- label4.setText("Import"); add(label4, cc.xy(1, 13)); //======== panel2 ======== { panel2.setLayout(new FormLayout(new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default"))); //---- entireMarcRecord ---- entireMarcRecord.setText("Entire MARC record"); panel2.add(entireMarcRecord, cc.xy(1, 1)); //---- subjectHeadingsOnly ---- subjectHeadingsOnly.setText("Subject headings only"); panel2.add(subjectHeadingsOnly, cc.xy(3, 1)); } add(panel2, cc.xy(1, 15)); //---- buttonGroup1 ---- ButtonGroup buttonGroup1 = new ButtonGroup(); buttonGroup1.add(entireMarcRecord); buttonGroup1.add(subjectHeadingsOnly); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:org.archiviststoolkit.swing.SelectFromTable.java
License:Open Source License
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license dialogPane = new JPanel(); contentPanel = new JPanel(); message = new JLabel(); scrollPane1 = new JScrollPane(); contentTable = new DomainSortableTable(); buttonBar = new JPanel(); cancelButton = new JButton(); selectButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setTitle("title"); setModal(true);//from w w w . j a va 2 s . c om Container contentPane = getContentPane(); contentPane.setLayout(new BorderLayout()); //======== dialogPane ======== { dialogPane.setBorder(Borders.DIALOG_BORDER); dialogPane.setLayout(new BorderLayout()); //======== contentPanel ======== { contentPanel.setLayout(new FormLayout(ColumnSpec.decodeSpecs("default:grow"), new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.CENTER, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) })); //---- message ---- message.setText("Select an item"); contentPanel.add(message, cc.xy(1, 1)); //======== scrollPane1 ======== { //---- contentTable ---- contentTable.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent e) { contentTableMouseClicked(e); } }); scrollPane1.setViewportView(contentTable); } contentPanel.add(scrollPane1, cc.xywh(1, 3, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); } dialogPane.add(contentPanel, BorderLayout.CENTER); //======== buttonBar ======== { buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER); buttonBar.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.GLUE_COLSPEC, FormFactory.BUTTON_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC }, RowSpec.decodeSpecs("pref"))); //---- cancelButton ---- cancelButton.setText("Cancel"); cancelButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { cancelButtonActionPerformed(); } }); buttonBar.add(cancelButton, cc.xy(4, 1)); //---- selectButton ---- selectButton.setText("Select"); selectButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { selectButtonActionPerformed(); } }); buttonBar.add(selectButton, cc.xy(6, 1)); } dialogPane.add(buttonBar, BorderLayout.SOUTH); } contentPane.add(dialogPane, BorderLayout.CENTER); // JFormDesigner - End of component initialization //GEN-END:initComponents contentTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); }
From source file:org.archiviststoolkit.swing.StandardEditor.java
License:Open Source License
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license mainPanel = new JPanel(); HeaderPanel = new JPanel(); mainHeaderPanel = new JPanel(); mainHeaderLabel = new JLabel(); subHeaderPanel = new JPanel(); subHeaderLabel = new JLabel(); recordPosition = new JLabel(); contentPanel = new JPanel(); button1 = new JButton(); separator1 = new JSeparator(); buttonPanel = new JPanel(); firstButton = new JButton(); previousButton = new JButton(); nextButton = new JButton(); lastButton = new JButton(); printButton = new JButton(); cancelButton = new JButton(); okButton = new JButton(); saveButton = new JButton(); okAndAnotherButton = new JButton(); firstLabel = new JLabel(); previousLabel = new JLabel(); nextLabel = new JLabel(); lastLabel = new JLabel(); printLabel = new JLabel(); cancelButtonLabel = new JLabel(); okButtonLabel = new JLabel(); saveButtonLabel = new JLabel(); okAndAnotherButtonLabel = new JLabel(); separator2 = new JSeparator(); gradientPanel2 = new JPanel(); auditLabel = new JLabel(); CellConstraints cc = new CellConstraints(); //======== this ======== setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); setBackground(new Color(200, 205, 232)); setModal(true);//from ww w. j a va 2s . c o m setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent e) { thisWindowClosing(e); } }); Container contentPane = getContentPane(); contentPane.setLayout(new FormLayout("default:grow", "top:default:grow")); //======== mainPanel ======== { mainPanel.setBackground(new Color(200, 205, 232)); mainPanel.setLayout(new FormLayout(ColumnSpec.decodeSpecs("default:grow"), new RowSpec[] { new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), 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 })); //======== HeaderPanel ======== { HeaderPanel.setBackground(new Color(80, 69, 57)); HeaderPanel.setOpaque(false); HeaderPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); HeaderPanel.setPreferredSize(new Dimension(300, 30)); HeaderPanel .setLayout( new FormLayout( new ColumnSpec[] { new ColumnSpec(Sizes.bounded(Sizes.MINIMUM, Sizes.dluX(100), Sizes.dluX(200))), new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, RowSpec.decodeSpecs("fill:default"))); //======== mainHeaderPanel ======== { mainHeaderPanel.setBackground(new Color(80, 69, 57)); mainHeaderPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); mainHeaderPanel.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC })); //---- mainHeaderLabel ---- mainHeaderLabel.setText("Main Header"); mainHeaderLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 18)); mainHeaderLabel.setForeground(Color.white); mainHeaderPanel.add(mainHeaderLabel, cc.xy(2, 2)); } HeaderPanel.add(mainHeaderPanel, cc.xy(1, 1)); //======== subHeaderPanel ======== { subHeaderPanel.setBackground(new Color(66, 60, 111)); subHeaderPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); subHeaderPanel.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.UNRELATED_GAP_COLSPEC }, new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC })); //---- subHeaderLabel ---- subHeaderLabel.setText("Sub Header"); subHeaderLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 18)); subHeaderLabel.setForeground(Color.white); subHeaderPanel.add(subHeaderLabel, cc.xy(2, 2)); //---- recordPosition ---- recordPosition.setText("record x of n"); recordPosition.setForeground(Color.white); subHeaderPanel.add(recordPosition, cc.xywh(4, 2, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); } HeaderPanel.add(subHeaderPanel, cc.xy(2, 1)); } mainPanel.add(HeaderPanel, cc.xywh(1, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //======== contentPanel ======== { contentPanel.setBorder(Borders.DLU4_BORDER); contentPanel.setBackground(new Color(200, 205, 232)); contentPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); contentPanel.setLayout(new FormLayout("center:default:grow", "top:default:grow")); //---- button1 ---- button1.setText("text"); contentPanel.add(button1, cc.xywh(1, 1, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); } mainPanel.add(contentPanel, cc.xy(1, 3)); //---- separator1 ---- separator1.setBackground(new Color(220, 220, 232)); separator1.setForeground(new Color(147, 131, 86)); separator1.setMinimumSize(new Dimension(1, 10)); separator1.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); mainPanel.add(separator1, cc.xy(1, 5)); //======== buttonPanel ======== { buttonPanel.setBorder(null); buttonPanel.setBackground(new Color(200, 205, 232)); buttonPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); buttonPanel.setMinimumSize(new Dimension(380, 60)); buttonPanel.setLayout(new FormLayout( "default, default, default, default, default, left:10dlu, default, 10dlu, default, default, default, default", "default, default")); //---- firstButton ---- firstButton.setIcon(new ImageIcon( getClass().getResource("/org/archiviststoolkit/resources/images/firstRecord.jpg"))); firstButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); firstButton.setOpaque(false); buttonPanel.add(firstButton, cc.xy(2, 1)); //---- previousButton ---- previousButton.setIcon(new ImageIcon( getClass().getResource("/org/archiviststoolkit/resources/images/prevRecord.jpg"))); previousButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); previousButton.setOpaque(false); buttonPanel.add(previousButton, cc.xy(3, 1)); //---- nextButton ---- nextButton.setIcon(new ImageIcon( getClass().getResource("/org/archiviststoolkit/resources/images/nextRecord.jpg"))); nextButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); nextButton.setOpaque(false); buttonPanel.add(nextButton, cc.xy(4, 1)); //---- lastButton ---- lastButton.setIcon(new ImageIcon( getClass().getResource("/org/archiviststoolkit/resources/images/lastRecord.jpg"))); lastButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); lastButton.setOpaque(false); buttonPanel.add(lastButton, cc.xy(5, 1)); //---- printButton ---- printButton.setIcon( new ImageIcon(getClass().getResource("/org/archiviststoolkit/resources/images/print.jpg"))); printButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); printButton.setOpaque(false); buttonPanel.add(printButton, cc.xy(7, 1)); //---- cancelButton ---- cancelButton.setIcon(new ImageIcon( getClass().getResource("/org/archiviststoolkit/resources/images/cancel.jpg"))); cancelButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); cancelButton.setOpaque(false); buttonPanel.add(cancelButton, cc.xy(9, 1)); //---- okButton ---- okButton.setIcon( new ImageIcon(getClass().getResource("/org/archiviststoolkit/resources/images/ok.jpg"))); okButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); okButton.setOpaque(false); buttonPanel.add(okButton, cc.xy(10, 1)); //---- saveButton ---- saveButton.setIcon( new ImageIcon(getClass().getResource("/org/archiviststoolkit/resources/images/save.jpg"))); saveButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); saveButton.setOpaque(false); buttonPanel.add(saveButton, cc.xy(11, 1)); //---- okAndAnotherButton ---- okAndAnotherButton.setIcon(new ImageIcon( getClass().getResource("/org/archiviststoolkit/resources/images/savePlus1.jpg"))); okAndAnotherButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); okAndAnotherButton.setOpaque(false); buttonPanel.add(okAndAnotherButton, cc.xy(12, 1)); //---- firstLabel ---- firstLabel.setText("First"); firstLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); buttonPanel.add(firstLabel, cc.xywh(2, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //---- previousLabel ---- previousLabel.setText("Previous"); previousLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); buttonPanel.add(previousLabel, cc.xywh(3, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //---- nextLabel ---- nextLabel.setText("Next"); nextLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); buttonPanel.add(nextLabel, cc.xywh(4, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //---- lastLabel ---- lastLabel.setText("Last"); lastLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); buttonPanel.add(lastLabel, cc.xywh(5, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //---- printLabel ---- printLabel.setText("Reports"); printLabel.setHorizontalAlignment(SwingConstants.CENTER); printLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); buttonPanel.add(printLabel, cc.xy(7, 2)); //---- cancelButtonLabel ---- cancelButtonLabel.setText("Cancel"); cancelButtonLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); buttonPanel.add(cancelButtonLabel, cc.xywh(9, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //---- okButtonLabel ---- okButtonLabel.setText("OK"); okButtonLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); buttonPanel.add(okButtonLabel, cc.xywh(10, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //---- saveButtonLabel ---- saveButtonLabel.setText("Save"); saveButtonLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); buttonPanel.add(saveButtonLabel, cc.xywh(11, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //---- okAndAnotherButtonLabel ---- okAndAnotherButtonLabel.setText("+ 1"); okAndAnotherButtonLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); buttonPanel.add(okAndAnotherButtonLabel, cc.xywh(12, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); } mainPanel.add(buttonPanel, cc.xywh(1, 7, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //---- separator2 ---- separator2.setBackground(new Color(220, 220, 232)); separator2.setForeground(new Color(147, 131, 86)); separator2.setMinimumSize(new Dimension(1, 10)); separator2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); mainPanel.add(separator2, cc.xy(1, 9)); //======== gradientPanel2 ======== { gradientPanel2.setBackground(new Color(200, 205, 232)); gradientPanel2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); gradientPanel2.setLayout(new FormLayout(ColumnSpec.decodeSpecs("default:grow"), new RowSpec[] { new RowSpec("35px"), FormFactory.UNRELATED_GAP_ROWSPEC })); //---- auditLabel ---- auditLabel.setText("created | modified"); auditLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); gradientPanel2.add(auditLabel, new CellConstraints(1, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.DEFAULT, new Insets(0, 10, 0, 0))); } mainPanel.add(gradientPanel2, cc.xy(1, 11)); } contentPane.add(mainPanel, cc.xywh(1, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); pack(); setLocationRelativeTo(getOwner()); // JFormDesigner - End of component initialization //GEN-END:initComponents final StandardEditor editor = this; WindowAdapter windowAdapter = new WindowAdapter() { public void windowClosing(final WindowEvent windowEvent) { if (saveButton.isVisible()) { if (readOnly) { closeAndNoSave(); } else if (showCloseConfirmDialog(0) == JOptionPane.YES_OPTION) { if (!model.validateAndDisplayDialog(windowEvent)) { // didnot validate so don't save it choice = -1; } else { setVisible(false); } } } else if (JOptionPane.showConfirmDialog(editor, "Clicking the close box is the same as clicking cancel. All changes will not be saved.\n" + "Are you sure you wish to do this?", "Confirm cancel", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) { myIsDialogCancelled = true; setVisible(false); } } }; addWindowListener(windowAdapter); this.getRootPane().setDefaultButton(this.getOkButton()); }