[hg] main-silver: disable also the new button if attach patch no...

  • From: Tomas Stupka < >
  • To: ,
  • Subject: [hg] main-silver: disable also the new button if attach patch no...
  • Date: Wed, 13 Mar 2013 06:40:55 -0700

changeset ac652b0326a6 in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/ac652b0326a6
description:
        disable also the new button if attach patch not selected
        Issue #227321 - Patch for: Minor usability issues in export diff 
patch dialog

diffstat:

 
bugtracking.bridge/src/org/netbeans/modules/bugtracking/bridge/exportdiff/AttachPanel.form
  |  12 ++--
 
bugtracking.bridge/src/org/netbeans/modules/bugtracking/bridge/exportdiff/AttachPanel.java
  |  22 +++++-----
 
bugtracking.bridge/src/org/netbeans/modules/bugtracking/bridge/exportdiff/Bundle.properties
 |   3 +-
 3 files changed, 19 insertions(+), 18 deletions(-)

diffs (143 lines):

diff --git 
a/bugtracking.bridge/src/org/netbeans/modules/bugtracking/bridge/exportdiff/AttachPanel.form
 
b/bugtracking.bridge/src/org/netbeans/modules/bugtracking/bridge/exportdiff/AttachPanel.form
--- 
a/bugtracking.bridge/src/org/netbeans/modules/bugtracking/bridge/exportdiff/AttachPanel.form
+++ 
b/bugtracking.bridge/src/org/netbeans/modules/bugtracking/bridge/exportdiff/AttachPanel.form
@@ -31,7 +31,7 @@
                   <Group type="102" alignment="1" attributes="0">
                       <Component id="repositoryComboBox" pref="367" 
max="32767" attributes="2"/>
                       <EmptySpace type="unrelated" min="-2" max="-2" 
attributes="0"/>
-                      <Component id="jButton2" min="-2" max="-2" 
attributes="0"/>
+                      <Component id="newButton" min="-2" max="-2" 
attributes="0"/>
                   </Group>
                   <Component id="jPanel1" alignment="0" max="32767" 
attributes="0"/>
                   <Component id="descriptionTextField" alignment="0" 
pref="507" max="32767" attributes="0"/>
@@ -45,7 +45,7 @@
               <Group type="103" groupAlignment="3" attributes="0">
                   <Component id="repositoryLabel" alignment="3" min="-2" 
max="-2" attributes="0"/>
                   <Component id="repositoryComboBox" alignment="3" min="-2" 
max="-2" attributes="0"/>
-                  <Component id="jButton2" alignment="3" min="-2" max="-2" 
attributes="0"/>
+                  <Component id="newButton" alignment="3" min="-2" max="-2" 
attributes="0"/>
               </Group>
               <EmptySpace max="-2" attributes="0"/>
               <Group type="103" groupAlignment="0" attributes="0">
@@ -72,19 +72,19 @@
         </Property>
       </Properties>
     </Component>
-    <Component class="org.netbeans.modules.versioning.util.WideButton" 
name="jButton2">
+    <Component class="org.netbeans.modules.versioning.util.WideButton" 
name="newButton">
       <Properties>
         <Property name="text" type="java.lang.String" 
editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
-          <ResourceString 
bundle="org/netbeans/modules/bugtracking/bridge/exportdiff/Bundle.properties" 
key="AttachPanel.jButton2.text" 
replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, 
&quot;{key}&quot;)"/>
+          <ResourceString 
bundle="org/netbeans/modules/bugtracking/bridge/exportdiff/Bundle.properties" 
key="AttachPanel.newButton.text" 
replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, 
&quot;{key}&quot;)"/>
         </Property>
       </Properties>
       <AccessibilityProperties>
         <Property name="AccessibleContext.accessibleDescription" 
type="java.lang.String" 
editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
-          <ResourceString 
bundle="org/netbeans/modules/bugtracking/bridge/exportdiff/Bundle.properties" 
key="AttachPanel.jButton2.AccessibleContext.accessibleDescription" 
replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, 
&quot;{key}&quot;)"/>
+          <ResourceString 
bundle="org/netbeans/modules/bugtracking/bridge/exportdiff/Bundle.properties" 
key="AttachPanel.newButton.AccessibleContext.accessibleDescription" 
replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, 
&quot;{key}&quot;)"/>
         </Property>
       </AccessibilityProperties>
       <Events>
-        <EventHandler event="actionPerformed" 
listener="java.awt.event.ActionListener" 
parameters="java.awt.event.ActionEvent" handler="jButton2ActionPerformed"/>
+        <EventHandler event="actionPerformed" 
listener="java.awt.event.ActionListener" 
parameters="java.awt.event.ActionEvent" handler="newButtonActionPerformed"/>
       </Events>
     </Component>
     <Component class="javax.swing.JComboBox" name="repositoryComboBox">
diff --git 
a/bugtracking.bridge/src/org/netbeans/modules/bugtracking/bridge/exportdiff/AttachPanel.java
 
b/bugtracking.bridge/src/org/netbeans/modules/bugtracking/bridge/exportdiff/AttachPanel.java
--- 
a/bugtracking.bridge/src/org/netbeans/modules/bugtracking/bridge/exportdiff/AttachPanel.java
+++ 
b/bugtracking.bridge/src/org/netbeans/modules/bugtracking/bridge/exportdiff/AttachPanel.java
@@ -99,7 +99,7 @@
 
         buttonGroup1 = new javax.swing.ButtonGroup();
         repositoryLabel = new javax.swing.JLabel();
-        jButton2 = new org.netbeans.modules.versioning.util.WideButton();
+        newButton = new org.netbeans.modules.versioning.util.WideButton();
         issueLabel = new javax.swing.JLabel();
         jPanel1 = new javax.swing.JPanel();
         jLabel2 = new javax.swing.JLabel();
@@ -109,10 +109,10 @@
         repositoryLabel.setLabelFor(repositoryComboBox);
         org.openide.awt.Mnemonics.setLocalizedText(repositoryLabel, 
org.openide.util.NbBundle.getMessage(AttachPanel.class, 
"AttachPanel.repositoryLabel.text")); // NOI18N
 
-        org.openide.awt.Mnemonics.setLocalizedText(jButton2, 
org.openide.util.NbBundle.getMessage(AttachPanel.class, 
"AttachPanel.jButton2.text")); // NOI18N
-        jButton2.addActionListener(new java.awt.event.ActionListener() {
+        org.openide.awt.Mnemonics.setLocalizedText(newButton, 
org.openide.util.NbBundle.getMessage(AttachPanel.class, 
"AttachPanel.newButton.text")); // NOI18N
+        newButton.addActionListener(new java.awt.event.ActionListener() {
             public void actionPerformed(java.awt.event.ActionEvent evt) {
-                jButton2ActionPerformed(evt);
+                newButtonActionPerformed(evt);
             }
         });
 
@@ -158,8 +158,7 @@
                     .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, 
layout.createSequentialGroup()
                         .addComponent(repositoryComboBox, 0, 367, 
Short.MAX_VALUE)
                         
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
-                        .addComponent(jButton2, 
javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, 
javax.swing.GroupLayout.PREFERRED_SIZE)
-                        .addGap(0, 0, 0))
+                        .addComponent(newButton, 
javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, 
javax.swing.GroupLayout.PREFERRED_SIZE))
                     .addComponent(jPanel1, 
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, 
Short.MAX_VALUE)
                     .addComponent(descriptionTextField, 
javax.swing.GroupLayout.DEFAULT_SIZE, 507, Short.MAX_VALUE)))
         );
@@ -169,7 +168,7 @@
                 
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                     .addComponent(repositoryLabel)
                     .addComponent(repositoryComboBox, 
javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, 
javax.swing.GroupLayout.PREFERRED_SIZE)
-                    .addComponent(jButton2, 
javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, 
javax.swing.GroupLayout.PREFERRED_SIZE))
+                    .addComponent(newButton, 
javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, 
javax.swing.GroupLayout.PREFERRED_SIZE))
                 
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                 
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                     .addComponent(jPanel1, 
javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, 
javax.swing.GroupLayout.PREFERRED_SIZE)
@@ -180,19 +179,19 @@
                     .addComponent(descriptionLabel)))
         );
 
-        
jButton2.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(AttachPanel.class,
 "AttachPanel.jButton2.AccessibleContext.accessibleDescription")); // NOI18N
+        
newButton.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(AttachPanel.class,
 "AttachPanel.newButton.AccessibleContext.accessibleDescription")); // NOI18N
         
repositoryComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(AttachPanel.class,
 "AttachPanel.repositoryComboBox.AccessibleContext.accessibleDescription")); 
// NOI18N
         
descriptionTextField.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(AttachPanel.class,
 
"AttachPanel.descriptionTextField.AccessibleContext.accessibleDescription")); 
// NOI18N
     }// </editor-fold>//GEN-END:initComponents
 
-    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) 
{//GEN-FIRST:event_jButton2ActionPerformed
+    private void newButtonActionPerformed(java.awt.event.ActionEvent evt) 
{//GEN-FIRST:event_newButtonActionPerformed
         Repository repo = RepositoryManager.getInstance().createRepository();
         if(repo == null) {
             return;
         }
         repositoryComboBox.addItem(repo);
         repositoryComboBox.setSelectedItem(repo);
-    }//GEN-LAST:event_jButton2ActionPerformed
+    }//GEN-LAST:event_newButtonActionPerformed
 
 
     // Variables declaration - do not modify//GEN-BEGIN:variables
@@ -201,9 +200,9 @@
     final javax.swing.JTextField descriptionTextField = new 
javax.swing.JTextField();
     private javax.swing.JLabel issueLabel;
     private javax.swing.JPanel issuePanel;
-    private org.netbeans.modules.versioning.util.WideButton jButton2;
     private javax.swing.JLabel jLabel2;
     private javax.swing.JPanel jPanel1;
+    private org.netbeans.modules.versioning.util.WideButton newButton;
     final javax.swing.JComboBox repositoryComboBox = new 
javax.swing.JComboBox();
     private javax.swing.JLabel repositoryLabel;
     // End of variables declaration//GEN-END:variables
@@ -248,6 +247,7 @@
 
         repositoryLabel.setEnabled(enabled);
         repositoryComboBox.setEnabled(enabled);
+        newButton.setEnabled(enabled);
     }
 
     private void enableFields() {
diff --git 
a/bugtracking.bridge/src/org/netbeans/modules/bugtracking/bridge/exportdiff/Bundle.properties
 
b/bugtracking.bridge/src/org/netbeans/modules/bugtracking/bridge/exportdiff/Bundle.properties
--- 
a/bugtracking.bridge/src/org/netbeans/modules/bugtracking/bridge/exportdiff/Bundle.properties
+++ 
b/bugtracking.bridge/src/org/netbeans/modules/bugtracking/bridge/exportdiff/Bundle.properties
@@ -64,5 +64,6 @@
 AttachPanel.descriptionTextField.text=
 AttachPanel.descriptionLabel.text=&Description:
 AttachPanel.repositoryComboBox.AccessibleContext.accessibleDescription=N/A
-AttachPanel.jButton2.AccessibleContext.accessibleDescription=N/A
 AttachPanel.descriptionTextField.AccessibleContext.accessibleDescription=N/A
+AttachPanel.newButton.text=&New
+AttachPanel.newButton.AccessibleContext.accessibleDescription=N/A

[hg] main-silver: disable also the new button if attach patch no...

Tomas Stupka 03/13/2013

Project Features

About this Project

ConnectedDeveloper was started in November 2009, is owned by tpavek, and has 66 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close