List of usage examples for com.jgoodies.forms.layout CellConstraints xywh
public CellConstraints xywh(int col, int row, int colSpan, int rowSpan, Alignment colAlign, Alignment rowAlign)
Examples:
cc.xywh(1, 3, 2, 1, CellConstraints.LEFT, CellConstraints.BOTTOM); cc.xywh(1, 3, 7, 3, CellConstraints.CENTER, CellConstraints.FILL);
From source file:org.archiviststoolkit.dialog.GeneralAdminDialog.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(); dialogTitle = new JLabel(); scrollPane1 = new JScrollPane(); contentTable = new DomainSortableTable(); buttonBar = new JPanel(); batchAddButton = new JButton(); addRecordButton = new JButton(); removeRecordButton = new JButton(); doneButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setModal(true);/*from w w w. j av a 2 s .co m*/ Container contentPane = getContentPane(); contentPane.setLayout(new BorderLayout()); //======== dialogPane ======== { dialogPane.setBorder(Borders.DIALOG_BORDER); dialogPane.setBackground(new Color(200, 205, 232)); dialogPane.setLayout(new BorderLayout()); //======== contentPanel ======== { contentPanel.setOpaque(false); contentPanel.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 })); //---- dialogTitle ---- dialogTitle.setText("dialogTitle"); dialogTitle.setFont(new Font("Lucida Grande", Font.BOLD, 16)); contentPanel.add(dialogTitle, cc.xywh(1, 1, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //======== scrollPane1 ======== { //---- contentTable ---- contentTable.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { contentTableMouseClicked(e); } }); scrollPane1.setViewportView(contentTable); } contentPanel.add(scrollPane1, cc.xy(1, 3)); //======== buttonBar ======== { buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER); buttonBar.setOpaque(false); buttonBar.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.GLUE_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.UNRELATED_GAP_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC }, RowSpec.decodeSpecs("pref"))); //---- batchAddButton ---- batchAddButton.setText("Batch Add"); batchAddButton.setOpaque(false); batchAddButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { batchAddButtonActionPerformed(e); } }); buttonBar.add(batchAddButton, cc.xy(2, 1)); //---- addRecordButton ---- addRecordButton.setText("Add Record"); addRecordButton.setOpaque(false); addRecordButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { addRecordButtonActionPerformed(e); } }); buttonBar.add(addRecordButton, cc.xy(6, 1)); //---- removeRecordButton ---- removeRecordButton.setText("Remove Records"); removeRecordButton.setOpaque(false); removeRecordButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { removeRecordButtonActionPerformed(e); } }); buttonBar.add(removeRecordButton, cc.xy(8, 1)); //---- doneButton ---- doneButton.setText("Done"); doneButton.setOpaque(false); doneButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { doneButtonActionPerformed(e); } }); buttonBar.add(doneButton, cc.xy(12, 1)); } contentPanel.add(buttonBar, cc.xy(1, 5)); } dialogPane.add(contentPanel, BorderLayout.CENTER); } contentPane.add(dialogPane, BorderLayout.CENTER); pack(); setLocationRelativeTo(getOwner()); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:org.archiviststoolkit.dialog.JiraReportDialog.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(); panel2 = new JPanel(); label3 = new JLabel(); label4 = new JLabel(); label1 = new JLabel(); summary = new JTextField(); label2 = new JLabel(); scrollPane1 = new JScrollPane(); detailedDescription = new JTextArea(); panel1 = new JPanel(); label5 = new JLabel(); emailAddress = new JTextField(); label6 = new JLabel(); fullName = new JTextField(); buttonBar = new JPanel(); cancelButton = new JButton(); sendButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setModal(true);//from w w w . j a v a 2 s . co m setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); Container contentPane = getContentPane(); contentPane.setLayout(new BorderLayout()); //======== dialogPane ======== { dialogPane.setBorder(Borders.DIALOG_BORDER); dialogPane.setBackground(new Color(200, 205, 232)); dialogPane.setLayout(new BorderLayout()); //======== contentPanel ======== { contentPanel.setOpaque(false); contentPanel.setLayout(new FormLayout(ColumnSpec.decodeSpecs("max(default;600px):grow"), new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.UNRELATED_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 })); //======== panel2 ======== { panel2.setOpaque(false); panel2.setLayout( new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default"))); //---- label3 ---- label3.setIcon(new ImageIcon( getClass().getResource("/org/archiviststoolkit/resources/images/bug.png"))); panel2.add(label3, cc.xy(1, 1)); //---- label4 ---- label4.setText("Bug Reporter"); label4.setFont(new Font("Lucida Grande", Font.PLAIN, 15)); panel2.add(label4, cc.xywh(3, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.TOP)); } contentPanel.add(panel2, cc.xy(1, 1)); //---- label1 ---- label1.setText("Please enter a brief summary..."); label1.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); contentPanel.add(label1, cc.xy(1, 3)); contentPanel.add(summary, cc.xy(1, 5)); //---- label2 ---- label2.setText("...and a detailed description"); label2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); contentPanel.add(label2, cc.xy(1, 7)); //======== scrollPane1 ======== { scrollPane1.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); //---- detailedDescription ---- detailedDescription.setRows(20); detailedDescription.setLineWrap(true); scrollPane1.setViewportView(detailedDescription); } contentPanel.add(scrollPane1, cc.xy(1, 9)); //======== panel1 ======== { panel1.setOpaque(false); panel1.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //---- label5 ---- label5.setText("Email Address"); panel1.add(label5, cc.xy(1, 1)); panel1.add(emailAddress, cc.xy(3, 1)); //---- label6 ---- label6.setText("Full Name"); panel1.add(label6, cc.xy(1, 3)); panel1.add(fullName, cc.xy(3, 3)); } contentPanel.add(panel1, cc.xy(1, 11)); } dialogPane.add(contentPanel, BorderLayout.CENTER); //======== buttonBar ======== { buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER); buttonBar.setOpaque(false); buttonBar.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.GLUE_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC }, RowSpec.decodeSpecs("pref"))); //---- cancelButton ---- cancelButton.setText("Cancel"); cancelButton.setOpaque(false); cancelButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { cancelButtonActionPerformed(e); } }); buttonBar.add(cancelButton, cc.xy(4, 1)); //---- sendButton ---- sendButton.setText("Send"); sendButton.setOpaque(false); sendButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { sendButtonActionPerformed(e); } }); buttonBar.add(sendButton, cc.xy(6, 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:org.archiviststoolkit.dialog.ReportDialogFields.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(); reportList = new JComboBox(); reportHeaderPanel = new JPanel(); label2 = new JLabel(); reportHeader = new JTextField(); findingAidOptionsPanel = new JPanel(); suppressInternalOnly = new JCheckBox(); panel1 = new JPanel(); includeDaos = new JCheckBox(); useDOIDAsHREF = new JCheckBox(); label3 = new JLabel(); outputOptions = new JComboBox(); label4 = new JLabel(); scrollPane1 = new JScrollPane(); reportDescription = new JTextArea(); CellConstraints cc = new CellConstraints(); //======== this ======== setOpaque(false);/*from ww w . jav a 2s . com*/ setPreferredSize(new Dimension(600, 171)); setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.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, new RowSpec(RowSpec.TOP, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) })); //---- label1 ---- label1.setText("Select Report"); add(label1, cc.xy(1, 1)); //---- reportList ---- reportList.setOpaque(false); reportList.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { reportListActionPerformed(); } }); add(reportList, cc.xywh(3, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //======== reportHeaderPanel ======== { reportHeaderPanel.setOpaque(false); reportHeaderPanel.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, RowSpec.decodeSpecs("default"))); //---- label2 ---- label2.setText("Report Header"); reportHeaderPanel.add(label2, cc.xy(1, 1)); reportHeaderPanel.add(reportHeader, cc.xy(3, 1)); } add(reportHeaderPanel, cc.xywh(1, 3, 3, 1)); //======== findingAidOptionsPanel ======== { findingAidOptionsPanel.setOpaque(false); findingAidOptionsPanel.setVisible(false); findingAidOptionsPanel .setLayout( new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("top:default"))); //---- suppressInternalOnly ---- suppressInternalOnly .setText("<html>Suppress components and notes <br>when marked \"internal only\"? </html>"); suppressInternalOnly.setVerticalAlignment(SwingConstants.TOP); suppressInternalOnly.setOpaque(false); findingAidOptionsPanel.add(suppressInternalOnly, cc.xy(1, 1)); //======== panel1 ======== { panel1.setOpaque(false); panel1.setLayout(new FormLayout(ColumnSpec.decodeSpecs("default"), new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //---- includeDaos ---- includeDaos.setText(" Include DAO's in output?"); includeDaos.setOpaque(false); panel1.add(includeDaos, cc.xy(1, 1)); //---- useDOIDAsHREF ---- useDOIDAsHREF.setText("Use Digital Object ID as HREF?"); panel1.add(useDOIDAsHREF, cc.xy(1, 3)); } findingAidOptionsPanel.add(panel1, cc.xy(3, 1)); } add(findingAidOptionsPanel, cc.xywh(1, 5, 3, 1)); //---- label3 ---- label3.setText("Select Output"); add(label3, cc.xy(1, 7)); //---- outputOptions ---- outputOptions.setOpaque(false); outputOptions.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { outputOptionsActionPerformed(); } }); add(outputOptions, cc.xywh(3, 7, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //---- label4 ---- label4.setText("Report Description"); add(label4, cc.xy(1, 9)); //======== scrollPane1 ======== { scrollPane1.setBorder(null); scrollPane1.setOpaque(false); //---- reportDescription ---- reportDescription.setRows(5); reportDescription.setBorder(null); reportDescription.setOpaque(false); reportDescription.setEditable(false); reportDescription.setDragEnabled(false); reportDescription.setFocusable(false); reportDescription.setWrapStyleWord(true); reportDescription.setLineWrap(true); scrollPane1.setViewportView(reportDescription); } add(scrollPane1, cc.xywh(3, 9, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:org.archiviststoolkit.dialog.SplashScreen.java
License:Open Source License
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license panel1 = new JPanel(); label1 = new JLabel(); version = new JLabel(); viewLicesnseAgreement = new JLabel(); message = new JLabel(); CellConstraints cc = new CellConstraints(); //======== this ======== setBackground(Color.white);/* w w w.j a v a2 s .co m*/ setForeground(Color.white); setResizable(false); setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); addKeyListener(new KeyAdapter() { @Override public void keyPressed(KeyEvent e) { thisKeyPressed(e); } }); Container contentPane = getContentPane(); contentPane.setLayout(new FormLayout("default:grow", "fill:default:grow")); //======== panel1 ======== { panel1.setBorder(new LineBorder(Color.black, 3)); panel1.setBackground(Color.white); panel1.setLayout(new FormLayout(ColumnSpec.decodeSpecs("default:grow"), new RowSpec[] { new RowSpec(RowSpec.TOP, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.UNRELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.UNRELATED_GAP_ROWSPEC })); //---- label1 ---- label1.setIcon( new ImageIcon(getClass().getResource("/org/archiviststoolkit/resources/images/ATLogo.jpg"))); label1.setBorder(null); panel1.add(label1, cc.xy(1, 1)); //---- version ---- version.setText("version"); version.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel1.add(version, cc.xywh(1, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //---- viewLicesnseAgreement ---- viewLicesnseAgreement.setText("<html><u>View license agreement</u></html>"); viewLicesnseAgreement.setFont(new Font("Trebuchet MS", Font.PLAIN, 10)); viewLicesnseAgreement.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { viewLicesnseAgreementMouseClicked(e); } }); panel1.add(viewLicesnseAgreement, cc.xywh(1, 4, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); panel1.add(message, cc.xywh(1, 6, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); } contentPane.add(panel1, cc.xy(1, 1)); pack(); setLocationRelativeTo(getOwner()); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:org.archiviststoolkit.editor.AccessionsLocationsFields.java
License:Open Source License
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license label_subjectTerm = new JLabel(); note = ATBasicComponentFactory//from ww w .j a v a2s .c o m .createTextField(detailsModel.getModel(AccessionsLocations.PROPERTYNAME_NOTE)); label_subjectTermType = new JLabel(); scrollPane1 = new JScrollPane(); locationTextArea = new JTextArea(); changeLocationButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setBorder(Borders.DLU4_BORDER); setBackground(new Color(234, 201, 250)); setOpaque(false); setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); 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.TOP, Sizes.DEFAULT, FormSpec.NO_GROW), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //---- label_subjectTerm ---- label_subjectTerm.setText("Note/Container Info"); label_subjectTerm.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_subjectTerm, Accessions.class, AccessionsLocations.PROPERTYNAME_NOTE); add(label_subjectTerm, cc.xy(1, 1)); add(note, cc.xy(3, 1)); //---- label_subjectTermType ---- label_subjectTermType.setText("Location"); label_subjectTermType.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_subjectTermType, Accessions.class, AccessionsLocations.PROPERTYNAME_LOCATION); add(label_subjectTermType, cc.xy(1, 3)); //======== scrollPane1 ======== { scrollPane1.setBorder(null); scrollPane1.setOpaque(false); //---- locationTextArea ---- locationTextArea.setRows(3); locationTextArea.setOpaque(false); locationTextArea.setEditable(false); locationTextArea.setLineWrap(true); locationTextArea.setWrapStyleWord(true); scrollPane1.setViewportView(locationTextArea); } add(scrollPane1, cc.xy(3, 3)); //---- changeLocationButton ---- changeLocationButton.setText("Change Location"); changeLocationButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { changeLocationButtonActionPerformed(); } }); add(changeLocationButton, cc.xywh(3, 5, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:org.archiviststoolkit.editor.ArchDescriptionAnalogInstancesFields.java
License:Open Source License
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license label_subjectTermType = new JLabel(); container1Type = ATBasicComponentFactory.createComboBox(detailsModel, ArchDescriptionAnalogInstances.PROPERTYNAME_CONTAINER1_TYPE, ArchDescriptionAnalogInstances.class); label_subjectSource5 = new JLabel(); containerLabel4 = ATBasicComponentFactory.createTextField( detailsModel.getModel(ArchDescriptionAnalogInstances.PROPERTYNAME_CONTAINER1_INDICATOR)); label_subjectSource4 = new JLabel(); containerLabel3 = ATBasicComponentFactory .createTextField(detailsModel.getModel(ArchDescriptionAnalogInstances.PROPERTYNAME_BARCODE)); separator1 = new JSeparator(); label_subjectTermType2 = new JLabel(); container2Type = ATBasicComponentFactory.createComboBox(detailsModel, ArchDescriptionAnalogInstances.PROPERTYNAME_CONTAINER2_TYPE, ArchDescriptionAnalogInstances.class); label_subjectSource6 = new JLabel(); containerLabel5 = ATBasicComponentFactory.createTextField( detailsModel.getModel(ArchDescriptionAnalogInstances.PROPERTYNAME_CONTAINER2_INDICATOR)); separator3 = new JSeparator(); label_subjectTermType3 = new JLabel(); container3Type = ATBasicComponentFactory.createComboBox(detailsModel, ArchDescriptionAnalogInstances.PROPERTYNAME_CONTAINER3_TYPE, ArchDescriptionAnalogInstances.class); label_subjectSource7 = new JLabel(); containerLabel6 = ATBasicComponentFactory.createTextField( detailsModel.getModel(ArchDescriptionAnalogInstances.PROPERTYNAME_CONTAINER3_INDICATOR)); separator2 = new JSeparator(); label_subjectTerm2 = new JLabel(); containerLabel2 = ATBasicComponentFactory .createTextField(detailsModel.getModel(ArchDescriptionAnalogInstances.PROPERTYNAME_LOCATION_LABEL)); CellConstraints cc = new CellConstraints(); //======== this ======== setBorder(Borders.DLU4_BORDER);/*from ww w .j a v a2 s . c o m*/ setBackground(new Color(234, 201, 250)); setOpaque(false); setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); 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, 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, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //---- label_subjectTermType ---- label_subjectTermType.setText("Container 1 Type"); label_subjectTermType.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_subjectTermType, ArchDescriptionAnalogInstances.class, ArchDescriptionAnalogInstances.PROPERTYNAME_CONTAINER1_TYPE); add(label_subjectTermType, cc.xy(1, 1)); //---- container1Type ---- container1Type.setOpaque(false); container1Type.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); add(container1Type, cc.xywh(3, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //---- label_subjectSource5 ---- label_subjectSource5.setText("Container 1 Indicator"); label_subjectSource5.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_subjectSource5, ArchDescriptionAnalogInstances.class, ArchDescriptionAnalogInstances.PROPERTYNAME_CONTAINER1_INDICATOR); add(label_subjectSource5, cc.xy(1, 3)); add(containerLabel4, cc.xy(3, 3)); //---- label_subjectSource4 ---- label_subjectSource4.setText("Barcode"); label_subjectSource4.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_subjectSource4, ArchDescriptionAnalogInstances.class, ArchDescriptionAnalogInstances.PROPERTYNAME_BARCODE); add(label_subjectSource4, cc.xy(1, 5)); add(containerLabel3, cc.xy(3, 5)); //---- separator1 ---- separator1.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); separator1.setForeground(new Color(147, 131, 86)); add(separator1, cc.xywh(1, 7, 3, 1)); //---- label_subjectTermType2 ---- label_subjectTermType2.setText("Container 2 Type"); label_subjectTermType2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_subjectTermType2, ArchDescriptionAnalogInstances.class, ArchDescriptionAnalogInstances.PROPERTYNAME_CONTAINER2_TYPE); add(label_subjectTermType2, cc.xy(1, 9)); //---- container2Type ---- container2Type.setOpaque(false); container2Type.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); add(container2Type, cc.xywh(3, 9, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //---- label_subjectSource6 ---- label_subjectSource6.setText("Container 2 Indicator"); label_subjectSource6.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_subjectSource6, ArchDescriptionAnalogInstances.class, ArchDescriptionAnalogInstances.PROPERTYNAME_CONTAINER2_INDICATOR); add(label_subjectSource6, cc.xy(1, 11)); add(containerLabel5, cc.xy(3, 11)); //---- separator3 ---- separator3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); separator3.setForeground(new Color(147, 131, 86)); add(separator3, cc.xywh(1, 13, 3, 1)); //---- label_subjectTermType3 ---- label_subjectTermType3.setText("Container 3 Type"); label_subjectTermType3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_subjectTermType3, ArchDescriptionAnalogInstances.class, ArchDescriptionAnalogInstances.PROPERTYNAME_CONTAINER3_TYPE); add(label_subjectTermType3, cc.xy(1, 15)); //---- container3Type ---- container3Type.setOpaque(false); container3Type.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); add(container3Type, cc.xywh(3, 15, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //---- label_subjectSource7 ---- label_subjectSource7.setText("Container 3 Indicator"); label_subjectSource7.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_subjectSource7, ArchDescriptionAnalogInstances.class, ArchDescriptionAnalogInstances.PROPERTYNAME_CONTAINER3_INDICATOR); add(label_subjectSource7, cc.xy(1, 17)); add(containerLabel6, cc.xy(3, 17)); //---- separator2 ---- separator2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); separator2.setForeground(new Color(147, 131, 86)); add(separator2, cc.xywh(1, 19, 3, 1)); //---- label_subjectTerm2 ---- label_subjectTerm2.setText("Location"); label_subjectTerm2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_subjectTerm2, ArchDescriptionAnalogInstances.class, ArchDescriptionAnalogInstances.PROPERTYNAME_LOCATION); add(label_subjectTerm2, cc.xy(1, 21)); //---- containerLabel2 ---- containerLabel2.setEditable(false); containerLabel2.setOpaque(false); containerLabel2.setBorder(null); add(containerLabel2, cc.xy(3, 21)); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:org.archiviststoolkit.editor.ArchDescriptionNotesFields.java
License:Open Source License
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license panel1 = new JPanel(); internalOnly = ATBasicComponentFactory.createCheckBox(detailsModel, ArchDescriptionNotes.PROPERTYNAME_ARCH_DESCRIPTION_NOTE_INTERNAL_ONLY, ArchDescriptionNotes.class); multiPart = ATBasicComponentFactory.createCheckBox(detailsModel, ArchDescriptionNotes.PROPERTYNAME_ARCH_DESCRIPTION_MULTI_PART, ArchDescriptionNotes.class); panel2 = new JPanel(); label3 = new JLabel(); persistentId = ATBasicComponentFactory .createTextField(detailsModel.getModel(ArchDescriptionRepeatingData.PROPERTYNAME_PERSISTENT_ID)); label1 = new JLabel(); notesType = new JComboBox(); label2 = new JLabel(); title = ATBasicComponentFactory//from w w w . j ava 2 s .c om .createTextField(detailsModel.getModel(ArchDescriptionRepeatingData.PROPERTYNAME_TITLE)); cardPane = new JPanel(); simpleNote = new JPanel(); label14 = new JLabel(); scrollPane1 = new JScrollPane(); noteContent = ATBasicComponentFactory.createTextArea( detailsModel.getModel(ArchDescriptionNotes.PROPERTYNAME_ARCH_DESCRIPTION_NOTE_CONTENT), false); tagApplicatorPanel = new JPanel(); insertInlineTag = new JComboBox(); multiPartNote = new JPanel(); scrollPane6 = new JScrollPane(); repeatingDataTable = new DomainSortedTable(ArchDescriptionRepeatingData.class); panel15 = new JPanel(); addPartComboBox = new JComboBox(); removePartButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setBorder(Borders.DLU4_BORDER); setPreferredSize(new Dimension(800, 500)); setBackground(new Color(200, 205, 232)); setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.MINIMUM, FormSpec.DEFAULT_GROW) }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) })); //======== panel1 ======== { panel1.setOpaque(false); panel1.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.RIGHT, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, RowSpec.decodeSpecs("default"))); //---- internalOnly ---- internalOnly.setBackground(new Color(231, 188, 251)); internalOnly.setText("Internal Only"); internalOnly.setOpaque(false); internalOnly.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel1.add(internalOnly, cc.xy(1, 1)); //---- multiPart ---- multiPart.setBackground(new Color(231, 188, 251)); multiPart.setText("Multi-part"); multiPart.setOpaque(false); multiPart.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); multiPart.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { multiPartActionPerformed(e); } }); panel1.add(multiPart, cc.xy(3, 1)); //======== panel2 ======== { panel2.setOpaque(false); panel2.setLayout( new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default"))); //---- label3 ---- label3.setText("Persistent ID"); label3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel2.add(label3, cc.xy(1, 1)); //---- persistentId ---- persistentId.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); persistentId.setColumns(3); persistentId.setBorder(null); persistentId.setEditable(false); persistentId.setOpaque(false); panel2.add(persistentId, cc.xywh(3, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); } panel1.add(panel2, cc.xy(5, 1)); } add(panel1, cc.xywh(1, 1, 3, 1)); //---- label1 ---- label1.setText("Type"); label1.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label1, ArchDescriptionNotes.class, ArchDescriptionNotes.PROPERTYNAME_ARCH_DESCRIPTION_NOTE_TYPE); add(label1, cc.xy(1, 3)); //---- notesType ---- notesType.setOpaque(false); notesType.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); notesType.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { notesTypeActionPerformed(e); } }); add(notesType, cc.xy(3, 3)); //---- label2 ---- label2.setText("Title"); label2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label2, ArchDescriptionNotes.class, ArchDescriptionNotes.PROPERTYNAME_TITLE); add(label2, cc.xy(1, 5)); add(title, new CellConstraints(3, 5, 1, 1, CellConstraints.DEFAULT, CellConstraints.TOP, new Insets(0, 0, 0, 5))); //======== cardPane ======== { cardPane.setLayout(new CardLayout()); //======== simpleNote ======== { simpleNote.setBorder(null); simpleNote.setBackground(new Color(200, 205, 232)); simpleNote.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, new RowSpec[] { new RowSpec(RowSpec.TOP, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //---- label14 ---- label14.setText("Note"); label14.setVerticalAlignment(SwingConstants.TOP); label14.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label14, ArchDescriptionNotes.class, ArchDescriptionNotes.PROPERTYNAME_ARCH_DESCRIPTION_NOTE_CONTENT); simpleNote.add(label14, cc.xywh(1, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.TOP)); //======== scrollPane1 ======== { scrollPane1.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane1.setMaximumSize(new Dimension(32767, 100)); //---- noteContent ---- noteContent.setRows(20); noteContent.setLineWrap(true); noteContent.setTabSize(20); noteContent.setWrapStyleWord(true); noteContent.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { noteContentFocusGained(); } @Override public void focusLost(FocusEvent e) { noteContentFocusLost(); } }); scrollPane1.setViewportView(noteContent); } simpleNote.add(scrollPane1, cc.xywh(3, 1, 3, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //======== tagApplicatorPanel ======== { tagApplicatorPanel.setOpaque(false); tagApplicatorPanel .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"))); //---- insertInlineTag ---- insertInlineTag.setOpaque(false); insertInlineTag.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); insertInlineTag.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { insertInlineTagActionPerformed(); } }); tagApplicatorPanel.add(insertInlineTag, cc.xy(1, 1)); } simpleNote.add(tagApplicatorPanel, cc.xywh(3, 3, 3, 1)); } cardPane.add(simpleNote, "simpleNote"); //======== multiPartNote ======== { multiPartNote.setBorder(Borders.DLU4_BORDER); multiPartNote.setBackground(new Color(200, 205, 232)); multiPartNote .setLayout( new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //======== scrollPane6 ======== { scrollPane6.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane6.setOpaque(false); scrollPane6.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); //---- repeatingDataTable ---- repeatingDataTable.setFocusable(false); repeatingDataTable.setDragEnabled(true); repeatingDataTable.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { repeatingDataTableMouseClicked(e); } @Override public void mousePressed(MouseEvent e) { repeatingDataTableMouseEvent(e); } @Override public void mouseReleased(MouseEvent e) { repeatingDataTableMouseEvent(e); } }); scrollPane6.setViewportView(repeatingDataTable); } multiPartNote.add(scrollPane6, cc.xywh(1, 1, 3, 1)); //======== panel15 ======== { panel15.setBackground(new Color(231, 188, 251)); panel15.setOpaque(false); panel15.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel15.setLayout( new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default:grow"))); //---- addPartComboBox ---- addPartComboBox.setOpaque(false); addPartComboBox.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { addPartComboBoxActionPerformed(e); } }); panel15.add(addPartComboBox, cc.xy(1, 1)); //---- removePartButton ---- removePartButton.setBackground(new Color(231, 188, 251)); removePartButton.setText("Remove Part"); removePartButton.setOpaque(false); removePartButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); removePartButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { removePartButtonActionPerformed(); } }); panel15.add(removePartButton, cc.xy(3, 1)); } multiPartNote.add(panel15, cc.xywh(1, 3, 3, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); } cardPane.add(multiPartNote, "multiPartNote"); } add(cardPane, cc.xywh(1, 7, 3, 1)); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:org.archiviststoolkit.editor.BasicNoteFields.java
License:Open Source License
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license label14 = new JLabel(); scrollPane1 = new JScrollPane(); noteContent = ATBasicComponentFactory.createTextArea( detailsModel.getModel(ArchDescriptionNotes.PROPERTYNAME_ARCH_DESCRIPTION_NOTE_CONTENT), false); tagApplicatorPanel = new JPanel(); insertInlineTag = ATBasicComponentFactory.createUnboundComboBox(InLineTagsUtils.getInLineTagList()); CellConstraints cc = new CellConstraints(); //======== this ======== setBorder(Borders.DLU4_BORDER);/*from w w w .ja va 2 s . c om*/ setOpaque(false); setPreferredSize(new Dimension(600, 500)); setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, new RowSpec[] { new RowSpec(RowSpec.TOP, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //---- label14 ---- label14.setText("Text"); label14.setVerticalAlignment(SwingConstants.TOP); label14.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label14, ArchDescriptionNotes.class, ArchDescriptionNotes.PROPERTYNAME_ARCH_DESCRIPTION_NOTE_CONTENT); add(label14, cc.xywh(1, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.TOP)); //======== scrollPane1 ======== { scrollPane1.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane1.setMaximumSize(new Dimension(32767, 100)); //---- noteContent ---- noteContent.setRows(20); noteContent.setLineWrap(true); noteContent.setTabSize(20); noteContent.setWrapStyleWord(true); scrollPane1.setViewportView(noteContent); } add(scrollPane1, cc.xywh(3, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //======== tagApplicatorPanel ======== { tagApplicatorPanel.setOpaque(false); tagApplicatorPanel .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"))); //---- insertInlineTag ---- insertInlineTag.setOpaque(false); insertInlineTag.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); insertInlineTag.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { insertInlineTagActionPerformed(); } }); tagApplicatorPanel.add(insertInlineTag, cc.xy(1, 1)); } add(tagApplicatorPanel, cc.xy(3, 3)); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:org.archiviststoolkit.editor.BibItemsFields.java
License:Open Source License
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license label_subjectScopeNote = new JLabel(); scrollPane1 = new JScrollPane(); value = ATBasicComponentFactory.createTextArea(detailsModel.getModel(BibItems.PROPERTYNAME_ITEM_VALUE), false);// w w w .j a va2 s .com tagApplicatorPanel = new JPanel(); insertInlineTag = ATBasicComponentFactory .createUnboundComboBox(InLineTagsUtils.getInLineTagList(InLineTagsUtils.BIB_ITEM_VALUE)); CellConstraints cc = new CellConstraints(); //======== this ======== setBorder(Borders.DLU4_BORDER); setOpaque(false); setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); setPreferredSize(new Dimension(600, 300)); setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec("max(default;400px):grow") }, new RowSpec[] { new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //---- label_subjectScopeNote ---- label_subjectScopeNote.setText("Value"); label_subjectScopeNote.setVerticalAlignment(SwingConstants.TOP); label_subjectScopeNote.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_subjectScopeNote, BibItems.class, BibItems.PROPERTYNAME_ITEM_VALUE); add(label_subjectScopeNote, cc.xywh(1, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.TOP)); //======== scrollPane1 ======== { scrollPane1.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane1.setMaximumSize(new Dimension(32767, 100)); scrollPane1.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); //---- value ---- value.setRows(4); value.setLineWrap(true); value.setTabSize(20); value.setWrapStyleWord(true); scrollPane1.setViewportView(value); } add(scrollPane1, cc.xy(3, 1)); //======== tagApplicatorPanel ======== { tagApplicatorPanel.setOpaque(false); tagApplicatorPanel .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"))); //---- insertInlineTag ---- insertInlineTag.setOpaque(false); insertInlineTag.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); insertInlineTag.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { insertInlineTagActionPerformed(); } }); tagApplicatorPanel.add(insertInlineTag, cc.xy(1, 1)); } add(tagApplicatorPanel, cc.xy(3, 3)); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:org.archiviststoolkit.editor.BibliographyFields.java
License:Open Source License
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license panel1 = new JPanel(); internalOnly = ATBasicComponentFactory.createCheckBox(detailsModel, ArchDescriptionStructuredData.PROPERTYNAME_ARCH_DESCRIPTION_NOTE_INTERNAL_ONLY, Bibliography.class); panel4 = new JPanel(); label4 = new JLabel(); persistentId2 = ATBasicComponentFactory .createTextField(detailsModel.getModel(ArchDescriptionRepeatingData.PROPERTYNAME_PERSISTENT_ID)); label_subjectTerm = new JLabel(); title = ATBasicComponentFactory.createTextField(detailsModel.getModel(Bibliography.PROPERTYNAME_TITLE)); label_subjectScopeNote = new JLabel(); scrollPane1 = new JScrollPane(); note = ATBasicComponentFactory.createTextArea(detailsModel.getModel(Bibliography.PROPERTYNAME_NOTE)); tagApplicatorPanel = new JPanel(); insertInlineTag = ATBasicComponentFactory.createUnboundComboBox(InLineTagsUtils.getInLineTagList()); label_subjectScopeNote2 = new JLabel(); scrollPane2 = new JScrollPane(); ingestProblems = ATBasicComponentFactory .createTextArea(detailsModel.getModel(Bibliography.PROPERTYNAME_EAD_INGEST_PROBLEMS)); scrollPane7 = new JScrollPane(); itemsTable = new DomainSortedTable(BibItems.class); panel3 = new JPanel(); panel30 = new JPanel(); addItemButton = new JButton(); removeItemButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setBorder(Borders.DLU4_BORDER);//w ww. j a v a 2 s . c om 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(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.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 })); //======== panel1 ======== { panel1.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, RowSpec.decodeSpecs("default"))); //---- internalOnly ---- internalOnly.setBackground(new Color(231, 188, 251)); internalOnly.setText("Internal Only"); internalOnly.setOpaque(false); internalOnly.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel1.add(internalOnly, cc.xy(1, 1)); //======== panel4 ======== { panel4.setLayout( new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default"))); //---- label4 ---- label4.setText("Persistent ID"); label4.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel4.add(label4, cc.xy(1, 1)); //---- persistentId2 ---- persistentId2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); persistentId2.setColumns(3); persistentId2.setBorder(null); persistentId2.setEditable(false); persistentId2.setOpaque(false); panel4.add(persistentId2, cc.xywh(3, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); } panel1.add(panel4, cc.xywh(5, 1, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); } add(panel1, cc.xywh(1, 1, 3, 1)); //---- label_subjectTerm ---- label_subjectTerm.setText("Title"); label_subjectTerm.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_subjectTerm, Bibliography.class, Bibliography.PROPERTYNAME_TITLE); add(label_subjectTerm, cc.xy(1, 3)); add(title, cc.xy(3, 3)); //---- label_subjectScopeNote ---- label_subjectScopeNote.setText("Note"); label_subjectScopeNote.setVerticalAlignment(SwingConstants.TOP); label_subjectScopeNote.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_subjectScopeNote, Bibliography.class, Bibliography.PROPERTYNAME_NOTE); add(label_subjectScopeNote, cc.xywh(1, 5, 1, 1, CellConstraints.DEFAULT, CellConstraints.TOP)); //======== scrollPane1 ======== { scrollPane1.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane1.setMaximumSize(new Dimension(32767, 100)); scrollPane1.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); //---- note ---- note.setRows(4); note.setLineWrap(true); note.setTabSize(20); note.setWrapStyleWord(true); scrollPane1.setViewportView(note); } add(scrollPane1, cc.xy(3, 5)); //======== tagApplicatorPanel ======== { tagApplicatorPanel.setOpaque(false); tagApplicatorPanel .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"))); //---- insertInlineTag ---- insertInlineTag.setOpaque(false); insertInlineTag.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); insertInlineTag.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { insertInlineTagActionPerformed(); } }); tagApplicatorPanel.add(insertInlineTag, cc.xy(1, 1)); } add(tagApplicatorPanel, cc.xy(3, 7)); //---- label_subjectScopeNote2 ---- label_subjectScopeNote2.setText("Ingest Problems"); label_subjectScopeNote2.setVerticalAlignment(SwingConstants.TOP); label_subjectScopeNote2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_subjectScopeNote2, Bibliography.class, Bibliography.PROPERTYNAME_EAD_INGEST_PROBLEMS); add(label_subjectScopeNote2, cc.xywh(1, 9, 1, 1, CellConstraints.DEFAULT, CellConstraints.TOP)); //======== scrollPane2 ======== { scrollPane2.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane2.setMaximumSize(new Dimension(32767, 100)); scrollPane2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); //---- ingestProblems ---- ingestProblems.setRows(4); ingestProblems.setLineWrap(true); ingestProblems.setTabSize(20); ingestProblems.setWrapStyleWord(true); scrollPane2.setViewportView(ingestProblems); } add(scrollPane2, cc.xy(3, 9)); //======== scrollPane7 ======== { scrollPane7.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane7.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); //---- itemsTable ---- itemsTable.setFocusable(false); itemsTable.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { bibItemsTableMouseClicked(e); } @Override public void mousePressed(MouseEvent e) { itemsTableMousePressed(e); } @Override public void mouseReleased(MouseEvent e) { itemsTableMouseReleased(e); } }); scrollPane7.setViewportView(itemsTable); } add(scrollPane7, cc.xywh(1, 11, 3, 1)); //======== panel3 ======== { panel3.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) }, RowSpec.decodeSpecs("default"))); ((FormLayout) panel3.getLayout()).setColumnGroups(new int[][] { { 1, 3, 5 } }); //======== panel30 ======== { panel30.setOpaque(false); panel30.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel30.setLayout( new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default"))); //---- addItemButton ---- addItemButton.setText("Add Item"); addItemButton.setOpaque(false); addItemButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); addItemButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { addItemButtonActionPerformed(e); } }); panel30.add(addItemButton, cc.xy(1, 1)); //---- removeItemButton ---- removeItemButton.setBackground(new Color(231, 188, 251)); removeItemButton.setText("Remove Item"); removeItemButton.setOpaque(false); removeItemButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); removeItemButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { removeItemButtonActionPerformed(e); } }); panel30.add(removeItemButton, cc.xy(3, 1)); } panel3.add(panel30, cc.xy(3, 1)); } add(panel3, cc.xywh(1, 13, 3, 1)); // JFormDesigner - End of component initialization //GEN-END:initComponents }