[hg] main-silver: #224943 - org.netbeans.modules.options.editor ...

  • From: Miloslav Metelka < >
  • To:
  • Subject: [hg] main-silver: #224943 - org.netbeans.modules.options.editor ...
  • Date: Wed, 16 Jan 2013 12:07:37 -0800

changeset b83487d1d1e8 in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/b83487d1d1e8
description:
        #224943 - org.netbeans.modules.options.editor depends on deprecated 
jdesktop layout.

diffstat:

 options.editor/nbproject/project.xml                                         
        |   9 -
 
options.editor/src/org/netbeans/modules/options/editor/onsave/OnSaveCommonPanel.form
 |  70 +++------
 
options.editor/src/org/netbeans/modules/options/editor/onsave/OnSaveCommonPanel.java
 |  71 +++++----
 
options.editor/src/org/netbeans/modules/options/editor/onsave/OnSaveTabPanel.java
    |   4 +-
 4 files changed, 65 insertions(+), 89 deletions(-)

diffs (269 lines):

diff --git a/options.editor/nbproject/project.xml 
b/options.editor/nbproject/project.xml
--- a/options.editor/nbproject/project.xml
+++ b/options.editor/nbproject/project.xml
@@ -50,15 +50,6 @@
             
<code-name-base>org.netbeans.modules.options.editor</code-name-base>
             <module-dependencies>
                 <dependency>
-                    <code-name-base>org.jdesktop.layout</code-name-base>
-                    <build-prerequisite/>
-                    <compile-dependency/>
-                    <run-dependency>
-                        <release-version>1</release-version>
-                        <specification-version>1.22</specification-version>
-                    </run-dependency>
-                </dependency>
-                <dependency>
                     
<code-name-base>org.netbeans.modules.editor</code-name-base>
                     <build-prerequisite/>
                     <compile-dependency/>
diff --git 
a/options.editor/src/org/netbeans/modules/options/editor/onsave/OnSaveCommonPanel.form
 
b/options.editor/src/org/netbeans/modules/options/editor/onsave/OnSaveCommonPanel.form
--- 
a/options.editor/src/org/netbeans/modules/options/editor/onsave/OnSaveCommonPanel.form
+++ 
b/options.editor/src/org/netbeans/modules/options/editor/onsave/OnSaveCommonPanel.form
@@ -11,51 +11,10 @@
     <AuxValue name="FormSettings_listenerGenerationStyle" 
type="java.lang.Integer" value="0"/>
     <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" 
value="false"/>
     <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" 
value="2"/>
+    <AuxValue name="designerSize" type="java.awt.Dimension" 
value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,0,106,0,0,1,83"/>
   </AuxValues>
 
-  <Layout>
-    <DimensionLayout dim="0">
-      <Group type="103" groupAlignment="0" attributes="0">
-          <Group type="102" attributes="0">
-              <EmptySpace min="-2" pref="29" max="-2" attributes="0"/>
-              <Group type="103" groupAlignment="0" attributes="0">
-                  <Component id="lReformat" min="-2" pref="254" max="-2" 
attributes="0"/>
-                  <Component id="lRemoveTrailingWhitespace" alignment="0" 
min="-2" pref="254" max="-2" attributes="0"/>
-              </Group>
-              <EmptySpace min="-2" max="-2" attributes="0"/>
-              <Group type="103" groupAlignment="0" attributes="0">
-                  <Component id="cboReformat" min="-2" max="-2" 
attributes="0"/>
-                  <Component id="cboRemoveTrailingWhitespace" min="-2" 
max="-2" attributes="0"/>
-              </Group>
-              <EmptySpace min="-2" max="-2" attributes="0"/>
-          </Group>
-          <Group type="102" attributes="0">
-              <EmptySpace max="-2" attributes="0"/>
-              <Component id="cbUseGlobalSettings" max="32767" 
attributes="0"/>
-              <EmptySpace max="-2" attributes="0"/>
-          </Group>
-      </Group>
-    </DimensionLayout>
-    <DimensionLayout dim="1">
-      <Group type="103" groupAlignment="0" attributes="0">
-          <Group type="102" alignment="0" attributes="0">
-              <EmptySpace min="-2" max="-2" attributes="0"/>
-              <Component id="cbUseGlobalSettings" min="-2" max="-2" 
attributes="0"/>
-              <EmptySpace min="-2" max="-2" attributes="0"/>
-              <Group type="103" groupAlignment="3" attributes="0">
-                  <Component id="lReformat" alignment="3" min="-2" max="-2" 
attributes="0"/>
-                  <Component id="cboReformat" alignment="3" min="-2" 
max="-2" attributes="0"/>
-              </Group>
-              <EmptySpace min="-2" max="-2" attributes="0"/>
-              <Group type="103" groupAlignment="3" attributes="0">
-                  <Component id="lRemoveTrailingWhitespace" alignment="3" 
min="-2" max="-2" attributes="0"/>
-                  <Component id="cboRemoveTrailingWhitespace" alignment="3" 
min="-2" max="-2" attributes="0"/>
-              </Group>
-              <EmptySpace min="-2" max="-2" attributes="0"/>
-          </Group>
-      </Group>
-    </DimensionLayout>
-  </Layout>
+  <Layout 
class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
   <SubComponents>
     <Component class="javax.swing.JCheckBox" name="cbUseGlobalSettings">
       <Properties>
@@ -64,6 +23,11 @@
       <Events>
         <EventHandler event="actionPerformed" 
listener="java.awt.event.ActionListener" 
parameters="java.awt.event.ActionEvent" 
handler="cbUseGlobalSettingsActionPerformed"/>
       </Events>
+      <Constraints>
+        <Constraint 
layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" 
value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+          <GridBagConstraints gridX="0" gridY="0" gridWidth="0" 
gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="8" insetsLeft="8" 
insetsBottom="0" insetsRight="8" anchor="18" weightX="0.0" weightY="0.0"/>
+        </Constraint>
+      </Constraints>
     </Component>
     <Component class="javax.swing.JLabel" name="lReformat">
       <Properties>
@@ -72,6 +36,11 @@
         </Property>
         <Property name="text" type="java.lang.String" value="Reformat:"/>
       </Properties>
+      <Constraints>
+        <Constraint 
layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" 
value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+          <GridBagConstraints gridX="0" gridY="1" gridWidth="1" 
gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="8" insetsLeft="30" 
insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/>
+        </Constraint>
+      </Constraints>
     </Component>
     <Component class="javax.swing.JComboBox" name="cboReformat">
       <Properties>
@@ -82,6 +51,11 @@
       <Events>
         <EventHandler event="actionPerformed" 
listener="java.awt.event.ActionListener" 
parameters="java.awt.event.ActionEvent" handler="cboReformatActionPerformed"/>
       </Events>
+      <Constraints>
+        <Constraint 
layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" 
value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+          <GridBagConstraints gridX="1" gridY="1" gridWidth="0" 
gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="2" insetsLeft="12" 
insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/>
+        </Constraint>
+      </Constraints>
     </Component>
     <Component class="javax.swing.JLabel" name="lRemoveTrailingWhitespace">
       <Properties>
@@ -90,6 +64,11 @@
         </Property>
         <Property name="text" type="java.lang.String" value="Remove Trailing 
Whitespace From:"/>
       </Properties>
+      <Constraints>
+        <Constraint 
layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" 
value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+          <GridBagConstraints gridX="0" gridY="2" gridWidth="1" 
gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="8" insetsLeft="30" 
insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/>
+        </Constraint>
+      </Constraints>
     </Component>
     <Component class="javax.swing.JComboBox" 
name="cboRemoveTrailingWhitespace">
       <Properties>
@@ -100,6 +79,11 @@
       <Events>
         <EventHandler event="actionPerformed" 
listener="java.awt.event.ActionListener" 
parameters="java.awt.event.ActionEvent" 
handler="cboRemoveTrailingWhitespaceActionPerformed"/>
       </Events>
+      <Constraints>
+        <Constraint 
layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" 
value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+          <GridBagConstraints gridX="1" gridY="2" gridWidth="0" 
gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="2" insetsLeft="12" 
insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/>
+        </Constraint>
+      </Constraints>
     </Component>
   </SubComponents>
 </Form>
diff --git 
a/options.editor/src/org/netbeans/modules/options/editor/onsave/OnSaveCommonPanel.java
 
b/options.editor/src/org/netbeans/modules/options/editor/onsave/OnSaveCommonPanel.java
--- 
a/options.editor/src/org/netbeans/modules/options/editor/onsave/OnSaveCommonPanel.java
+++ 
b/options.editor/src/org/netbeans/modules/options/editor/onsave/OnSaveCommonPanel.java
@@ -134,6 +134,7 @@
     @SuppressWarnings("unchecked")
     // <editor-fold defaultstate="collapsed" desc="Generated 
Code">//GEN-BEGIN:initComponents
     private void initComponents() {
+        java.awt.GridBagConstraints gridBagConstraints;
 
         cbUseGlobalSettings = new javax.swing.JCheckBox();
         lReformat = new javax.swing.JLabel();
@@ -141,65 +142,65 @@
         lRemoveTrailingWhitespace = new javax.swing.JLabel();
         cboRemoveTrailingWhitespace = new javax.swing.JComboBox();
 
+        setLayout(new java.awt.GridBagLayout());
+
         cbUseGlobalSettings.setText("Use All Languages Settings");
         cbUseGlobalSettings.addActionListener(new 
java.awt.event.ActionListener() {
             public void actionPerformed(java.awt.event.ActionEvent evt) {
                 cbUseGlobalSettingsActionPerformed(evt);
             }
         });
+        gridBagConstraints = new java.awt.GridBagConstraints();
+        gridBagConstraints.gridx = 0;
+        gridBagConstraints.gridy = 0;
+        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
+        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
+        gridBagConstraints.insets = new java.awt.Insets(8, 8, 0, 8);
+        add(cbUseGlobalSettings, gridBagConstraints);
 
         lReformat.setLabelFor(cboReformat);
         lReformat.setText("Reformat:");
+        gridBagConstraints = new java.awt.GridBagConstraints();
+        gridBagConstraints.gridx = 0;
+        gridBagConstraints.gridy = 1;
+        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
+        gridBagConstraints.insets = new java.awt.Insets(8, 30, 0, 0);
+        add(lReformat, gridBagConstraints);
 
         cboReformat.addActionListener(new java.awt.event.ActionListener() {
             public void actionPerformed(java.awt.event.ActionEvent evt) {
                 cboReformatActionPerformed(evt);
             }
         });
+        gridBagConstraints = new java.awt.GridBagConstraints();
+        gridBagConstraints.gridx = 1;
+        gridBagConstraints.gridy = 1;
+        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
+        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
+        gridBagConstraints.insets = new java.awt.Insets(2, 12, 0, 0);
+        add(cboReformat, gridBagConstraints);
 
         lRemoveTrailingWhitespace.setLabelFor(cboRemoveTrailingWhitespace);
         lRemoveTrailingWhitespace.setText("Remove Trailing Whitespace 
From:");
+        gridBagConstraints = new java.awt.GridBagConstraints();
+        gridBagConstraints.gridx = 0;
+        gridBagConstraints.gridy = 2;
+        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
+        gridBagConstraints.insets = new java.awt.Insets(8, 30, 0, 0);
+        add(lRemoveTrailingWhitespace, gridBagConstraints);
 
         cboRemoveTrailingWhitespace.addActionListener(new 
java.awt.event.ActionListener() {
             public void actionPerformed(java.awt.event.ActionEvent evt) {
                 cboRemoveTrailingWhitespaceActionPerformed(evt);
             }
         });
-
-        org.jdesktop.layout.GroupLayout layout = new 
org.jdesktop.layout.GroupLayout(this);
-        this.setLayout(layout);
-        layout.setHorizontalGroup(
-            
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
-            .add(layout.createSequentialGroup()
-                .add(29, 29, 29)
-                
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
-                    .add(lReformat, 
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 254, 
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
-                    .add(lRemoveTrailingWhitespace, 
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 254, 
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
-                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
-                
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
-                    .add(cboReformat, 
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
-                    .add(cboRemoveTrailingWhitespace, 
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
-                .addContainerGap())
-            .add(layout.createSequentialGroup()
-                .addContainerGap()
-                .add(cbUseGlobalSettings, 
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                .addContainerGap())
-        );
-        layout.setVerticalGroup(
-            
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
-            .add(layout.createSequentialGroup()
-                .addContainerGap()
-                .add(cbUseGlobalSettings)
-                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
-                
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
-                    .add(lReformat)
-                    .add(cboReformat, 
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
-                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
-                
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
-                    .add(lRemoveTrailingWhitespace)
-                    .add(cboRemoveTrailingWhitespace, 
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
-                .addContainerGap())
-        );
+        gridBagConstraints = new java.awt.GridBagConstraints();
+        gridBagConstraints.gridx = 1;
+        gridBagConstraints.gridy = 2;
+        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
+        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
+        gridBagConstraints.insets = new java.awt.Insets(2, 12, 0, 0);
+        add(cboRemoveTrailingWhitespace, gridBagConstraints);
     }// </editor-fold>//GEN-END:initComponents
 
     private void 
cboRemoveTrailingWhitespaceActionPerformed(java.awt.event.ActionEvent evt) 
{//GEN-FIRST:event_cboRemoveTrailingWhitespaceActionPerformed
diff --git 
a/options.editor/src/org/netbeans/modules/options/editor/onsave/OnSaveTabPanel.java
 
b/options.editor/src/org/netbeans/modules/options/editor/onsave/OnSaveTabPanel.java
--- 
a/options.editor/src/org/netbeans/modules/options/editor/onsave/OnSaveTabPanel.java
+++ 
b/options.editor/src/org/netbeans/modules/options/editor/onsave/OnSaveTabPanel.java
@@ -84,7 +84,7 @@
         
         commonPanel = new OnSaveCommonPanel();
         commonPanelContainer.setLayout(new BorderLayout());
-        commonPanelContainer.add(commonPanel, BorderLayout.CENTER);
+        commonPanelContainer.add(commonPanel, BorderLayout.WEST);
         
         customPanelContainer.setLayout(new BorderLayout());
     }
@@ -208,7 +208,7 @@
         customPanelContainer.removeAll();
         PreferencesCustomizer c = selector.getSelectedCustomizer();
         if (c != null) {
-            customPanelContainer.add(c.getComponent(), BorderLayout.CENTER);
+            customPanelContainer.add(c.getComponent(), BorderLayout.WEST);
         }
         customPanelContainer.setVisible(true);
     }

[hg] main-silver: #224943 - org.netbeans.modules.options.editor ...

Miloslav Metelka 01/16/2013

Project Features

About this Project

Editor was started in November 2009, is owned by Martin Ryzl, and has 147 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close