| /* |
| * 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.ejbjarproject.ui; |
| |
| import javax.swing.JPanel; |
| import org.netbeans.modules.javaee.project.api.ui.UserProjectSettings; |
| |
| public class BrokenReferencesAlertPanel extends JPanel { |
| private static final long serialVersionUID = 1L; |
| |
| public BrokenReferencesAlertPanel() { |
| initComponents(); |
| again.setSelected(UserProjectSettings.getDefault().isShowAgainBrokenRefAlert()); |
| } |
| |
| /** 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. |
| */ |
| private void initComponents() {//GEN-BEGIN:initComponents |
| java.awt.GridBagConstraints gridBagConstraints; |
| |
| jScrollPane1 = new javax.swing.JScrollPane(); |
| message = new javax.swing.JTextArea(); |
| again = new javax.swing.JCheckBox(); |
| |
| setLayout(new java.awt.GridBagLayout()); |
| |
| setPreferredSize(new java.awt.Dimension(350, 100)); |
| jScrollPane1.setBorder(null); |
| message.setEditable(false); |
| message.setLineWrap(true); |
| message.setText(org.openide.util.NbBundle.getMessage(BrokenReferencesAlertPanel.class, "MSG_Broken_References")); |
| message.setWrapStyleWord(true); |
| message.setOpaque(false); |
| jScrollPane1.setViewportView(message); |
| |
| gridBagConstraints = new java.awt.GridBagConstraints(); |
| gridBagConstraints.gridx = 0; |
| gridBagConstraints.gridy = 0; |
| gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; |
| gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; |
| gridBagConstraints.weightx = 1.0; |
| gridBagConstraints.weighty = 0.9; |
| gridBagConstraints.insets = new java.awt.Insets(11, 11, 0, 0); |
| add(jScrollPane1, gridBagConstraints); |
| |
| again.setSelected(true); |
| again.setText(org.openide.util.NbBundle.getMessage(BrokenReferencesAlertPanel.class, "MSG_Broken_References_Again")); |
| again.addActionListener(new java.awt.event.ActionListener() { |
| public void actionPerformed(java.awt.event.ActionEvent evt) { |
| againActionPerformed(evt); |
| } |
| }); |
| |
| gridBagConstraints = new java.awt.GridBagConstraints(); |
| gridBagConstraints.gridx = 0; |
| gridBagConstraints.gridy = 1; |
| gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; |
| gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; |
| gridBagConstraints.weightx = 1.0; |
| gridBagConstraints.weighty = 0.1; |
| gridBagConstraints.insets = new java.awt.Insets(6, 11, 0, 0); |
| add(again, gridBagConstraints); |
| |
| }//GEN-END:initComponents |
| |
| private void againActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_againActionPerformed |
| UserProjectSettings.getDefault().setShowAgainBrokenRefAlert(again.isSelected()); |
| }//GEN-LAST:event_againActionPerformed |
| |
| |
| // Variables declaration - do not modify//GEN-BEGIN:variables |
| private javax.swing.JCheckBox again; |
| private javax.swing.JScrollPane jScrollPane1; |
| private javax.swing.JTextArea message; |
| // End of variables declaration//GEN-END:variables |
| |
| |
| } |