001: /*
002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003: *
004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005: *
006: * The contents of this file are subject to the terms of either the GNU
007: * General Public License Version 2 only ("GPL") or the Common
008: * Development and Distribution License("CDDL") (collectively, the
009: * "License"). You may not use this file except in compliance with the
010: * License. You can obtain a copy of the License at
011: * http://www.netbeans.org/cddl-gplv2.html
012: * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
013: * specific language governing permissions and limitations under the
014: * License. When distributing the software, include this License Header
015: * Notice in each file and include the License file at
016: * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
017: * particular file as subject to the "Classpath" exception as provided
018: * by Sun in the GPL Version 2 section of the License file that
019: * accompanied this code. If applicable, add the following below the
020: * License Header, with the fields enclosed by brackets [] replaced by
021: * your own identifying information:
022: * "Portions Copyrighted [year] [name of copyright owner]"
023: *
024: * Contributor(s):
025: *
026: * The Original Software is NetBeans. The Initial Developer of the Original
027: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
028: * Microsystems, Inc. All Rights Reserved.
029: *
030: * If you wish your version of this file to be governed by only the CDDL
031: * or only the GPL Version 2, indicate your decision by adding
032: * "[Contributor] elects to include this software in this distribution
033: * under the [CDDL or GPL Version 2] license." If you do not indicate a
034: * single choice of license, a recipient has the option to distribute
035: * your version of this file under either the CDDL, the GPL Version 2 or
036: * to extend the choice of license to its licensees as provided above.
037: * However, if you add GPL Version 2 code and therefore, elected the GPL
038: * Version 2 license, then the option applies only if the new code is
039: * made subject to such option by the copyright holder.
040: */
041:
042: /*
043: * FtpCustomizerPanel.java
044: *
045: * Created on 8. prosinec 2004, 17:28
046: */
047: package org.netbeans.modules.mobility.deployment.ftpscp;
048:
049: import java.awt.Font;
050: import javax.swing.JSpinner;
051: import org.openide.util.NbBundle;
052:
053: /**
054: *
055: * @author Adam
056: */
057: public class FtpCustomizerPanel extends javax.swing.JPanel {
058:
059: /** Creates new form FtpCustomizerPanel */
060: public FtpCustomizerPanel() {
061: initComponents();
062: jSpinnerPort.setEditor(new JSpinner.NumberEditor(jSpinnerPort,
063: "#0")); //NOI18N
064: jTextArea1
065: .setFont(jTextArea1.getFont().deriveFont(Font.ITALIC));
066: }
067:
068: /** This method is called from within the constructor to
069: * initialize the form.
070: * WARNING: Do NOT modify this code. The content of this method is
071: * always regenerated by the Form Editor.
072: */
073: // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
074: private void initComponents() {
075: java.awt.GridBagConstraints gridBagConstraints;
076:
077: jLabel1 = new javax.swing.JLabel();
078: jTextFieldServer = new javax.swing.JTextField();
079: jLabel6 = new javax.swing.JLabel();
080: jComboBoxSeparator = new javax.swing.JComboBox();
081: jLabel2 = new javax.swing.JLabel();
082: jSpinnerPort = new javax.swing.JSpinner();
083: jLabel3 = new javax.swing.JLabel();
084: jTextFieldUser = new javax.swing.JTextField();
085: jLabel4 = new javax.swing.JLabel();
086: jPasswordField = new javax.swing.JPasswordField();
087: jCheckBoxPassive = new javax.swing.JCheckBox();
088: jTextArea1 = new javax.swing.JTextArea();
089:
090: setLayout(new java.awt.GridBagLayout());
091:
092: jLabel1.setLabelFor(jTextFieldServer);
093: org.openide.awt.Mnemonics
094: .setLocalizedText(jLabel1, NbBundle.getMessage(
095: FtpCustomizerPanel.class, "LBL_Ftp_Server")); // NOI18N
096: gridBagConstraints = new java.awt.GridBagConstraints();
097: gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
098: add(jLabel1, gridBagConstraints);
099:
100: jTextFieldServer.setName(FtpDeploymentPlugin.PROP_SERVER);
101: gridBagConstraints = new java.awt.GridBagConstraints();
102: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
103: gridBagConstraints.weightx = 1.0;
104: gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);
105: add(jTextFieldServer, gridBagConstraints);
106: jTextFieldServer.getAccessibleContext()
107: .setAccessibleDescription(
108: NbBundle.getMessage(FtpCustomizerPanel.class,
109: "ACSD_Ftp_Server")); // NOI18N
110:
111: jLabel6.setLabelFor(jComboBoxSeparator);
112: org.openide.awt.Mnemonics.setLocalizedText(jLabel6, NbBundle
113: .getMessage(FtpCustomizerPanel.class,
114: "LBL_Ftp_Separator")); // NOI18N
115: gridBagConstraints = new java.awt.GridBagConstraints();
116: gridBagConstraints.gridx = 2;
117: gridBagConstraints.gridy = 1;
118: gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
119: gridBagConstraints.insets = new java.awt.Insets(5, 11, 0, 0);
120: add(jLabel6, gridBagConstraints);
121:
122: jComboBoxSeparator.setEditable(true);
123: jComboBoxSeparator
124: .setModel(new javax.swing.DefaultComboBoxModel(
125: new String[] { "/", "\\\\" }));
126: jComboBoxSeparator.setName(FtpDeploymentPlugin.PROP_SEPARATOR);
127: jComboBoxSeparator.setPreferredSize(new java.awt.Dimension(54,
128: 20));
129: gridBagConstraints = new java.awt.GridBagConstraints();
130: gridBagConstraints.gridx = 3;
131: gridBagConstraints.gridy = 1;
132: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
133: gridBagConstraints.insets = new java.awt.Insets(5, 5, 0, 0);
134: add(jComboBoxSeparator, gridBagConstraints);
135: jComboBoxSeparator.getAccessibleContext()
136: .setAccessibleDescription(
137: NbBundle.getMessage(FtpCustomizerPanel.class,
138: "ACSD_Ftp_Separator")); // NOI18N
139:
140: jLabel2.setLabelFor(jSpinnerPort);
141: org.openide.awt.Mnemonics.setLocalizedText(jLabel2, NbBundle
142: .getMessage(FtpCustomizerPanel.class, "LBL_Ftp_Port")); // NOI18N
143: gridBagConstraints = new java.awt.GridBagConstraints();
144: gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
145: gridBagConstraints.insets = new java.awt.Insets(0, 11, 0, 0);
146: add(jLabel2, gridBagConstraints);
147: jLabel2.getAccessibleContext().setAccessibleDescription(
148: NbBundle.getMessage(FtpCustomizerPanel.class,
149: "ACSD_Ftp_Port")); // NOI18N
150:
151: jSpinnerPort.setName(FtpDeploymentPlugin.PROP_PORT);
152: jSpinnerPort.setPreferredSize(new java.awt.Dimension(54, 20));
153: gridBagConstraints = new java.awt.GridBagConstraints();
154: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
155: gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);
156: add(jSpinnerPort, gridBagConstraints);
157:
158: jLabel3.setLabelFor(jTextFieldUser);
159: org.openide.awt.Mnemonics.setLocalizedText(jLabel3, NbBundle
160: .getMessage(FtpCustomizerPanel.class, "LBL_Ftp_User")); // NOI18N
161: gridBagConstraints = new java.awt.GridBagConstraints();
162: gridBagConstraints.gridx = 0;
163: gridBagConstraints.gridy = 1;
164: gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
165: gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
166: add(jLabel3, gridBagConstraints);
167:
168: jTextFieldUser.setName(FtpDeploymentPlugin.PROP_USERID);
169: gridBagConstraints = new java.awt.GridBagConstraints();
170: gridBagConstraints.gridx = 1;
171: gridBagConstraints.gridy = 1;
172: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
173: gridBagConstraints.weightx = 1.0;
174: gridBagConstraints.insets = new java.awt.Insets(5, 5, 0, 0);
175: add(jTextFieldUser, gridBagConstraints);
176: jTextFieldUser.getAccessibleContext().setAccessibleDescription(
177: NbBundle.getMessage(FtpCustomizerPanel.class,
178: "ACSD_Ftp_user")); // NOI18N
179:
180: jLabel4.setLabelFor(jPasswordField);
181: org.openide.awt.Mnemonics.setLocalizedText(jLabel4, NbBundle
182: .getMessage(FtpCustomizerPanel.class,
183: "LBL_Ftp_Password")); // NOI18N
184: gridBagConstraints = new java.awt.GridBagConstraints();
185: gridBagConstraints.gridx = 0;
186: gridBagConstraints.gridy = 2;
187: gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
188: gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
189: add(jLabel4, gridBagConstraints);
190:
191: jPasswordField.setName(FtpDeploymentPlugin.PROP_PASSWORD);
192: jPasswordField.setPreferredSize(new java.awt.Dimension(6, 20));
193: gridBagConstraints = new java.awt.GridBagConstraints();
194: gridBagConstraints.gridx = 1;
195: gridBagConstraints.gridy = 2;
196: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
197: gridBagConstraints.weightx = 1.0;
198: gridBagConstraints.insets = new java.awt.Insets(5, 5, 0, 0);
199: add(jPasswordField, gridBagConstraints);
200: jPasswordField.getAccessibleContext().setAccessibleDescription(
201: NbBundle.getMessage(FtpCustomizerPanel.class,
202: "ACSD_Ftp_Password")); // NOI18N
203:
204: org.openide.awt.Mnemonics.setLocalizedText(jCheckBoxPassive,
205: NbBundle.getMessage(FtpCustomizerPanel.class,
206: "LBL_Ftp_Passive")); // NOI18N
207: jCheckBoxPassive.setName(FtpDeploymentPlugin.PROP_PASSIVE);
208: gridBagConstraints = new java.awt.GridBagConstraints();
209: gridBagConstraints.gridx = 0;
210: gridBagConstraints.gridy = 3;
211: gridBagConstraints.gridwidth = 2;
212: gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
213: gridBagConstraints.weightx = 1.0;
214: gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 0);
215: add(jCheckBoxPassive, gridBagConstraints);
216:
217: jTextArea1.setBackground(getBackground());
218: jTextArea1.setEditable(false);
219: jTextArea1.setLineWrap(true);
220: jTextArea1.setText(NbBundle.getMessage(
221: FtpCustomizerPanel.class, "LBL_Ftp_Notice")); // NOI18N
222: gridBagConstraints = new java.awt.GridBagConstraints();
223: gridBagConstraints.gridx = 0;
224: gridBagConstraints.gridy = 4;
225: gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
226: gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
227: gridBagConstraints.weightx = 1.0;
228: gridBagConstraints.weighty = 1.0;
229: gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 0);
230: add(jTextArea1, gridBagConstraints);
231: }// </editor-fold>//GEN-END:initComponents
232:
233: // Variables declaration - do not modify//GEN-BEGIN:variables
234: javax.swing.JCheckBox jCheckBoxPassive;
235: javax.swing.JComboBox jComboBoxSeparator;
236: javax.swing.JLabel jLabel1;
237: javax.swing.JLabel jLabel2;
238: javax.swing.JLabel jLabel3;
239: javax.swing.JLabel jLabel4;
240: javax.swing.JLabel jLabel6;
241: javax.swing.JPasswordField jPasswordField;
242: javax.swing.JSpinner jSpinnerPort;
243: javax.swing.JTextArea jTextArea1;
244: javax.swing.JTextField jTextFieldServer;
245: javax.swing.JTextField jTextFieldUser;
246: // End of variables declaration//GEN-END:variables
247:
248: }
|