List of usage examples for com.jgoodies.forms.layout CellConstraints LEFT
Alignment LEFT
To view the source code for com.jgoodies.forms.layout CellConstraints LEFT.
Click Source Link
From source file:loci.plugins.in.MainDialog.java
License:Open Source License
/** * Convenience method for creating a left-aligned, * vertically centered cell constraints object. *//*from www.j av a 2 s .co m*/ private CellConstraints xyw(CellConstraints cc, int x, int y, int w) { return cc.xyw(x, y, w, CellConstraints.LEFT, CellConstraints.CENTER); }
From source file:net.pms.medialibrary.gui.dialogs.FileUpdateWithPluginDialog.java
License:Open Source License
private void build() { FormLayout layout = new FormLayout("5px, r:p, 5px, p, 5px, f:p:g, 5px", "5px, p, 5px, p, 5px, p, 5px, p, 5px, f:80:g, 5px, p, 5px"); PanelBuilder builder = new PanelBuilder(layout); builder.setOpaque(true);/* w ww . ja v a 2 s.c om*/ CellConstraints cc = new CellConstraints(); builder.addLabel(Messages.getString("ML.FileUpdateWithPluginDialog.lImportBy"), cc.xy(2, 2)); builder.add(rbName, cc.xy(4, 2)); builder.add(rbId, cc.xy(6, 2)); builder.addLabel(Messages.getString("ML.FileUpdateWithPluginDialog.lPlugin"), cc.xy(2, 4)); builder.add(cbPlugins, cc.xyw(4, 4, 3)); builder.add(lValueHeader, cc.xy(2, 6)); builder.add(tfValue, cc.xyw(4, 6, 3)); builder.addLabel(Messages.getString("ML.FileUpdateWithPluginDialog.lResults"), cc.xyw(2, 8, 5, CellConstraints.LEFT, CellConstraints.DEFAULT)); JPanel pResults = new JPanel(new BorderLayout()); pResults.setBorder(BorderFactory.createLineBorder(Color.lightGray)); JPanel pResultsFiller = new JPanel(); pResultsFiller.setBackground(lResults.getBackground()); pResults.add(lResults, BorderLayout.NORTH); pResults.add(pResultsFiller, BorderLayout.CENTER); JScrollPane spResults = new JScrollPane(pResults); spResults.setBorder(BorderFactory.createEmptyBorder()); builder.add(spResults, cc.xyw(2, 10, 5)); builder.add(pButtons, cc.xyw(2, 12, 5)); add(builder.getPanel()); }
From source file:net.pms.medialibrary.gui.dialogs.ScanFolderDialog.java
License:Open Source License
private void build(String folderPath) { FormLayout layout = new FormLayout("5px, p, 5px, fill:p:grow, 5px, p, 5px, p, 5px", "p, 2px, p, 5px, p, 2px, p"); PanelBuilder builder = new PanelBuilder(layout); builder.setOpaque(true);// w w w . j a v a 2s . c om CellConstraints cc = new CellConstraints(); // line 1 builder.addLabel(Messages.getString("ML.ScanFolderDialog.lFolderPath"), cc.xy(2, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); tfFolderPath = new JTextField(folderPath); tfFolderPath.setMinimumSize(new Dimension(300, tfFolderPath.getPreferredSize().height)); builder.add(tfFolderPath, cc.xy(4, 1)); bBrowseFolderPath = new JButton(Messages.getString("ML.ScanFolderDialog.bBrowse")); bBrowseFolderPath.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { JFileChooser fc = new JFileChooser(bBrowseFolderPath.getText()); fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); if (fc.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) { tfFolderPath.setText(fc.getSelectedFile().getAbsolutePath()); } } }); builder.add(bBrowseFolderPath, cc.xy(6, 1)); cbScanSubFolders = new JCheckBox(Messages.getString("ML.ScanFolderDialog.cbScanSubFolders")); cbScanSubFolders.setSelected(true); builder.add(cbScanSubFolders, cc.xy(8, 1)); // line 2 builder.addLabel(Messages.getString("ML.ScanFolderDialog.lLookFor"), cc.xy(2, 3, CellConstraints.RIGHT, CellConstraints.DEFAULT)); JPanel pFileTypes = new JPanel(new FlowLayout()); cbScanVideo = new JCheckBox(Messages.getString("ML.ScanFolderDialog.cbScanVideo"), true); pFileTypes.add(cbScanVideo); cbScanAudio = new JCheckBox(Messages.getString("ML.ScanFolderDialog.cbScanAudio"), true); pFileTypes.add(cbScanAudio); cbScanPictures = new JCheckBox(Messages.getString("ML.ScanFolderDialog.cbScanPictures"), true); pFileTypes.add(cbScanPictures); builder.add(pFileTypes, cc.xy(4, 3, CellConstraints.LEFT, CellConstraints.DEFAULT)); cbUseFileImportPlugins = new JCheckBox(Messages.getString("ML.ScanFolderDialog.cbUsePlugins")); cbUseFileImportPlugins.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { if (cbUseFileImportPlugins.isSelected()) { pFileImport.setVisible(true); } else { pFileImport.setVisible(false); } pack(); } }); builder.add(cbUseFileImportPlugins, cc.xy(8, 3, CellConstraints.LEFT, CellConstraints.DEFAULT)); // file import pFileImport = new FileImportTemplatePanel(1); pFileImport.setVisible(false); pFileImport.addRepaintListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { pack(); } }); builder.add(pFileImport, cc.xyw(2, 5, 7)); // buttons bImport = new JButton(Messages.getString("ML.ScanFolderDialog.bImport")); if (bImport.getPreferredSize().width < MIN_BUTTON_WIDTH) bImport.setPreferredSize(new Dimension(MIN_BUTTON_WIDTH, bImport.getPreferredSize().height)); bImport.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { save(); File selectedFolder = new File(tfFolderPath.getText()); if (selectedFolder.isDirectory()) { setDoImport(true); instance.setVisible(false); } else { JOptionPane.showMessageDialog(null, Messages.getString("ML.ScanFolderDialog.InvalidPathMsg"), Messages.getString("ML.ScanFolderDialog.InvalidPathTitle"), JOptionPane.INFORMATION_MESSAGE); } } }); bCancel = new JButton(Messages.getString("ML.ScanFolderDialog.bCancel")); if (bCancel.getPreferredSize().width < MIN_BUTTON_WIDTH) bCancel.setPreferredSize(new Dimension(MIN_BUTTON_WIDTH, bCancel.getPreferredSize().height)); bCancel.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { setDoImport(false); instance.setVisible(false); } }); bSave = new JButton(Messages.getString("ML.ScanFolderDialog.bSave")); if (bSave.getPreferredSize().width < MIN_BUTTON_WIDTH) bSave.setPreferredSize(new Dimension(MIN_BUTTON_WIDTH, bSave.getPreferredSize().height)); bSave.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { save(); } }); JPanel bPanel = new JPanel(); bPanel.setAlignmentX(CENTER_ALIGNMENT); bPanel.add(bImport); bPanel.add(bSave); bPanel.add(bCancel); builder.add(bPanel, cc.xyw(2, 7, 7)); getContentPane().add(builder.getPanel()); pack(); }
From source file:net.pms.medialibrary.gui.tab.GeneralOptionsView.java
License:Open Source License
private JComponent buildUseMediaLibrary() { final FormLayout layout = new FormLayout("10:grow", "p, 7px, p"); final PanelBuilder builder = new PanelBuilder(layout); builder.setOpaque(true);/*from w w w . j a v a 2 s . c o m*/ final CellConstraints cc = new CellConstraints(); // Header JComponent sGeneral = builder.addSeparator(Messages.getString("ML.GeneralOptionsView.sGeneral"), cc.xy(1, 1)); sGeneral = (JComponent) sGeneral.getComponent(0); sGeneral.setFont(sGeneral.getFont().deriveFont(Font.BOLD)); // Enable cbEnableMediaLibrary = new JCheckBox(Messages.getString("ML.GeneralOptionsView.cbEnableMediaLibrary")); builder.add(cbEnableMediaLibrary, cc.xy(1, 3, CellConstraints.LEFT, CellConstraints.CENTER)); cbEnableMediaLibrary.setSelected(libConfig.isMediaLibraryEnabled()); cbEnableMediaLibrary.addActionListener(new ActionListener() { @Override public void actionPerformed(final ActionEvent e) { pOptions.setVisible(cbEnableMediaLibrary.isSelected()); libConfig.setMediaLibraryEnabled(cbEnableMediaLibrary.isSelected()); } }); return builder.getPanel(); }
From source file:net.pms.util.FormLayoutUtil.java
License:Open Source License
/** * Creates and returns a horizontally flipped clone of the given cell * constraints object. Flips the horizontal alignment and the left and right * insets./*from w w w . ja va 2 s. c o m*/ * * @param cc * the original cell constraints object * @return the flipped cell constraints with flipped horizontal alignment, * and flipped left and right insets - if any */ private static CellConstraints flipHorizontally(CellConstraints cc) { CellConstraints.Alignment flippedHAlign = cc.hAlign; if (flippedHAlign == CellConstraints.LEFT) { flippedHAlign = CellConstraints.RIGHT; } else { if (flippedHAlign == CellConstraints.RIGHT) { flippedHAlign = CellConstraints.LEFT; } } CellConstraints flipped = new CellConstraints(cc.gridX, cc.gridY, cc.gridWidth, cc.gridHeight, flippedHAlign, cc.vAlign); if (cc.insets != null) { flipped.insets = new Insets(cc.insets.top, cc.insets.right, cc.insets.bottom, cc.insets.left); } return flipped; }
From source file:net.rptools.maptool.client.ui.tokenpanel.InitiativeListCellRenderer.java
License:Open Source License
/** * @see javax.swing.ListCellRenderer#getListCellRendererComponent(javax.swing.JList, java.lang.Object, int, boolean, * boolean)/* w w w .j a v a2 s . c om*/ */ public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { // Set the background by type Token token = null; TokenInitiative ti = (TokenInitiative) value; if (ti != null) token = ti.getToken(); if (token == null) { // Can happen when deleting a token before all events have propagated currentIndicator.setIcon(null); name.setText(null); name.setIcon(null); setBorder(UNSELECTED_BORDER); return this; } // endif backgroundImageLabel = token.isVisible() ? token.getType() == Token.Type.NPC ? GraphicsUtil.BLUE_LABEL : GraphicsUtil.GREY_LABEL : GraphicsUtil.DARK_GREY_LABEL; name.setForeground(Color.BLACK); // Show the indicator? int currentIndex = panel.getList().getCurrent(); if (currentIndex >= 0 && ti == panel.getList().getTokenInitiative(currentIndex)) { currentIndicator.setIcon(CURRENT_INDICATOR_ICON); } else { currentIndicator.setIcon(null); } // endif // Get the name string, add the state if displayed, then get the icon if needed boolean initStateSecondLine = panel.isInitStateSecondLine() && panel.isShowInitState(); String sName = (initStateSecondLine ? "<html>" : "") + ti.getToken().getName(); if (MapTool.getFrame().getInitiativePanel().hasGMPermission() && token.getGMName() != null && token.getGMName().trim().length() != 0) sName += " (" + token.getGMName().trim() + ")"; if (panel.isShowInitState() && ti.getState() != null) sName += (initStateSecondLine ? "<br>" : " = ") + ti.getState(); if (initStateSecondLine) sName += "</html>"; Icon icon = null; if (panel.isShowTokens()) { icon = ti.getDisplayIcon(); if (icon == null) { icon = new InitiativeListIcon(ti); ti.setDisplayIcon(icon); } // endif } // endif name.setText(sName); name.setIcon(icon); // Align it properly Alignment alignment = ti.isHolding() ? CellConstraints.RIGHT : CellConstraints.LEFT; FormLayout layout = (FormLayout) getLayout(); layout.setConstraints(name, new CellConstraints(4, 1, alignment, CellConstraints.CENTER)); if (alignment == CellConstraints.RIGHT) { name.setHorizontalTextPosition(SwingConstants.LEFT); } else { name.setHorizontalTextPosition(SwingConstants.RIGHT); } // endif // Selected? if (isSelected) { setBorder(SELECTED_BORDER); } else { setBorder(UNSELECTED_BORDER); } // endif return this; }
From source file:net.sourceforge.marathon.mpf.MainPanel.java
License:Open Source License
public JPanel createPanel() { initComponents();//from w w w. j av a2s .co m PanelBuilder builder = new PanelBuilder(new FormLayout("left:pref, 3dlu, fill:pref:grow, 3dlu, fill:pref", "pref, 3dlu, pref, 3dlu, fill:pref:grow, 3dlu, fill:pref:grow, 3dlu, pref, 3dlu, pref, 3dlu, pref")); builder.setDefaultDialogBorder(); CellConstraints labelConstraints = new CellConstraints(); CellConstraints compConstraints = new CellConstraints(); builder.addLabel("Class &Name: ", labelConstraints.xy(1, 1), mainClassField, compConstraints.xywh(3, 1, 3, 1)); JScrollPane scrollPane = new JScrollPane(programArgsField, ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); JLabel label = builder.addLabel("Pro&gram Arguments: ", labelConstraints.xy(1, 5, CellConstraints.LEFT, CellConstraints.TOP), scrollPane, compConstraints.xywh(3, 5, 3, 1)); label.setLabelFor(programArgsField); scrollPane = new JScrollPane(vmArgsField, ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); label = builder.addLabel("&VM Arguments: ", labelConstraints.xy(1, 7, CellConstraints.LEFT, CellConstraints.TOP), scrollPane, compConstraints.xywh(3, 7, 3, 1)); label.setLabelFor(vmArgsField); builder.addLabel("&Working Directory: ", labelConstraints.xy(1, 9), workingDirField, compConstraints.xy(3, 9)); builder.add(browse, labelConstraints.xy(5, 9)); browse.setMnemonic(KeyEvent.VK_B); builder.addLabel("&Java Executable: ", labelConstraints.xy(1, 11), vmCommandField, compConstraints.xy(3, 11)); builder.add(browseVM, labelConstraints.xy(5, 11)); return builder.getPanel(); }
From source file:net.sourceforge.marathon.mpf.ProjectPanel.java
License:Open Source License
public JPanel createPanel() { initComponents();// w ww . j a v a 2 s .c o m PanelBuilder builder = new PanelBuilder(new FormLayout("left:pref, 3dlu, pref:grow, 3dlu, fill:pref", "pref, 3dlu, pref, 3dlu, fill:pref:grow, 3dlu, pref, 3dlu, pref")); builder.setDefaultDialogBorder(); CellConstraints labelConstraints = new CellConstraints(); CellConstraints compConstraints = new CellConstraints(); builder.addLabel("&Name: ", labelConstraints.xy(1, 1), nameField, compConstraints.xywh(3, 1, 3, 1)); builder.addLabel("Directory: ", labelConstraints.xy(1, 3), dirField, compConstraints.xy(3, 3)); builder.add(browse, compConstraints.xy(5, 3)); JScrollPane scrollPane = new JScrollPane(descriptionField, ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); JLabel label = builder.addLabel("&Description: ", labelConstraints.xy(1, 5, CellConstraints.LEFT, CellConstraints.TOP), scrollPane, compConstraints.xywh(3, 5, 3, 1)); label.setLabelFor(descriptionField); builder.add(useToolkitMenumask, labelConstraints.xyw(2, 7, 2)); builder.add(useDevelopmentMode, labelConstraints.xyw(2, 9, 2)); return builder.getPanel(); }
From source file:org.apache.cayenne.modeler.dialog.pref.GeneralPreferencesView.java
License:Apache License
public GeneralPreferencesView() { this.encodingSelector = new EncodingSelectorView(); this.encodingSelectorLabel = new JLabel("File Encoding:"); this.autoLoadProjectBox = new JCheckBox("Automatically Load Last Opened Project"); this.deletePromptBox = new JCheckBox("Always Delete Items Without Prompt"); FormLayout layout = new FormLayout("right:pref, 3dlu, 30dlu, 3dlu, fill:70dlu", "p, 3dlu, p, 12dlu, p, 30dlu, p, 12dlu, p, 3dlu, p, fill:40dlu:grow"); CellConstraints cc = new CellConstraints(); PanelBuilder builder = new PanelBuilder(layout); builder.setDefaultDialogBorder();//w w w. j a v a 2 s.c o m builder.addSeparator("General Preferences", cc.xyw(1, 1, 5)); builder.add(encodingSelectorLabel, cc.xy(1, 5)); builder.add(encodingSelector, cc.xywh(3, 5, 3, 3)); builder.add(autoLoadProjectBox, cc.xy(1, 7, CellConstraints.LEFT, CellConstraints.DEFAULT)); builder.addSeparator("Editor Preferences", cc.xyw(1, 9, 5)); builder.add(deletePromptBox, cc.xy(1, 11, CellConstraints.LEFT, CellConstraints.DEFAULT)); this.setLayout(new BorderLayout()); this.add(builder.getPanel(), BorderLayout.CENTER); }
From source file:org.archiviststoolkit.dialog.NameAuthorityLookup.java
License:Open Source License
private void initComponents() { setModal(true);//from w w w . ja v a 2s. co 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 }