List of usage examples for com.jgoodies.forms.layout CellConstraints xywh
public CellConstraints xywh(int col, int row, int colSpan, int rowSpan)
Examples:
cc.xywh(1, 3, 2, 1); cc.xywh(1, 3, 7, 3);
From source file:org.apache.cayenne.modeler.editor.ObjectQueryPropertiesPanel.java
License:Apache License
protected void initView() { super.initView(); // create widgets dataRows = new JCayenneCheckBox(); // assemble/*from w ww . j a v a 2s . c o m*/ CellConstraints cc = new CellConstraints(); FormLayout layout = new FormLayout( "right:max(80dlu;pref), 3dlu, left:max(50dlu;pref), fill:max(150dlu;pref)", "p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p"); PanelBuilder builder = new PanelBuilder(layout); builder.setDefaultDialogBorder(); builder.addSeparator("", cc.xywh(1, 1, 4, 1)); builder.addLabel("Result Caching:", cc.xy(1, 3)); builder.add(cacheStrategy, cc.xywh(3, 3, 2, 1)); cacheGroupsLabel = builder.addLabel("Cache Group:", cc.xy(1, 7)); builder.add(cacheGroups.getComponent(), cc.xywh(3, 7, 2, 1)); builder.addLabel("Fetch Data Rows:", cc.xy(1, 9)); builder.add(dataRows, cc.xy(3, 9)); builder.addLabel("Fetch Offset, Rows:", cc.xy(1, 11)); builder.add(fetchOffset.getComponent(), cc.xy(3, 11)); builder.addLabel("Fetch Limit, Rows:", cc.xy(1, 13)); builder.add(fetchLimit.getComponent(), cc.xy(3, 13)); builder.addLabel("Page Size:", cc.xy(1, 15)); builder.add(pageSize.getComponent(), cc.xy(3, 15)); this.setLayout(new BorderLayout()); this.add(builder.getPanel(), BorderLayout.CENTER); }
From source file:org.apache.cayenne.modeler.editor.ProcedureQueryView.java
License:Apache License
private void initView() { // create widgets name = new TextAdapter(new JTextField()) { @Override//from w ww. j a v a 2 s .c om protected void updateModel(String text) { setQueryName(text); } }; comment = new TextAdapter(new JTextField()) { @Override protected void updateModel(String text) { setQueryComment(text); } }; queryRoot = Application.getWidgetFactory().createUndoableComboBox(); queryRoot.setRenderer(CellRenderers.listRendererWithIcons()); properties = new ProcedureQueryPropertiesPanel(mediator); // assemble CellConstraints cc = new CellConstraints(); FormLayout layout = new FormLayout("right:max(80dlu;pref), 3dlu, fill:max(200dlu;pref)", "p, 3dlu, p, 3dlu, p, 3dlu, p"); PanelBuilder builder = new PanelBuilder(layout); builder.setDefaultDialogBorder(); builder.addSeparator("ProcedureQuery Settings", cc.xywh(1, 1, 3, 1)); builder.addLabel("Query Name:", cc.xy(1, 3)); builder.add(name.getComponent(), cc.xy(3, 3)); builder.addLabel("Procedure:", cc.xy(1, 5)); builder.add(queryRoot, cc.xy(3, 5)); builder.addLabel("Comment:", cc.xy(1, 7)); builder.add(comment.getComponent(), cc.xy(3, 7)); this.setLayout(new BorderLayout()); this.add(builder.getPanel(), BorderLayout.NORTH); this.add(properties, BorderLayout.CENTER); }
From source file:org.apache.cayenne.modeler.editor.RawQueryPropertiesPanel.java
License:Apache License
protected PanelBuilder createPanelBuilder() { CellConstraints cc = new CellConstraints(); FormLayout layout = new FormLayout( "right:max(80dlu;pref), 3dlu, left:max(10dlu;pref), " + "3dlu, left:max(37dlu;pref), 3dlu, fill:max(147dlu;pref)", "p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p"); PanelBuilder builder = new PanelBuilder(layout); builder.setDefaultDialogBorder();//from ww w.ja v a2 s. c o m builder.addSeparator("Select Properties", cc.xywh(1, 1, 7, 1)); builder.addLabel("Result Caching:", cc.xy(1, 3)); builder.add(cacheStrategy, cc.xywh(3, 3, 5, 1)); cacheGroupsLabel = builder.addLabel("Cache Group:", cc.xy(1, 7)); builder.add(cacheGroups.getComponent(), cc.xywh(3, 7, 5, 1)); builder.addLabel("Fetch Data Objects:", cc.xy(1, 9)); builder.add(dataObjects, cc.xy(3, 9)); builder.add(entities, cc.xywh(5, 9, 3, 1)); builder.addLabel("Fetch Offset, Rows:", cc.xy(1, 11)); builder.add(fetchOffset.getComponent(), cc.xywh(3, 11, 3, 1)); builder.addLabel("Fetch Limit, Rows:", cc.xy(1, 13)); builder.add(fetchLimit.getComponent(), cc.xywh(3, 13, 3, 1)); builder.addLabel("Page Size:", cc.xy(1, 15)); builder.add(pageSize.getComponent(), cc.xywh(3, 15, 3, 1)); return builder; }
From source file:org.apache.cayenne.modeler.editor.SelectQueryMainTab.java
License:Apache License
private void initView() { // create widgets name = new TextAdapter(new JTextField()) { @Override//w ww . j av a 2s . c o m protected void updateModel(String text) { setQueryName(text); } }; qualifier = new ValidatorTextAdapter(new JTextField()) { @Override protected void updateModel(String text) { setQueryQualifier(text); } @Override protected void validate(String text) throws ValidationException { createQualifier(text); } }; comment = new TextAdapter(new JTextField()) { @Override protected void updateModel(String text) { setQueryComment(text); } }; distinct = new JCayenneCheckBox(); properties = new ObjectQueryPropertiesPanel(mediator); // assemble CellConstraints cc = new CellConstraints(); FormLayout layout = new FormLayout("right:max(80dlu;pref), 3dlu, fill:200dlu", "p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p"); PanelBuilder builder = new PanelBuilder(layout); builder.setDefaultDialogBorder(); builder.addSeparator("SelectQuery Settings", cc.xywh(1, 1, 3, 1)); builder.addLabel("Query Name:", cc.xy(1, 3)); builder.add(name.getComponent(), cc.xy(3, 3)); builder.addLabel("Query Root:", cc.xy(1, 5)); builder.add(queryRoot, cc.xy(3, 5)); builder.addLabel("Qualifier:", cc.xy(1, 7)); builder.add(qualifier.getComponent(), cc.xy(3, 7)); builder.addLabel("Distinct:", cc.xy(1, 9)); builder.add(distinct, cc.xy(3, 9)); builder.addLabel("Comment:", cc.xy(1, 11)); builder.add(comment.getComponent(), cc.xy(3, 11)); this.setLayout(new BorderLayout()); this.add(builder.getPanel(), BorderLayout.NORTH); this.add(properties, BorderLayout.CENTER); }
From source file:org.apache.cayenne.modeler.editor.SQLTemplateMainTab.java
License:Apache License
private void initView() { // create widgets name = new TextAdapter(new JTextField()) { @Override/*ww w . j a va 2 s . c o m*/ protected void updateModel(String text) { setQueryName(text); } }; comment = new TextAdapter(new JTextField()) { @Override protected void updateModel(String text) { setQueryComment(text); } }; properties = new SQLTemplateQueryPropertiesPanel(mediator); // assemble CellConstraints cc = new CellConstraints(); FormLayout layout = new FormLayout("right:max(80dlu;pref), 3dlu, fill:max(200dlu;pref)", "p, 3dlu, p, 3dlu, p, 3dlu, p"); PanelBuilder builder = new PanelBuilder(layout); builder.setDefaultDialogBorder(); builder.addSeparator("SQLTemplate Settings", cc.xywh(1, 1, 3, 1)); builder.addLabel("Query Name:", cc.xy(1, 3)); builder.add(name.getComponent(), cc.xy(3, 3)); builder.addLabel("Comment:", cc.xy(1, 5)); builder.add(comment.getComponent(), cc.xy(3, 5)); builder.addLabel("Query Root:", cc.xy(1, 7)); builder.add(queryRoot, cc.xy(3, 7)); this.setLayout(new BorderLayout()); this.add(builder.getPanel(), BorderLayout.NORTH); this.add(properties, BorderLayout.CENTER); }
From source file:org.archiviststoolkit.dialog.AccessionLookup.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(); HeaderPanel = new JPanel(); mainHeaderPanel = new JPanel(); mainHeaderLabel = new JLabel(); panel3 = new JPanel(); subHeaderLabel = new JLabel(); contentPane = new JPanel(); label3 = new JLabel(); label4 = new JLabel(); scrollPane1 = new JScrollPane(); lookupTable = new DomainSortableTable(Resources.class, filterField); label1 = new JLabel(); filterField = new JTextField(); buttonBar = new JPanel(); linkButton = new JButton(); doneButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setModal(true);//from ww w .jav a 2 s . c o m setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent e) { thisWindowClosing(); } }); Container contentPane2 = getContentPane(); contentPane2.setLayout(new BorderLayout()); //======== dialogPane ======== { dialogPane.setBorder(null); dialogPane.setBackground(new Color(200, 205, 232)); dialogPane.setLayout(new BorderLayout()); //======== HeaderPanel ======== { HeaderPanel.setBackground(new Color(80, 69, 57)); HeaderPanel.setOpaque(false); HeaderPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); 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("default"))); //======== mainHeaderPanel ======== { mainHeaderPanel.setBackground(new Color(80, 35, 45)); 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) }, 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)); //======== panel3 ======== { panel3.setBackground(new Color(66, 60, 111)); panel3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel3.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.UNRELATED_GAP_COLSPEC }, new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC })); //---- subHeaderLabel ---- subHeaderLabel.setText("Lookup Accession"); subHeaderLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 18)); subHeaderLabel.setForeground(Color.white); panel3.add(subHeaderLabel, cc.xy(2, 2)); } HeaderPanel.add(panel3, cc.xy(2, 1)); } dialogPane.add(HeaderPanel, BorderLayout.NORTH); //======== contentPane ======== { contentPane.setBackground(new Color(231, 188, 251)); contentPane.setOpaque(false); contentPane .setLayout( new FormLayout( new ColumnSpec[] { FormFactory.UNRELATED_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.UNRELATED_GAP_COLSPEC }, new RowSpec[] { FormFactory.UNRELATED_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, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.UNRELATED_GAP_ROWSPEC })); //---- label3 ---- label3.setText("Double click on a Accession to select it."); contentPane.add(label3, cc.xywh(2, 2, 3, 1)); //---- label4 ---- label4.setText("Or hit enter if a Accession is highlighted."); contentPane.add(label4, cc.xywh(2, 4, 3, 1)); //======== scrollPane1 ======== { scrollPane1.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); //---- lookupTable ---- lookupTable.setPreferredScrollableViewportSize(new Dimension(450, 300)); lookupTable.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { lookupTableMouseClicked(e); } }); lookupTable.addKeyListener(new KeyAdapter() { @Override public void keyTyped(KeyEvent e) { lookupTableKeyTyped(e); } }); scrollPane1.setViewportView(lookupTable); } contentPane.add(scrollPane1, cc.xywh(2, 6, 3, 1)); //---- label1 ---- label1.setText("Filter:"); contentPane.add(label1, cc.xy(2, 8)); contentPane.add(filterField, cc.xy(4, 8)); //======== buttonBar ======== { buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER); buttonBar.setBackground(new Color(231, 188, 251)); buttonBar.setOpaque(false); buttonBar .setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC }, RowSpec.decodeSpecs("pref"))); //---- linkButton ---- linkButton.setText("Link"); linkButton.setOpaque(false); linkButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { linkButtonActionPerformed(); } }); buttonBar.add(linkButton, cc.xy(3, 1)); //---- doneButton ---- doneButton.setText("Close Window"); doneButton.setOpaque(false); doneButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { doneButtonActionPerformed(e); } }); buttonBar.add(doneButton, cc.xy(7, 1)); } contentPane.add(buttonBar, cc.xywh(2, 10, 3, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); } dialogPane.add(contentPane, BorderLayout.CENTER); } contentPane2.add(dialogPane, BorderLayout.CENTER); pack(); setLocationRelativeTo(getOwner()); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:org.archiviststoolkit.dialog.ATDebugDialog.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license dialogPane = new JPanel(); contentPanel = new JPanel(); tabbedPane1 = new JTabbedPane(); panel2 = new JPanel(); textField1 = new JTextField(); textField2 = new JTextField(); button6 = new JButton(); button7 = new JButton(); button8 = new JButton(); scrollPane2 = new JScrollPane(); textArea2 = new JTextArea(); panel1 = new JPanel(); button1 = new JButton(); button3 = new JButton(); button5 = new JButton(); button4 = new JButton(); button2 = new JButton(); scrollPane1 = new JScrollPane(); textArea1 = new JTextArea(); panel3 = new ATDebugEditorFields(); buttonBar = new JPanel(); button9 = new JButton(); button10 = new JButton(); okButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== Container contentPane = getContentPane(); contentPane.setLayout(new BorderLayout()); //======== dialogPane ======== {/* w w w.j a v a2 s . c o m*/ dialogPane.setBorder(Borders.DIALOG_BORDER); dialogPane.setLayout(new BorderLayout()); //======== contentPanel ======== { contentPanel.setLayout(new BorderLayout()); //======== tabbedPane1 ======== { //======== panel2 ======== { panel2.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(80)), 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, new RowSpec(RowSpec.FILL, Sizes.dluY(119), FormSpec.DEFAULT_GROW) })); //---- textField1 ---- textField1.setText("20"); panel2.add(textField1, cc.xy(1, 1)); //---- textField2 ---- textField2.setText("5"); panel2.add(textField2, cc.xy(3, 1)); //---- button6 ---- button6.setText("Start Test"); button6.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { startLockTest(e); } }); panel2.add(button6, cc.xy(1, 3)); //---- button7 ---- button7.setText("Stop Test"); button7.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { stopLockTest(e); } }); panel2.add(button7, cc.xy(3, 3)); //---- button8 ---- button8.setText("Clear"); button8.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { clearLockTestOutput(e); } }); panel2.add(button8, cc.xy(7, 3)); //======== scrollPane2 ======== { scrollPane2.setViewportView(textArea2); } panel2.add(scrollPane2, cc.xywh(1, 5, 7, 1)); } tabbedPane1.addTab("Program Lock Test", panel2); //======== panel1 ======== { 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, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, 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, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) })); //---- button1 ---- button1.setText("Record to XML"); button1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { button1ActionPerformed(e); } }); panel1.add(button1, cc.xy(1, 1)); //---- button3 ---- button3.setText("XML To Record"); button3.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { button3ActionPerformed(e); } }); panel1.add(button3, cc.xy(3, 1)); //---- button5 ---- button5.setText("Copy"); button5.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { button5ActionPerformed(e); } }); panel1.add(button5, cc.xy(5, 1)); //---- button4 ---- button4.setText("Save"); button4.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { button4ActionPerformed(e); } }); panel1.add(button4, cc.xy(7, 1)); //---- button2 ---- button2.setText("clear text"); button2.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { button2ActionPerformed(e); } }); panel1.add(button2, cc.xy(9, 1)); //======== scrollPane1 ======== { scrollPane1.setViewportView(textArea1); } panel1.add(scrollPane1, cc.xywh(1, 3, 9, 3)); } tabbedPane1.addTab("Export", panel1); tabbedPane1.addTab("ISO Date Test", panel3); } contentPanel.add(tabbedPane1, BorderLayout.CENTER); } dialogPane.add(contentPanel, BorderLayout.CENTER); //======== buttonBar ======== { buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER); buttonBar.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.GLUE_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC }, RowSpec.decodeSpecs("pref"))); //---- button9 ---- button9.setText("Set Record"); button9.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { button9ActionPerformed(e); } }); buttonBar.add(button9, cc.xy(2, 1)); //---- button10 ---- button10.setText("Save Record"); button10.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { button10ActionPerformed(e); } }); buttonBar.add(button10, cc.xy(4, 1)); //---- okButton ---- okButton.setText("OK"); okButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { okButtonActionPerformed(e); } }); buttonBar.add(okButton, cc.xy(6, 1)); } dialogPane.add(buttonBar, BorderLayout.SOUTH); } contentPane.add(dialogPane, BorderLayout.CENTER); setSize(635, 360); setLocationRelativeTo(getOwner()); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:org.archiviststoolkit.dialog.BatchLocationCreation.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(); HeaderPanel = new JPanel(); panel2 = new JPanel(); mainHeaderLabel = new JLabel(); panel3 = new JPanel(); subHeaderLabel = new JLabel(); panel1 = new JPanel(); contentPanel = new JPanel(); label1 = new JLabel(); building = new JTextField(); label2 = new JLabel(); floor = new JTextField(); label3 = new JLabel(); room = new JTextField(); label4 = new JLabel(); area = new JTextField(); label12 = new JLabel(); label13 = new JLabel(); label14 = new JLabel(); label5 = new JLabel(); coordinate1Label = new JTextField(); coordinate1Start = new JTextField(); label6 = new JLabel(); coordinate1End = new JTextField(); label7 = new JLabel(); coordinate2Label = new JTextField(); coordinate2Start = new JTextField(); label9 = new JLabel(); coordinate2End = new JTextField(); label8 = new JLabel(); coordinate3Label = new JTextField(); coordinate3Start = new JTextField(); label10 = new JLabel(); coordinate3End = new JTextField(); label11 = new JLabel(); repository = new JComboBox(new DefaultComboBoxModel(Repositories.getRepositoryList())); buttonBar = new JPanel(); generateButton = new JButton(); doneButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setModal(true);//from ww w . j a v a 2s. c o m Container contentPane = getContentPane(); contentPane.setLayout(new BorderLayout()); //======== dialogPane ======== { dialogPane.setBorder(null); dialogPane.setBackground(new Color(200, 205, 232)); dialogPane.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.TOP, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) })); //======== HeaderPanel ======== { HeaderPanel.setBackground(new Color(80, 69, 57)); HeaderPanel.setOpaque(false); HeaderPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); 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("default"))); //======== panel2 ======== { panel2.setBackground(new Color(80, 69, 57)); panel2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel2.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC })); //---- mainHeaderLabel ---- mainHeaderLabel.setText("Project Management"); mainHeaderLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 18)); mainHeaderLabel.setForeground(Color.white); panel2.add(mainHeaderLabel, cc.xy(2, 2)); } HeaderPanel.add(panel2, cc.xy(1, 1)); //======== panel3 ======== { panel3.setBackground(new Color(66, 60, 111)); panel3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel3.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.RELATED_GAP_COLSPEC }, new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC })); //---- subHeaderLabel ---- subHeaderLabel.setText("Batch Location Creation"); subHeaderLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 18)); subHeaderLabel.setForeground(Color.white); panel3.add(subHeaderLabel, cc.xy(2, 2)); } HeaderPanel.add(panel3, cc.xy(2, 1)); } dialogPane.add(HeaderPanel, cc.xy(1, 1)); //======== panel1 ======== { panel1.setOpaque(false); panel1.setBorder(Borders.DLU4_BORDER); panel1.setLayout(new FormLayout(ColumnSpec.decodeSpecs("default:grow"), new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //======== contentPanel ======== { contentPanel.setOpaque(false); contentPanel.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, 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[] { 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 })); //---- label1 ---- label1.setText("Building"); ATFieldInfo.assignLabelInfo(label1, Locations.class, Locations.PROPERTYNAME_BUILDING); contentPanel.add(label1, cc.xy(1, 1)); contentPanel.add(building, cc.xywh(3, 1, 9, 1)); //---- label2 ---- label2.setText("Floor"); ATFieldInfo.assignLabelInfo(label2, Locations.class, Locations.PROPERTYNAME_FLOOR); contentPanel.add(label2, cc.xy(1, 3)); contentPanel.add(floor, cc.xywh(3, 3, 9, 1)); //---- label3 ---- label3.setText("Room"); ATFieldInfo.assignLabelInfo(label3, Locations.class, Locations.PROPERTYNAME_ROOM); contentPanel.add(label3, cc.xy(1, 5)); contentPanel.add(room, cc.xywh(3, 5, 9, 1)); //---- label4 ---- label4.setText("Area"); ATFieldInfo.assignLabelInfo(label4, Locations.class, Locations.PROPERTYNAME_AREA); contentPanel.add(label4, cc.xy(1, 7)); contentPanel.add(area, cc.xywh(3, 7, 9, 1)); //---- label12 ---- label12.setText("Label"); contentPanel.add(label12, cc.xy(3, 9)); //---- label13 ---- label13.setText("Start"); contentPanel.add(label13, cc.xy(5, 9)); //---- label14 ---- label14.setText("End"); contentPanel.add(label14, cc.xy(9, 9)); //---- label5 ---- label5.setText("Coordinate 1"); contentPanel.add(label5, cc.xy(1, 11)); //---- coordinate1Label ---- coordinate1Label.setColumns(8); contentPanel.add(coordinate1Label, cc.xy(3, 11)); //---- coordinate1Start ---- coordinate1Start.setColumns(3); contentPanel.add(coordinate1Start, cc.xy(5, 11)); //---- label6 ---- label6.setText("-"); contentPanel.add(label6, cc.xy(7, 11)); //---- coordinate1End ---- coordinate1End.setColumns(3); contentPanel.add(coordinate1End, cc.xy(9, 11)); //---- label7 ---- label7.setText("Coordinate 2"); contentPanel.add(label7, cc.xy(1, 13)); //---- coordinate2Label ---- coordinate2Label.setColumns(8); contentPanel.add(coordinate2Label, cc.xy(3, 13)); //---- coordinate2Start ---- coordinate2Start.setColumns(3); contentPanel.add(coordinate2Start, cc.xy(5, 13)); //---- label9 ---- label9.setText("-"); contentPanel.add(label9, cc.xy(7, 13)); //---- coordinate2End ---- coordinate2End.setColumns(3); contentPanel.add(coordinate2End, cc.xy(9, 13)); //---- label8 ---- label8.setText("Coordinate 3"); contentPanel.add(label8, cc.xy(1, 15)); //---- coordinate3Label ---- coordinate3Label.setColumns(8); contentPanel.add(coordinate3Label, cc.xy(3, 15)); //---- coordinate3Start ---- coordinate3Start.setColumns(3); contentPanel.add(coordinate3Start, cc.xy(5, 15)); //---- label10 ---- label10.setText("-"); contentPanel.add(label10, cc.xy(7, 15)); //---- coordinate3End ---- coordinate3End.setColumns(3); contentPanel.add(coordinate3End, cc.xy(9, 15)); //---- label11 ---- label11.setText("Repository"); label11.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label11, Locations.class, Locations.PROPERTYNAME_REPOSITORY); contentPanel.add(label11, cc.xy(1, 17)); //---- repository ---- repository.setOpaque(false); repository.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); contentPanel.add(repository, cc.xywh(3, 17, 9, 1)); } panel1.add(contentPanel, cc.xy(1, 1)); //======== buttonBar ======== { buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER); buttonBar.setOpaque(false); buttonBar.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.GLUE_COLSPEC, FormFactory.BUTTON_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC }, RowSpec.decodeSpecs("pref"))); //---- generateButton ---- generateButton.setText("Generate"); generateButton.setOpaque(false); generateButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { generateButtonActionPerformed(e); } }); buttonBar.add(generateButton, cc.xy(2, 1)); //---- doneButton ---- doneButton.setText("Done"); doneButton.setOpaque(false); doneButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { doneButtonActionPerformed(e); } }); buttonBar.add(doneButton, cc.xy(4, 1)); } panel1.add(buttonBar, cc.xywh(1, 3, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); } dialogPane.add(panel1, cc.xy(1, 3)); } contentPane.add(dialogPane, BorderLayout.CENTER); pack(); setLocationRelativeTo(getOwner()); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:org.archiviststoolkit.dialog.DigitalObjectLookup.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(); HeaderPanel = new JPanel(); mainHeaderPanel = new JPanel(); mainHeaderLabel = new JLabel(); panel3 = new JPanel(); subHeaderLabel = new JLabel(); contentPane = new JPanel(); label3 = new JLabel(); label4 = new JLabel(); scrollPane1 = new JScrollPane(); lookupTable = new DomainSortableTable(); label1 = new JLabel(); filterField = new JTextField(); buttonBar = new JPanel(); linkButton = new JButton(); doneButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setModal(true);/*from w w w. j a va 2s.c om*/ setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent e) { thisWindowClosing(); } }); Container contentPane2 = getContentPane(); contentPane2.setLayout(new BorderLayout()); //======== dialogPane ======== { dialogPane.setBorder(null); dialogPane.setBackground(new Color(200, 205, 232)); dialogPane.setLayout(new BorderLayout()); //======== HeaderPanel ======== { HeaderPanel.setBackground(new Color(80, 69, 57)); HeaderPanel.setOpaque(false); HeaderPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); 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("default"))); //======== mainHeaderPanel ======== { mainHeaderPanel.setBackground(new Color(80, 35, 45)); 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) }, 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)); //======== panel3 ======== { panel3.setBackground(new Color(66, 60, 111)); panel3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel3.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.UNRELATED_GAP_COLSPEC }, new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC })); //---- subHeaderLabel ---- subHeaderLabel.setText("Lookup Digital Object"); subHeaderLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 18)); subHeaderLabel.setForeground(Color.white); panel3.add(subHeaderLabel, cc.xy(2, 2)); } HeaderPanel.add(panel3, cc.xy(2, 1)); } dialogPane.add(HeaderPanel, BorderLayout.NORTH); //======== contentPane ======== { contentPane.setBackground(new Color(231, 188, 251)); contentPane.setOpaque(false); contentPane .setLayout( new FormLayout( new ColumnSpec[] { FormFactory.UNRELATED_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.UNRELATED_GAP_COLSPEC }, new RowSpec[] { FormFactory.UNRELATED_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, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.UNRELATED_GAP_ROWSPEC })); //---- label3 ---- label3.setText("Double click on a Digital Object to select it."); contentPane.add(label3, cc.xywh(2, 2, 3, 1)); //---- label4 ---- label4.setText("Or hit enter if a Digital Object is highlighted."); contentPane.add(label4, cc.xywh(2, 4, 3, 1)); //======== scrollPane1 ======== { scrollPane1.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); //---- lookupTable ---- lookupTable.setPreferredScrollableViewportSize(new Dimension(450, 300)); lookupTable.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { lookupTableMouseClicked(e); } }); lookupTable.addKeyListener(new KeyAdapter() { @Override public void keyTyped(KeyEvent e) { lookupTableKeyTyped(e); } }); scrollPane1.setViewportView(lookupTable); } contentPane.add(scrollPane1, cc.xywh(2, 6, 3, 1)); //---- label1 ---- label1.setText("Filter:"); contentPane.add(label1, cc.xy(2, 8)); contentPane.add(filterField, cc.xy(4, 8)); //======== buttonBar ======== { buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER); buttonBar.setBackground(new Color(231, 188, 251)); buttonBar.setOpaque(false); buttonBar .setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC }, RowSpec.decodeSpecs("pref"))); //---- linkButton ---- linkButton.setText("Link"); linkButton.setOpaque(false); linkButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { linkButtonActionPerformed(); } }); buttonBar.add(linkButton, cc.xy(3, 1)); //---- doneButton ---- doneButton.setText("Close Window"); doneButton.setOpaque(false); doneButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { doneButtonActionPerformed(e); } }); buttonBar.add(doneButton, cc.xy(7, 1)); } contentPane.add(buttonBar, cc.xywh(2, 10, 3, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); } dialogPane.add(contentPane, BorderLayout.CENTER); } contentPane2.add(dialogPane, BorderLayout.CENTER); pack(); setLocationRelativeTo(getOwner()); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:org.archiviststoolkit.dialog.LocationAssignmentAccessions.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(); HeaderPanel = new JPanel(); mainHeaderPanel = new JPanel(); mainHeaderLabel = new JLabel(); panel3 = new JPanel(); subHeaderLabel = new JLabel(); contentPane = new JPanel(); label1 = new JLabel(); filterField = new JTextField(); scrollPane1 = new JScrollPane(); locationLookupTable = new DomainSortableTable(Locations.class, filterField); linkingPanel = new JPanel(); label3 = new JLabel(); label4 = new JLabel(); noteContainerLabel = new JTextField(); note = new JTextField(); buttonBar = new JPanel(); linkLocationButton = new JButton(); createLocationButton = new JButton(); doneButton = new JButton(); selectPanel = new JPanel(); buttonBar2 = new JPanel(); selectButton = new JButton(); cancelButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setModal(true);// ww w . j a v a 2 s . com Container contentPane2 = getContentPane(); contentPane2.setLayout(new BorderLayout()); //======== dialogPane ======== { dialogPane.setBorder(null); dialogPane.setBackground(new Color(200, 205, 232)); dialogPane.setLayout(new BorderLayout()); //======== HeaderPanel ======== { HeaderPanel.setBackground(new Color(80, 69, 57)); HeaderPanel.setOpaque(false); HeaderPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); 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("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) }, 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)); //======== panel3 ======== { panel3.setBackground(new Color(66, 60, 111)); panel3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel3.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC })); //---- subHeaderLabel ---- subHeaderLabel.setText("Location Lookup"); subHeaderLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 18)); subHeaderLabel.setForeground(Color.white); panel3.add(subHeaderLabel, cc.xy(2, 2)); } HeaderPanel.add(panel3, cc.xy(2, 1)); } dialogPane.add(HeaderPanel, BorderLayout.NORTH); //======== contentPane ======== { contentPane.setBackground(new Color(231, 188, 251)); contentPane.setOpaque(false); contentPane .setLayout( new FormLayout( new ColumnSpec[] { FormFactory.UNRELATED_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.UNRELATED_GAP_COLSPEC }, new RowSpec[] { FormFactory.UNRELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, 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.UNRELATED_GAP_ROWSPEC })); //---- label1 ---- label1.setText("Filter:"); contentPane.add(label1, cc.xy(2, 2)); contentPane.add(filterField, cc.xy(4, 2)); //======== scrollPane1 ======== { scrollPane1.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); //---- locationLookupTable ---- locationLookupTable.setPreferredScrollableViewportSize(new Dimension(450, 300)); locationLookupTable.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { subjectLookupTableMouseClicked(e); } }); locationLookupTable.addKeyListener(new KeyAdapter() { @Override public void keyTyped(KeyEvent e) { locationLookupTableKeyTyped(e); } }); scrollPane1.setViewportView(locationLookupTable); } contentPane.add(scrollPane1, cc.xywh(2, 4, 3, 1)); //======== linkingPanel ======== { linkingPanel.setOpaque(false); linkingPanel.setLayout(new FormLayout(ColumnSpec.decodeSpecs("default:grow"), new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_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 })); //---- label3 ---- label3.setText("Double click on a Location to add it to the record."); linkingPanel.add(label3, cc.xy(1, 1)); //---- label4 ---- label4.setText("Or hit enter if a Location is highlighted."); linkingPanel.add(label4, cc.xy(1, 3)); //---- noteContainerLabel ---- noteContainerLabel.setText("Note/Container information"); noteContainerLabel.setOpaque(false); noteContainerLabel.setBorder(null); linkingPanel.add(noteContainerLabel, cc.xy(1, 5)); linkingPanel.add(note, cc.xy(1, 7)); //======== buttonBar ======== { buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER); buttonBar.setBackground(new Color(231, 188, 251)); buttonBar.setOpaque(false); buttonBar.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC }, RowSpec.decodeSpecs("pref"))); //---- linkLocationButton ---- linkLocationButton.setText("Link"); linkLocationButton.setOpaque(false); linkLocationButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { linkLocationButtonActionPerformed(); } }); buttonBar.add(linkLocationButton, cc.xy(1, 1)); //---- createLocationButton ---- createLocationButton.setText("Create Location"); createLocationButton.setBackground(new Color(231, 188, 251)); createLocationButton.setOpaque(false); createLocationButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { createLocationButtonActionPerformed(e); } }); buttonBar.add(createLocationButton, cc.xy(3, 1)); //---- doneButton ---- doneButton.setText("Close Window"); doneButton.setBackground(new Color(231, 188, 251)); doneButton.setOpaque(false); doneButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { doneButtonActionPerformed(e); } }); buttonBar.add(doneButton, cc.xy(5, 1)); } linkingPanel.add(buttonBar, cc.xywh(1, 9, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); } contentPane.add(linkingPanel, cc.xywh(2, 6, 3, 1)); //======== selectPanel ======== { selectPanel.setOpaque(false); selectPanel.setLayout(new FormLayout("default:grow", "default")); //======== buttonBar2 ======== { buttonBar2.setBorder(Borders.BUTTON_BAR_GAP_BORDER); buttonBar2.setBackground(new Color(231, 188, 251)); buttonBar2.setOpaque(false); buttonBar2 .setLayout(new FormLayout( new ColumnSpec[] { FormFactory.BUTTON_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC }, RowSpec.decodeSpecs("pref"))); //---- selectButton ---- selectButton.setText("Select"); selectButton.setOpaque(false); selectButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { selectButtonActionPerformed(); } }); buttonBar2.add(selectButton, cc.xy(1, 1)); //---- cancelButton ---- cancelButton.setText("Cancel"); cancelButton.setOpaque(false); cancelButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { doneButtonActionPerformed(e); } }); buttonBar2.add(cancelButton, cc.xy(3, 1)); } selectPanel.add(buttonBar2, cc.xywh(1, 1, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); } contentPane.add(selectPanel, cc.xywh(2, 8, 3, 1)); } dialogPane.add(contentPane, BorderLayout.CENTER); } contentPane2.add(dialogPane, BorderLayout.CENTER); pack(); setLocationRelativeTo(getOwner()); // JFormDesigner - End of component initialization //GEN-END:initComponents }