List of usage examples for com.jgoodies.forms.layout Sizes bounded
public static Size bounded(Size basis, Size lowerBound, Size upperBound)
From source file:org.archiviststoolkit.dialog.AssessmentManagement.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(); contentPanel = new JPanel(); panel1 = new JPanel(); label2 = new JLabel(); filterField = new JTextField(); scrollPane1 = new JScrollPane(); contentTable = new DomainSortableTable(AssessmentsSearchResult.class, filterField); buttonBar = new JPanel(); button1 = new JButton(); button2 = new JButton(); reportsButton = new JButton(); addRecordButton = new JButton(); removeRecordButton = new JButton(); doneButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setModal(true);//from w w w.ja va 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 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"))); //======== 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("Administration"); 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) }, new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC })); //---- subHeaderLabel ---- subHeaderLabel.setText("Assessment"); 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); //======== contentPanel ======== { contentPanel.setOpaque(false); contentPanel .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.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.UNRELATED_GAP_ROWSPEC })); //======== 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) }, RowSpec.decodeSpecs("default"))); //---- label2 ---- label2.setText("Filter:"); panel1.add(label2, cc.xy(1, 1)); panel1.add(filterField, cc.xy(3, 1)); } contentPanel.add(panel1, cc.xy(2, 2)); //======== scrollPane1 ======== { //---- contentTable ---- contentTable.setPreferredScrollableViewportSize(new Dimension(800, 400)); contentTable.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { contentTableMouseClicked(e); } }); scrollPane1.setViewportView(contentTable); } contentPanel.add(scrollPane1, cc.xy(2, 4)); //======== 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.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.GLUE_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC }, RowSpec.decodeSpecs("pref"))); //---- button1 ---- button1.setText("Search"); button1.setOpaque(false); button1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { searchActionPerformed(); } }); buttonBar.add(button1, cc.xy(2, 1)); //---- button2 ---- button2.setText("List All"); button2.setSelectedIcon(null); button2.setOpaque(false); button2.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { refreshActionPerformed(); } }); buttonBar.add(button2, cc.xy(4, 1)); //---- reportsButton ---- reportsButton.setText("Reports"); reportsButton.setOpaque(false); reportsButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { reportButtonActionPerformed(e); } }); buttonBar.add(reportsButton, cc.xy(6, 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(8, 1)); //---- removeRecordButton ---- removeRecordButton.setText("Remove Record"); removeRecordButton.setOpaque(false); removeRecordButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { removeRecordButtonActionPerformed(e); } }); buttonBar.add(removeRecordButton, cc.xy(10, 1)); //---- doneButton ---- doneButton.setText("Done"); doneButton.setOpaque(false); doneButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { doneButtonActionPerformed(e); } }); buttonBar.add(doneButton, cc.xy(14, 1)); } contentPanel.add(buttonBar, cc.xy(2, 6)); } 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.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 w w w . j a v a2s . co 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 ww .ja v 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 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);/*from w w w .j ava2 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 }
From source file:org.archiviststoolkit.dialog.LocationAssignmentResources.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(); contentPane = new JPanel(); label3 = new JLabel(); scrollPane1 = new JScrollPane(); containerList = new JList(); separator5 = new JSeparator(); label1 = new JLabel(); panel1 = new JPanel(); label2 = new JLabel(); filterField = new JTextField(); scrollPane2 = new JScrollPane(); locationLookupTable = new DomainSortableTable(Locations.class, filterField); buttonBar = new JPanel(); assignLocation = new JButton(); removeAssignedLocationButton = new JButton(); createLocationButton = new JButton(); doneButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setModal(true);/*from w w w.jav a 2 s. c o m*/ Container contentPane2 = getContentPane(); contentPane2.setLayout(new BorderLayout()); //======== dialogPane ======== { dialogPane.setBorder(null); dialogPane.setBackground(new Color(200, 205, 232)); dialogPane.setMinimumSize(new Dimension(640, 836)); 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"))); //======== panel2 ======== { panel2.setBackground(new Color(73, 43, 104)); 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("Resources"); 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) }, new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC })); //---- subHeaderLabel ---- subHeaderLabel.setText("Assign Locations"); 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.setMinimumSize(new Dimension(600, 600)); contentPane.setOpaque(false); contentPane .setLayout( new FormLayout( new ColumnSpec[] { FormFactory.UNRELATED_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.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.UNRELATED_GAP_ROWSPEC })); //---- label3 ---- label3.setText("Containers"); contentPane.add(label3, cc.xy(2, 2)); //======== scrollPane1 ======== { scrollPane1.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane1.setPreferredSize(new Dimension(600, 300)); //---- containerList ---- containerList.setVisibleRowCount(20); scrollPane1.setViewportView(containerList); } contentPane.add(scrollPane1, cc.xy(2, 4)); //---- separator5 ---- separator5.setBackground(new Color(220, 220, 232)); separator5.setForeground(new Color(147, 131, 86)); separator5.setMinimumSize(new Dimension(1, 10)); separator5.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); contentPane.add(separator5, cc.xywh(1, 6, 3, 1)); //---- label1 ---- label1.setText("Locations"); contentPane.add(label1, cc.xy(2, 7)); //======== 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) }, RowSpec.decodeSpecs("default"))); //---- label2 ---- label2.setText("Filter:"); panel1.add(label2, cc.xy(1, 1)); panel1.add(filterField, cc.xy(3, 1)); } contentPane.add(panel1, cc.xy(2, 9)); //======== scrollPane2 ======== { scrollPane2.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane2.setPreferredSize(new Dimension(600, 300)); //---- locationLookupTable ---- locationLookupTable.setPreferredScrollableViewportSize(new Dimension(450, 300)); scrollPane2.setViewportView(locationLookupTable); } contentPane.add(scrollPane2, cc.xy(2, 11)); //======== 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.GLUE_COLSPEC, FormFactory.BUTTON_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC }, RowSpec.decodeSpecs("pref"))); //---- assignLocation ---- assignLocation.setText("Add Location Link"); assignLocation.setBackground(new Color(231, 188, 251)); assignLocation.setOpaque(false); assignLocation.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { assignLocationButtonActionPerformed(e); } }); buttonBar.add(assignLocation, cc.xy(2, 1)); //---- removeAssignedLocationButton ---- removeAssignedLocationButton.setText("Remove Location Link"); removeAssignedLocationButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { removeAssignedLocationButtonActionPerformed(e); } }); buttonBar.add(removeAssignedLocationButton, cc.xy(4, 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(6, 1)); //---- doneButton ---- doneButton.setText("Done"); 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(8, 1)); } contentPane.add(buttonBar, cc.xywh(1, 13, 3, 1, CellConstraints.CENTER, 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.LocationManagement.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(); contentPanel = new JPanel(); panel1 = new JPanel(); label2 = new JLabel(); filterField = new JTextField(); scrollPane1 = new JScrollPane(); contentTable = new DomainSortableTable(Locations.class, filterField); buttonBar = new JPanel(); reportsButton = new JButton(); batchAddButton = new JButton(); addRecordButton = new JButton(); removeRecordButton = new JButton(); doneButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setModal(true);/*from w w w . j a v a2s .com*/ Container contentPane = getContentPane(); contentPane.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"))); //======== 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("Administration"); 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) }, new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC })); //---- subHeaderLabel ---- subHeaderLabel.setText("Location Management"); 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); //======== contentPanel ======== { contentPanel.setOpaque(false); contentPanel .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.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.UNRELATED_GAP_ROWSPEC })); //======== 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) }, RowSpec.decodeSpecs("default"))); //---- label2 ---- label2.setText("Filter:"); panel1.add(label2, cc.xy(1, 1)); panel1.add(filterField, cc.xy(3, 1)); } contentPanel.add(panel1, cc.xy(2, 2)); //======== scrollPane1 ======== { //---- contentTable ---- contentTable.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { contentTableMouseClicked(e); } }); scrollPane1.setViewportView(contentTable); } contentPanel.add(scrollPane1, cc.xy(2, 4)); //======== 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.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.UNRELATED_GAP_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC }, RowSpec.decodeSpecs("pref"))); //---- reportsButton ---- reportsButton.setText("Reports"); reportsButton.setOpaque(false); reportsButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { reportButtonActionPerformed(e); } }); buttonBar.add(reportsButton, cc.xy(2, 1)); //---- batchAddButton ---- batchAddButton.setText("Batch Add"); batchAddButton.setOpaque(false); batchAddButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { batchAddButtonActionPerformed(e); } }); buttonBar.add(batchAddButton, cc.xy(6, 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(8, 1)); //---- removeRecordButton ---- removeRecordButton.setText("Remove Record"); removeRecordButton.setOpaque(false); removeRecordButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { removeRecordButtonActionPerformed(e); } }); buttonBar.add(removeRecordButton, cc.xy(10, 1)); //---- doneButton ---- doneButton.setText("Done"); doneButton.setOpaque(false); doneButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { doneButtonActionPerformed(e); } }); buttonBar.add(doneButton, cc.xy(14, 1)); } contentPanel.add(buttonBar, cc.xy(2, 6)); } 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.NameAuthorityLookup.java
License:Open Source License
private void initComponents() { setModal(true);// ww w . j av a 2 s . c o m // 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(); nameLookup = new JTextField(); scrollPane1 = new JScrollPane(); namesLookupTable = new DomainSortableTable(Names.class, nameLookup); linkingPanel = new JPanel(); label4 = new JLabel(); label3 = new JLabel(); label_function = new JLabel(); function = new JComboBox(); label_role = new JLabel(); role = new JComboBox(); label_form = new JLabel(); form = new JComboBox(); buttonBarLinking = new JPanel(); linkButton = new JButton(); createName = new JButton(); doneButton = new JButton(); selectPanel = new JPanel(); selectButton = new JButton(); doneButton2 = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== 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("Name 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.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(nameLookup, cc.xy(4, 2)); //======== scrollPane1 ======== { scrollPane1.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); //---- namesLookupTable ---- namesLookupTable.setPreferredScrollableViewportSize(new Dimension(450, 300)); namesLookupTable.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { namesLookupTableMouseClicked(e); } }); namesLookupTable.addKeyListener(new KeyAdapter() { @Override public void keyTyped(KeyEvent e) { namesLookupTableKeyTyped(e); } }); scrollPane1.setViewportView(namesLookupTable); } contentPane.add(scrollPane1, cc.xywh(2, 4, 3, 1)); //======== linkingPanel ======== { linkingPanel.setOpaque(false); linkingPanel .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 })); //---- label4 ---- label4.setText("Double click on a Name to add it to the record."); linkingPanel.add(label4, cc.xywh(1, 1, 3, 1)); //---- label3 ---- label3.setText("Or hit enter if a Term is highlighted."); linkingPanel.add(label3, cc.xywh(1, 3, 3, 1)); //---- label_function ---- label_function.setText("Function"); linkingPanel.add(label_function, cc.xy(1, 5)); //---- function ---- function.setOpaque(false); function.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { functionActionPerformed(e); } }); linkingPanel.add(function, cc.xywh(3, 5, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //---- label_role ---- label_role.setText("Role"); linkingPanel.add(label_role, cc.xy(1, 7)); //---- role ---- role.setOpaque(false); linkingPanel.add(role, cc.xywh(3, 7, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //---- label_form ---- label_form.setText("Form Subdivision"); linkingPanel.add(label_form, cc.xy(1, 9)); //---- form ---- form.setOpaque(false); linkingPanel.add(form, cc.xywh(3, 9, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //======== buttonBarLinking ======== { buttonBarLinking.setBorder(Borders.BUTTON_BAR_GAP_BORDER); buttonBarLinking.setBackground(new Color(231, 188, 251)); buttonBarLinking.setOpaque(false); buttonBarLinking.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"))); //---- linkButton ---- linkButton.setText("Link"); linkButton.setOpaque(false); linkButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { linkButtonActionPerformed(); } }); buttonBarLinking.add(linkButton, cc.xy(1, 1)); //---- createName ---- createName.setText("Create Name"); createName.setBackground(new Color(231, 188, 251)); createName.setOpaque(false); createName.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { createNameActionPerformed(e); } }); buttonBarLinking.add(createName, 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); } }); buttonBarLinking.add(doneButton, cc.xy(5, 1)); } linkingPanel.add(buttonBarLinking, cc.xywh(1, 11, 3, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); } contentPane.add(linkingPanel, cc.xywh(2, 6, 3, 1)); //======== selectPanel ======== { selectPanel.setBorder(Borders.BUTTON_BAR_GAP_BORDER); selectPanel.setBackground(new Color(231, 188, 251)); selectPanel.setOpaque(false); selectPanel .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"))); //---- selectButton ---- selectButton.setText("Select"); selectButton.setOpaque(false); selectButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { selectButtonActionPerformed(); } }); selectPanel.add(selectButton, cc.xy(3, 1)); //---- doneButton2 ---- doneButton2.setText("Cancel"); doneButton2.setBackground(new Color(231, 188, 251)); doneButton2.setOpaque(false); doneButton2.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { doneButtonActionPerformed(e); } }); selectPanel.add(doneButton2, cc.xy(5, 1)); } contentPane.add(selectPanel, cc.xywh(1, 8, 4, 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.QueryEditor.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(); subHeaderPanel = new JPanel(); subHeaderLabel = new JLabel(); tabbedPane1 = new JTabbedPane(); panel1 = new JPanel(); searchEditorLabel = new JLabel(); contentPane = new JPanel(); fieldSelector1 = new JComboBox(); placeHolder1 = new QueryEditorTextPanel(); boolean1 = new JComboBox(); fieldSelector2 = new JComboBox(); placeHolder2 = new QueryEditorTextPanel(); includeComponents = new JCheckBox(); buttonBar2 = new JPanel(); cancelButton2 = new JButton(); queryButton = new JButton(); classSpecificPanel = new JPanel(); altQueryLabel = new JLabel(); panel2 = new JPanel(); label1 = new JLabel(); sortName = new JTextField(); lookupName = new JButton(); clearName = new JButton(); label2 = new JLabel(); function = ATBasicComponentFactory.createUnboundComboBox(LookupListUtils.getLookupListValues( ArchDescriptionNames.class, ArchDescriptionNames.PROPERTYNAME_NAME_LINK_FUNCTION)); label5 = new JLabel(); subject = new JTextField(); lookupSubject = new JButton(); clearSubject = new JButton(); label6 = new JLabel(); location = new JTextField(); lookupLocation = new JButton(); clearLocation = new JButton(); resourceLabel = new JLabel(); resource = new JTextField(); lookupResource = new JButton(); clearResource = new JButton(); fileLabel = new JLabel(); fileURI = new JTextField(); panel3 = new JPanel(); label8 = new JLabel(); deaccessionDateStart = ATBasicComponentFactory.createUnboundDateField(); label3 = new JLabel(); deaccessionDateEnd = ATBasicComponentFactory.createUnboundDateField(); panel4 = new JPanel(); identifierLabel = new JLabel(); bucket1 = new JTextField(); bucket2 = new JTextField(); bucket3 = new JTextField(); bucket4 = new JTextField(); resourceOnlyPanel = new JPanel(); label9 = new JLabel(); noteText = new JTextField(); label7 = new JLabel(); instanceType = ATBasicComponentFactory.createUnboundComboBox(LookupListUtils.getLookupListValues( ArchDescriptionInstances.class, ArchDescriptionInstances.PROPERTYNAME_INSTANCE_TYPE)); includeComponentsRelatedSearch = new JCheckBox(); buttonBar = new JPanel(); cancelButton = new JButton(); queryButton2 = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setModal(true);// w w w .j a v a 2s . c o m setDefaultCloseOperation(WindowConstants.DISPOSE_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.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)); //======== subHeaderPanel ======== { subHeaderPanel.setBackground(new Color(66, 60, 111)); subHeaderPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); subHeaderPanel .setLayout( new FormLayout( new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC })); //---- subHeaderLabel ---- subHeaderLabel.setText("Search Editor"); subHeaderLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 18)); subHeaderLabel.setForeground(Color.white); subHeaderPanel.add(subHeaderLabel, cc.xy(2, 2)); } HeaderPanel.add(subHeaderPanel, cc.xy(2, 1)); } dialogPane.add(HeaderPanel, BorderLayout.NORTH); //======== tabbedPane1 ======== { //======== panel1 ======== { panel1.setBorder(Borders.DIALOG_BORDER); panel1.setOpaque(false); panel1.setLayout(new FormLayout(ColumnSpec.decodeSpecs("default:grow"), new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.CENTER, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) })); //---- searchEditorLabel ---- searchEditorLabel.setText("Search editor"); panel1.add(searchEditorLabel, cc.xy(1, 1)); //======== contentPane ======== { contentPane.setBackground(new Color(231, 188, 251)); contentPane.setOpaque(false); contentPane.setBorder(Borders.DIALOG_BORDER); contentPane .setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec("400px:grow"), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.LEFT, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //---- fieldSelector1 ---- fieldSelector1.setOpaque(false); fieldSelector1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { fieldSelector1ActionPerformed(e); } }); contentPane.add(fieldSelector1, cc.xy(1, 1)); //---- placeHolder1 ---- placeHolder1.setOpaque(false); contentPane.add(placeHolder1, cc.xy(3, 1)); //---- boolean1 ---- boolean1.setModel(new DefaultComboBoxModel(new String[] { "and", "or" })); boolean1.setOpaque(false); contentPane.add(boolean1, cc.xy(5, 1)); //---- fieldSelector2 ---- fieldSelector2.setOpaque(false); fieldSelector2.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { fieldSelector2ActionPerformed(e); } }); contentPane.add(fieldSelector2, cc.xy(1, 2)); //---- placeHolder2 ---- placeHolder2.setOpaque(false); contentPane.add(placeHolder2, cc.xy(3, 2)); //---- includeComponents ---- includeComponents.setText("Include components in search"); includeComponents.setOpaque(false); includeComponents.setSelected(true); includeComponents.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { includeComponentsActionPerformed(); } }); contentPane.add(includeComponents, cc.xywh(1, 4, 5, 1)); //======== 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.GLUE_COLSPEC, FormFactory.BUTTON_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC }, RowSpec.decodeSpecs("pref"))); //---- cancelButton2 ---- cancelButton2.setText("Cancel"); cancelButton2.setOpaque(false); cancelButton2.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { cancelButtonActionPerformed(e); } }); buttonBar2.add(cancelButton2, cc.xy(2, 1)); //---- queryButton ---- queryButton.setText("Search"); queryButton.setOpaque(false); queryButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { queryButtonActionPerformed(e); } }); buttonBar2.add(queryButton, cc.xy(4, 1)); } contentPane.add(buttonBar2, cc.xywh(1, 6, 5, 1)); } panel1.add(contentPane, cc.xy(1, 3)); } tabbedPane1.addTab("Search", panel1); //======== classSpecificPanel ======== { classSpecificPanel.setOpaque(false); classSpecificPanel.setBorder(Borders.DIALOG_BORDER); classSpecificPanel.setLayout(new FormLayout(ColumnSpec.decodeSpecs("default:grow"), new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //---- altQueryLabel ---- altQueryLabel.setText("Search by linked record:"); classSpecificPanel.add(altQueryLabel, cc.xy(1, 1)); //======== panel2 ======== { panel2.setOpaque(false); panel2.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, 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("Find by name"); panel2.add(label1, cc.xy(1, 1)); //---- sortName ---- sortName.setEditable(false); sortName.setOpaque(false); panel2.add(sortName, cc.xy(3, 1)); //---- lookupName ---- lookupName.setText("Lookup"); lookupName.setFont(new Font("Lucida Grande", Font.PLAIN, 10)); lookupName.setOpaque(false); lookupName.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { lookupNameActionPerformed(); } }); panel2.add(lookupName, cc.xy(5, 1)); //---- clearName ---- clearName.setText("Clear"); clearName.setFont(new Font("Lucida Grande", Font.PLAIN, 10)); clearName.setOpaque(false); clearName.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { clearNameActionPerformed(); } }); panel2.add(clearName, cc.xy(7, 1)); //---- label2 ---- label2.setText("Function"); panel2.add(label2, cc.xy(9, 1)); //---- function ---- function.setOpaque(false); panel2.add(function, cc.xywh(11, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //---- label5 ---- label5.setText("Find by subject"); panel2.add(label5, cc.xy(1, 3)); //---- subject ---- subject.setEditable(false); subject.setOpaque(false); panel2.add(subject, cc.xy(3, 3)); //---- lookupSubject ---- lookupSubject.setText("Lookup"); lookupSubject.setFont(new Font("Lucida Grande", Font.PLAIN, 10)); lookupSubject.setOpaque(false); lookupSubject.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { lookupSubjectActionPerformed(); } }); panel2.add(lookupSubject, cc.xy(5, 3)); //---- clearSubject ---- clearSubject.setText("Clear"); clearSubject.setFont(new Font("Lucida Grande", Font.PLAIN, 10)); clearSubject.setOpaque(false); clearSubject.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { clearSubjectActionPerformed(); } }); panel2.add(clearSubject, cc.xy(7, 3)); //---- label6 ---- label6.setText("Find by location"); panel2.add(label6, cc.xy(1, 5)); //---- location ---- location.setEditable(false); location.setOpaque(false); panel2.add(location, cc.xy(3, 5)); //---- lookupLocation ---- lookupLocation.setText("Lookup"); lookupLocation.setFont(new Font("Lucida Grande", Font.PLAIN, 10)); lookupLocation.setOpaque(false); lookupLocation.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { lookupLocationActionPerformed(); } }); panel2.add(lookupLocation, cc.xy(5, 5)); //---- clearLocation ---- clearLocation.setText("Clear"); clearLocation.setFont(new Font("Lucida Grande", Font.PLAIN, 10)); clearLocation.setOpaque(false); clearLocation.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { clearLocationActionPerformed(); } }); panel2.add(clearLocation, cc.xy(7, 5)); //---- resourceLabel ---- resourceLabel.setText("Find by resource"); panel2.add(resourceLabel, cc.xy(1, 7)); //---- resource ---- resource.setEditable(false); resource.setOpaque(false); panel2.add(resource, cc.xy(3, 7)); //---- lookupResource ---- lookupResource.setText("Lookup"); lookupResource.setFont(new Font("Lucida Grande", Font.PLAIN, 10)); lookupResource.setOpaque(false); lookupResource.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { lookupResourceActionPerformed(); } }); panel2.add(lookupResource, cc.xy(5, 7)); //---- clearResource ---- clearResource.setText("Clear"); clearResource.setFont(new Font("Lucida Grande", Font.PLAIN, 10)); clearResource.setOpaque(false); clearResource.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { clearResourceActionPerformed(); } }); panel2.add(clearResource, cc.xy(7, 7)); //---- fileLabel ---- fileLabel.setText("Find by file URI"); panel2.add(fileLabel, cc.xy(1, 9)); panel2.add(fileURI, cc.xywh(3, 9, 5, 1)); //======== panel3 ======== { panel3.setOpaque(false); panel3.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 }, RowSpec.decodeSpecs("default"))); //---- label8 ---- label8.setText("Find by deaccession date"); panel3.add(label8, cc.xy(1, 1)); //---- deaccessionDateStart ---- deaccessionDateStart.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); deaccessionDateStart.setColumns(12); panel3.add(deaccessionDateStart, cc.xywh(3, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //---- label3 ---- label3.setText("-"); panel3.add(label3, cc.xy(5, 1)); //---- deaccessionDateEnd ---- deaccessionDateEnd.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); deaccessionDateEnd.setColumns(12); deaccessionDateEnd.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { deaccessionDateEndFocusGained(); } }); panel3.add(deaccessionDateEnd, cc.xywh(7, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); } panel2.add(panel3, cc.xywh(1, 13, 11, 1)); //======== panel4 ======== { panel4.setOpaque(false); panel4.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, 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) panel4.getLayout()).setColumnGroups(new int[][] { { 3, 5, 7, 9 } }); //---- identifierLabel ---- identifierLabel.setText("identifier"); panel4.add(identifierLabel, cc.xy(1, 1)); panel4.add(bucket1, cc.xy(3, 1)); panel4.add(bucket2, cc.xy(5, 1)); panel4.add(bucket3, cc.xy(7, 1)); panel4.add(bucket4, cc.xy(9, 1)); } panel2.add(panel4, cc.xywh(1, 15, 11, 1)); //======== resourceOnlyPanel ======== { resourceOnlyPanel.setOpaque(false); resourceOnlyPanel.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //---- label9 ---- label9.setText("Find by note text"); resourceOnlyPanel.add(label9, cc.xy(1, 1)); resourceOnlyPanel.add(noteText, cc.xy(3, 1)); //---- label7 ---- label7.setText("Find by instance type"); resourceOnlyPanel.add(label7, cc.xy(1, 2)); //---- instanceType ---- instanceType.setOpaque(false); instanceType.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { instanceTypeActionPerformed(); } }); resourceOnlyPanel.add(instanceType, cc.xywh(3, 2, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //---- includeComponentsRelatedSearch ---- includeComponentsRelatedSearch.setText("Include components in search"); includeComponentsRelatedSearch.setOpaque(false); includeComponentsRelatedSearch.setSelected(true); resourceOnlyPanel.add(includeComponentsRelatedSearch, cc.xywh(1, 4, 11, 1)); } panel2.add(resourceOnlyPanel, cc.xywh(1, 17, 11, 1)); } classSpecificPanel.add(panel2, cc.xy(1, 3)); //======== 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.GLUE_COLSPEC, FormFactory.BUTTON_COLSPEC, FormFactory.RELATED_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(2, 1)); //---- queryButton2 ---- queryButton2.setText("Search"); queryButton2.setOpaque(false); queryButton2.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { queryButton2ActionPerformed(e); } }); buttonBar.add(queryButton2, cc.xy(4, 1)); } classSpecificPanel.add(buttonBar, cc.xy(1, 5)); } tabbedPane1.addTab("Search By Linked Record", classSpecificPanel); } dialogPane.add(tabbedPane1, BorderLayout.SOUTH); } contentPane2.add(dialogPane, BorderLayout.CENTER); pack(); setLocationRelativeTo(getOwner()); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:org.archiviststoolkit.dialog.ReportDialog.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(); subHeaderPanel = new JPanel(); subHeaderLabel = new JLabel(); mainPanel = new JPanel(); buttonBar = new JPanel(); openReportFileButton = new JButton(); cancelButton = new JButton(); previewButton = new JButton(); printButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setModal(true);//from w w w . j av a 2s . c om Container contentPane = getContentPane(); contentPane.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.setPreferredSize(new Dimension(300, 30)); HeaderPanel .setLayout( new FormLayout( new ColumnSpec[] { new ColumnSpec(Sizes.bounded(Sizes.MINIMUM, Sizes.dluX(100), Sizes.dluX(200))), new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, RowSpec.decodeSpecs("fill:default"))); //======== mainHeaderPanel ======== { mainHeaderPanel.setBackground(new Color(80, 69, 57)); mainHeaderPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); mainHeaderPanel.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC })); //---- mainHeaderLabel ---- mainHeaderLabel.setText("Main Header"); mainHeaderLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 18)); mainHeaderLabel.setForeground(Color.white); mainHeaderPanel.add(mainHeaderLabel, cc.xy(2, 2)); } HeaderPanel.add(mainHeaderPanel, cc.xy(1, 1)); //======== subHeaderPanel ======== { subHeaderPanel.setBackground(new Color(66, 60, 111)); subHeaderPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); subHeaderPanel .setLayout( new FormLayout( new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC })); //---- subHeaderLabel ---- subHeaderLabel.setText("Reports"); subHeaderLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 18)); subHeaderLabel.setForeground(Color.white); subHeaderPanel.add(subHeaderLabel, cc.xy(2, 2)); } HeaderPanel.add(subHeaderPanel, cc.xy(2, 1)); } dialogPane.add(HeaderPanel, BorderLayout.NORTH); //======== mainPanel ======== { mainPanel.setOpaque(false); mainPanel.setBorder(Borders.DIALOG_BORDER); mainPanel.setLayout(new BorderLayout()); //======== 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.GLUE_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC }, RowSpec.decodeSpecs("pref"))); //---- openReportFileButton ---- openReportFileButton.setText("Load Report Definition File"); openReportFileButton.setOpaque(false); openReportFileButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { openReportFileButtonActionPerformed(); } }); buttonBar.add(openReportFileButton, cc.xy(4, 1)); //---- cancelButton ---- cancelButton.setText("Cancel"); cancelButton.setOpaque(false); cancelButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { cancelButtonActionPerformed(); } }); buttonBar.add(cancelButton, cc.xy(6, 1)); //---- previewButton ---- previewButton.setText("Preview"); previewButton.setOpaque(false); previewButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { previewButtonActionPerformed(); } }); buttonBar.add(previewButton, cc.xy(8, 1)); //---- printButton ---- printButton.setText("Print"); printButton.setOpaque(false); printButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { printButtonActionPerformed(); } }); buttonBar.add(printButton, cc.xy(10, 1)); } mainPanel.add(buttonBar, BorderLayout.SOUTH); } dialogPane.add(mainPanel, BorderLayout.CENTER); } contentPane.add(dialogPane, BorderLayout.CENTER); pack(); setLocationRelativeTo(getOwner()); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:org.archiviststoolkit.dialog.SubjectTermLookup.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(); subjectLookup = new JTextField(); scrollPane1 = new JScrollPane(); subjectLookupTable = new DomainSortableTable(Subjects.class, subjectLookup); linkingPanel = new JPanel(); label3 = new JLabel(); label4 = new JLabel(); buttonBar = new JPanel(); linkSubjectButton = new JButton(); createSubjectButton = new JButton(); doneButton = new JButton(); selectPanel = new JPanel(); buttonBar2 = new JPanel(); selectButton = new JButton(); cancelButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setModal(true);//from w w w .j a v a2s.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("Subject Term 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.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.DEFAULT_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 })); //---- label1 ---- label1.setText("Filter:"); contentPane.add(label1, cc.xy(2, 2)); contentPane.add(subjectLookup, cc.xy(4, 2)); //======== scrollPane1 ======== { scrollPane1.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); //---- subjectLookupTable ---- subjectLookupTable.setPreferredScrollableViewportSize(new Dimension(450, 300)); subjectLookupTable.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { subjectLookupTableMouseClicked(e); } }); subjectLookupTable.addKeyListener(new KeyAdapter() { @Override public void keyTyped(KeyEvent e) { subjectLookupTableKeyTyped(e); } }); scrollPane1.setViewportView(subjectLookupTable); } 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.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //---- label3 ---- label3.setText("Double click on a Subject Term to add it to the record."); linkingPanel.add(label3, cc.xy(1, 1)); //---- label4 ---- label4.setText("Or hit enter if a Term is highlighted."); linkingPanel.add(label4, cc.xy(1, 3)); //======== 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"))); //---- linkSubjectButton ---- linkSubjectButton.setText("Link"); linkSubjectButton.setOpaque(false); linkSubjectButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { linkSubjectButtonActionPerformed(); } }); buttonBar.add(linkSubjectButton, cc.xy(1, 1)); //---- createSubjectButton ---- createSubjectButton.setText("Create Subject"); createSubjectButton.setOpaque(false); createSubjectButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { createSubjectButtonActionPerformed(); } }); buttonBar.add(createSubjectButton, cc.xy(3, 1)); //---- doneButton ---- doneButton.setText("Close Window"); doneButton.setOpaque(false); doneButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { doneButtonActionPerformed(); } }); buttonBar.add(doneButton, cc.xy(5, 1)); } linkingPanel.add(buttonBar, cc.xywh(1, 5, 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(); } }); 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 }