Search in sources :

Example 61 with EtchedBorder

use of javax.swing.border.EtchedBorder in project ACS by ACS-Community.

the class CDBAddNodeDlg method initComponents.

private void initComponents() {
    GridBagConstraints gridBagConstraints;
    curlLabel = new JLabel();
    curlCtrl = new JTextField();
    xmlDataCtrl = new JTextArea();
    getContentPane().setLayout(new GridBagLayout());
    setTitle("Add new node");
    addWindowListener(new WindowAdapter() {

        public void windowClosing(WindowEvent evt) {
            closeDialog(evt);
        }
    });
    curlLabel.setText("Curl:");
    gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.insets = new Insets(11, 11, 11, 11);
    gridBagConstraints.anchor = GridBagConstraints.WEST;
    getContentPane().add(curlLabel, gridBagConstraints);
    curlCtrl.setBorder(new javax.swing.border.EtchedBorder());
    gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
    gridBagConstraints.insets = new Insets(11, 11, 11, 11);
    gridBagConstraints.weightx = 1.0;
    getContentPane().add(curlCtrl, gridBagConstraints);
    xmlDataCtrl.setBorder(new EtchedBorder());
    xmlDataCtrl.setPreferredSize(new Dimension(400, 300));
    gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.gridwidth = GridBagConstraints.REMAINDER;
    gridBagConstraints.gridheight = GridBagConstraints.RELATIVE;
    gridBagConstraints.fill = GridBagConstraints.BOTH;
    gridBagConstraints.insets = new Insets(11, 11, 11, 11);
    gridBagConstraints.anchor = GridBagConstraints.WEST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    getContentPane().add(xmlDataCtrl, gridBagConstraints);
    JPanel buttonsPanel = new JPanel();
    buttonsPanel.setLayout(new FlowLayout(FlowLayout.RIGHT));
    okBtn = new JButton();
    cancelBtn = new JButton();
    okBtn.addActionListener(this);
    okBtn.setText("OK");
    buttonsPanel.add(okBtn);
    cancelBtn.addActionListener(this);
    cancelBtn.setText("Cancel");
    buttonsPanel.add(cancelBtn);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    getContentPane().add(buttonsPanel, gridBagConstraints);
    setBounds(70, 70, 70, 70);
    pack();
}
Also used : JPanel(javax.swing.JPanel) GridBagConstraints(java.awt.GridBagConstraints) JTextArea(javax.swing.JTextArea) Insets(java.awt.Insets) FlowLayout(java.awt.FlowLayout) GridBagLayout(java.awt.GridBagLayout) JButton(javax.swing.JButton) JLabel(javax.swing.JLabel) WindowAdapter(java.awt.event.WindowAdapter) Dimension(java.awt.Dimension) JTextField(javax.swing.JTextField) GridBagConstraints(java.awt.GridBagConstraints) EtchedBorder(javax.swing.border.EtchedBorder) WindowEvent(java.awt.event.WindowEvent) EtchedBorder(javax.swing.border.EtchedBorder)

Example 62 with EtchedBorder

use of javax.swing.border.EtchedBorder in project pcgen by PCGen.

the class NotesView method initEditingComponents.

private void initEditingComponents() {
    bulletButton.setIcon(Icons.stock_list_bulet.getImageIcon());
    bulletButton.setToolTipText("Bulleted List");
    enumButton.setIcon(Icons.stock_list_enum.getImageIcon());
    enumButton.setToolTipText("Numbered List");
    enumButton.setText("");
    bulletButton.setText("");
    Vector<String> fontVector = new Vector<>();
    fontVector.add("8");
    fontVector.add("10");
    fontVector.add("12");
    fontVector.add("14");
    fontVector.add("16");
    fontVector.add("18");
    fontVector.add("24");
    fontVector.add("36");
    fontVector.add("48");
    DefaultComboBoxModel cbModel = new DefaultComboBoxModel(fontVector);
    sizeCB.setModel(cbModel);
    sizeCB.setBorder(new EtchedBorder(EtchedBorder.LOWERED));
    stdButton(boldButton);
    stdButton(italicButton);
    stdButton(underlineButton);
    stdButton(colorButton);
    stdButton(leftJustifyButton);
    stdButton(centerJustifyButton);
    stdButton(rightJustifyButton);
    stdButton(newButton);
    stdButton(saveButton);
    stdButton(deleteButton);
    stdButton(cutButton);
    stdButton(copyButton);
    stdButton(pasteButton);
}
Also used : EtchedBorder(javax.swing.border.EtchedBorder) DefaultComboBoxModel(javax.swing.DefaultComboBoxModel) Vector(java.util.Vector)

Example 63 with EtchedBorder

use of javax.swing.border.EtchedBorder in project knime-core by knime.

the class ColumnResorterNodeDialog method initColumnListBox.

/**
 * @return Creates and returns the panel containing the column list.
 */
private Box initColumnListBox() {
    Box columnListBox = Box.createVerticalBox();
    columnListBox.setBorder(new TitledBorder("Columns"));
    m_listModel = new DefaultListModel();
    m_jlist = new JList(m_listModel);
    m_jlist.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
    m_jlist.setCellRenderer(new DataColumnSpecListDummyCellRenderer());
    m_jlist.setBorder(new EtchedBorder());
    columnListBox.add(new JScrollPane(m_jlist));
    return columnListBox;
}
Also used : JScrollPane(javax.swing.JScrollPane) EtchedBorder(javax.swing.border.EtchedBorder) DefaultListModel(javax.swing.DefaultListModel) Box(javax.swing.Box) TitledBorder(javax.swing.border.TitledBorder) JList(javax.swing.JList)

Example 64 with EtchedBorder

use of javax.swing.border.EtchedBorder in project knime-core by knime.

the class ColumnResorterNodeDialog method createListBox.

private Box createListBox() {
    // List for the columns
    Box listBox = Box.createVerticalBox();
    listBox.setBorder(new TitledBorder("Columns"));
    m_model = new DefaultListModel();
    m_columnList = new JList(m_model);
    m_columnList.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
    m_columnList.setCellRenderer(new DataColumnSpecListCellRenderer());
    m_columnList.setBorder(new EtchedBorder());
    JScrollPane scrollPane = new JScrollPane(m_columnList);
    listBox.add(scrollPane);
    return listBox;
}
Also used : JScrollPane(javax.swing.JScrollPane) DataColumnSpecListCellRenderer(org.knime.core.node.util.DataColumnSpecListCellRenderer) EtchedBorder(javax.swing.border.EtchedBorder) DefaultListModel(javax.swing.DefaultListModel) Box(javax.swing.Box) TitledBorder(javax.swing.border.TitledBorder) JList(javax.swing.JList)

Example 65 with EtchedBorder

use of javax.swing.border.EtchedBorder in project knime-core by knime.

the class VirtualSubNodeInputNodeDialogPane method createSubNodeDescriptionPanel.

private JPanel createSubNodeDescriptionPanel() {
    JPanel panel = new JPanel(new GridBagLayout());
    GridBagConstraints gbc = new GridBagConstraints();
    gbc.insets = new Insets(5, 5, 5, 5);
    gbc.anchor = GridBagConstraints.NORTHWEST;
    gbc.fill = GridBagConstraints.BOTH;
    gbc.weightx = 1;
    gbc.weighty = 1;
    gbc.gridx = 0;
    gbc.gridy = 0;
    panel.add(m_subNodeDescription, gbc);
    m_subNodeDescription.setBorder(new EtchedBorder());
    panel.setBorder(new TitledBorder(new EtchedBorder(), "Wrapped Metanode Description"));
    return panel;
}
Also used : JPanel(javax.swing.JPanel) GridBagConstraints(java.awt.GridBagConstraints) EtchedBorder(javax.swing.border.EtchedBorder) Insets(java.awt.Insets) GridBagLayout(java.awt.GridBagLayout) TitledBorder(javax.swing.border.TitledBorder)

Aggregations

EtchedBorder (javax.swing.border.EtchedBorder)116 JPanel (javax.swing.JPanel)92 JButton (javax.swing.JButton)74 JLabel (javax.swing.JLabel)74 ActionEvent (java.awt.event.ActionEvent)73 BorderLayout (java.awt.BorderLayout)72 ActionListener (java.awt.event.ActionListener)70 EmptyBorder (javax.swing.border.EmptyBorder)63 CompoundBorder (javax.swing.border.CompoundBorder)62 AbstractAction (javax.swing.AbstractAction)58 WindowAdapter (java.awt.event.WindowAdapter)55 WindowEvent (java.awt.event.WindowEvent)55 Insets (java.awt.Insets)46 GridBagConstraints (java.awt.GridBagConstraints)43 GridBagLayout (java.awt.GridBagLayout)43 JTextField (javax.swing.JTextField)40 Dimension (java.awt.Dimension)24 TitledBorder (javax.swing.border.TitledBorder)22 FlowLayout (java.awt.FlowLayout)18 JScrollPane (javax.swing.JScrollPane)17