/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

package org.netbeans.modules.j2ee.ddloaders.multiview.ui;

import org.netbeans.modules.xml.multiview.ui.SectionNodeInnerPanel;
import org.netbeans.modules.xml.multiview.ui.SectionNodeView;
import org.netbeans.modules.xml.multiview.Utils;

import javax.swing.*;

/**
 * @author pfiala
 */
public class EjbDetailForm extends SectionNodeInnerPanel {

    /**
     * Creates new form EjbDetailForm
     */
    public EjbDetailForm(SectionNodeView sectionNodeView) {
        super(sectionNodeView);
        initComponents();
        Utils.makeTextAreaLikeTextField(descriptionTextArea, displayNameTextField);
    }

    /**
     * This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        java.awt.GridBagConstraints gridBagConstraints;

        displayNameLabel = new javax.swing.JLabel();
        descriptionLabel = new javax.swing.JLabel();
        smallIconlabel = new javax.swing.JLabel();
        largeIconLabel = new javax.swing.JLabel();
        displayNameTextField = new javax.swing.JTextField();
        descriptionTextArea = new javax.swing.JTextArea();
        smallIconTextField = new javax.swing.JTextField();
        browseSmallIconButton = new javax.swing.JButton();
        largeIconTextField = new javax.swing.JTextField();
        browseLargeIconButton = new javax.swing.JButton();
        spacerLabel = new javax.swing.JLabel();

        setLayout(new java.awt.GridBagLayout());

        displayNameLabel.setLabelFor(displayNameTextField);
        displayNameLabel.setText(org.openide.util.NbBundle.getMessage(EjbDetailForm.class, "LBL_DisplayName")); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
        add(displayNameLabel, gridBagConstraints);

        descriptionLabel.setLabelFor(descriptionTextArea);
        descriptionLabel.setText(org.openide.util.NbBundle.getMessage(EjbDetailForm.class, "LBL_Description")); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
        add(descriptionLabel, gridBagConstraints);

        smallIconlabel.setLabelFor(smallIconTextField);
        smallIconlabel.setText(org.openide.util.NbBundle.getMessage(EjbDetailForm.class, "LBL_SmallIcon")); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
        add(smallIconlabel, gridBagConstraints);

        largeIconLabel.setLabelFor(largeIconTextField);
        largeIconLabel.setText(org.openide.util.NbBundle.getMessage(EjbDetailForm.class, "LBL_LargeIcon")); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
        add(largeIconLabel, gridBagConstraints);

        displayNameTextField.setColumns(25);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
        add(displayNameTextField, gridBagConstraints);
        displayNameTextField.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(EjbDetailForm.class, "ACSD_Display_Name")); // NOI18N

        descriptionTextArea.setLineWrap(true);
        descriptionTextArea.setRows(3);
        descriptionTextArea.setWrapStyleWord(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
        gridBagConstraints.gridheight = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.weighty = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
        add(descriptionTextArea, gridBagConstraints);
        descriptionTextArea.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(EjbDetailForm.class, "ACSD_Description")); // NOI18N

        smallIconTextField.setColumns(25);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
        add(smallIconTextField, gridBagConstraints);
        smallIconTextField.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(EjbDetailForm.class, "ACSD_Small_Icon")); // NOI18N

        browseSmallIconButton.setText(org.openide.util.NbBundle.getMessage(EjbDetailForm.class, "LBL_Browse")); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
        add(browseSmallIconButton, gridBagConstraints);
        browseSmallIconButton.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(EjbDetailForm.class, "ACSD_Browse_Icon")); // NOI18N

        largeIconTextField.setColumns(25);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
        add(largeIconTextField, gridBagConstraints);
        largeIconTextField.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(EjbDetailForm.class, "ACSD_Large_Icon")); // NOI18N

        browseLargeIconButton.setText(org.openide.util.NbBundle.getMessage(EjbDetailForm.class, "LBL_Browse")); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
        add(browseLargeIconButton, gridBagConstraints);
        browseLargeIconButton.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(EjbDetailForm.class, "ACSD_Browse_Icon")); // NOI18N

        spacerLabel.setText(" ");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.weightx = 1.0;
        add(spacerLabel, gridBagConstraints);
    }// </editor-fold>//GEN-END:initComponents

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton browseLargeIconButton;
    private javax.swing.JButton browseSmallIconButton;
    private javax.swing.JLabel descriptionLabel;
    private javax.swing.JTextArea descriptionTextArea;
    private javax.swing.JLabel displayNameLabel;
    private javax.swing.JTextField displayNameTextField;
    private javax.swing.JLabel largeIconLabel;
    private javax.swing.JTextField largeIconTextField;
    private javax.swing.JTextField smallIconTextField;
    private javax.swing.JLabel smallIconlabel;
    private javax.swing.JLabel spacerLabel;
    // End of variables declaration//GEN-END:variables

    public JTextArea getDescriptionTextArea() {
        return descriptionTextArea;
    }

    public JTextField getDisplayNameTextField() {
        return displayNameTextField;
    }

    public JTextField getLargeIconTextField() {
        return largeIconTextField;
    }

    public JTextField getSmallIconTextField() {
        return smallIconTextField;
    }

    public JButton getBrowseLargeIconButton() {
        return browseLargeIconButton;
    }

    public JButton getBrowseSmallIconButton() {
        return browseSmallIconButton;
    }

    public JComponent getErrorComponent(String errorId) {
        return null;
    }

    public void setValue(JComponent source, Object value) {

    }

    public void linkButtonPressed(Object ddBean, String ddProperty) {

    }

}
