Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hint/Inspection panel and dialog layout fixes #3472

Merged
merged 2 commits into from
Jan 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<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,-109,0,0,2,71"/>
<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,-125,0,0,1,-96"/>
</AuxValues>

<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
Expand All @@ -47,6 +47,10 @@
<ResourceString bundle="org/netbeans/modules/analysis/Bundle.properties" key="RunAnalysisPanel.jLabel1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<AuxValues>
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
</AuxValues>
<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="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="1280" weightX="0.0" weightY="0.0"/>
Expand All @@ -61,7 +65,7 @@
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="1" gridY="0" gridWidth="3" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="12" insetsBottom="0" insetsRight="0" anchor="1280" weightX="0.0" weightY="0.0"/>
<GridBagConstraints gridX="1" gridY="0" gridWidth="3" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="12" insetsBottom="0" insetsRight="0" anchor="1280" weightX="1.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
Expand All @@ -71,6 +75,10 @@
<ResourceString bundle="org/netbeans/modules/analysis/Bundle.properties" key="RunAnalysisPanel.jLabel2.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<AuxValues>
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
</AuxValues>
<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="12" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="1280" weightX="0.0" weightY="0.0"/>
Expand All @@ -88,7 +96,7 @@
</Events>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="2" gridY="1" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="12" insetsLeft="12" insetsBottom="0" insetsRight="0" anchor="1280" weightX="0.0" weightY="0.0"/>
<GridBagConstraints gridX="2" gridY="1" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="12" insetsLeft="12" insetsBottom="0" insetsRight="0" anchor="1280" weightX="1.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
Expand Down Expand Up @@ -154,7 +162,7 @@
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="2" gridY="2" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="12" insetsLeft="12" insetsBottom="0" insetsRight="0" anchor="256" weightX="0.0" weightY="0.0"/>
<GridBagConstraints gridX="2" gridY="2" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="12" insetsLeft="12" insetsBottom="0" insetsRight="0" anchor="256" weightX="1.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
Expand All @@ -173,5 +181,18 @@
</Constraint>
</Constraints>
</Component>
<Container class="javax.swing.JPanel" name="emptyPanel">
<AuxValues>
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
</AuxValues>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="-1" gridY="3" gridWidth="4" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="1.0"/>
</Constraint>
</Constraints>

<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
</Container>
</SubComponents>
</Form>
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import java.awt.CardLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.GridBagConstraints;
Expand Down Expand Up @@ -101,7 +102,7 @@
*/
public final class RunAnalysisPanel extends javax.swing.JPanel implements LookupListener {

private static final String COMBO_PROTOTYPE = "999999999999999999999999999999999999999999999999999999999999";
private static final String COMBO_PROTOTYPE = "999999999999999999999999999999999999";
private static final RequestProcessor WORKER = new RequestProcessor(RunAnalysisPanel.class.getName(), 1, false, false);
private final JPanel progress;
private final RequiredPluginsPanel requiredPlugins;
Expand Down Expand Up @@ -543,15 +544,16 @@ private void initComponents() {
java.awt.GridBagConstraints gridBagConstraints;

radioButtons = new javax.swing.ButtonGroup();
jLabel1 = new javax.swing.JLabel();
javax.swing.JLabel jLabel1 = new javax.swing.JLabel();
scopeCombo = new javax.swing.JComboBox();
jLabel2 = new javax.swing.JLabel();
javax.swing.JLabel jLabel2 = new javax.swing.JLabel();
configurationCombo = new javax.swing.JComboBox();
manage = new javax.swing.JButton();
configurationRadio = new javax.swing.JRadioButton();
singleInspectionRadio = new javax.swing.JRadioButton();
inspectionCombo = new javax.swing.JComboBox();
browse = new javax.swing.JButton();
javax.swing.JPanel emptyPanel = new javax.swing.JPanel();

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

Expand All @@ -568,6 +570,7 @@ private void initComponents() {
gridBagConstraints.gridwidth = 3;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.anchor = java.awt.GridBagConstraints.ABOVE_BASELINE_LEADING;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.insets = new java.awt.Insets(0, 12, 0, 0);
add(scopeCombo, gridBagConstraints);

Expand All @@ -590,6 +593,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
gridBagConstraints.gridy = 1;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.anchor = java.awt.GridBagConstraints.ABOVE_BASELINE_LEADING;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.insets = new java.awt.Insets(12, 12, 0, 0);
add(configurationCombo, gridBagConstraints);

Expand Down Expand Up @@ -640,6 +644,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
gridBagConstraints.gridy = 2;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.anchor = java.awt.GridBagConstraints.BASELINE;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.insets = new java.awt.Insets(12, 12, 0, 0);
add(inspectionCombo, gridBagConstraints);

Expand All @@ -656,6 +661,12 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
gridBagConstraints.anchor = java.awt.GridBagConstraints.BASELINE;
gridBagConstraints.insets = new java.awt.Insets(12, 12, 0, 0);
add(browse, gridBagConstraints);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridy = 3;
gridBagConstraints.gridwidth = 4;
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
gridBagConstraints.weighty = 1.0;
add(emptyPanel, gridBagConstraints);
}// </editor-fold>//GEN-END:initComponents

private void configurationComboActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_configurationComboActionPerformed
Expand All @@ -672,6 +683,7 @@ private AdjustConfigurationPanel showConfigurationPanel(AnalyzerFactory preselec
}
};
AdjustConfigurationPanel panel = new AdjustConfigurationPanel(analyzers, preselectedAnalyzer, preselected, configurationToSelect, errorListener);
panel.setPreferredSize(new Dimension(700, 300));
DialogDescriptor nd = new DialogDescriptor(panel, Bundle.LBL_Configurations(), true, NotifyDescriptor.OK_CANCEL_OPTION, NotifyDescriptor.OK_OPTION, null);

nls[0] = nd.createNotificationLineSupport();
Expand Down Expand Up @@ -727,8 +739,6 @@ private void browseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:
private javax.swing.JComboBox configurationCombo;
private javax.swing.JRadioButton configurationRadio;
private javax.swing.JComboBox inspectionCombo;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JButton manage;
private javax.swing.ButtonGroup radioButtons;
private javax.swing.JComboBox scopeCombo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="configurationCombo" pref="254" max="32767" attributes="0"/>
<Component id="configurationCombo" pref="220" max="32767" attributes="0"/>
<Component id="analyzerCombo" max="32767" attributes="0"/>
</Group>
</Group>
Expand All @@ -70,8 +70,8 @@
<Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="analyzerCombo" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Component id="analyzerPanel" pref="198" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="analyzerPanel" pref="180" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Window;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
Expand All @@ -41,7 +40,6 @@
import javax.swing.DefaultListCellRenderer;
import javax.swing.JComponent;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import org.netbeans.modules.analysis.Configuration;
import org.netbeans.modules.analysis.ConfigurationsManager;
Expand Down Expand Up @@ -281,7 +279,7 @@ private void initComponents() {
.addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(configurationCombo, 0, 254, Short.MAX_VALUE)
.addComponent(configurationCombo, 0, 220, Short.MAX_VALUE)
.addComponent(analyzerCombo, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
.addContainerGap())
);
Expand All @@ -296,8 +294,8 @@ private void initComponents() {
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel2)
.addComponent(analyzerCombo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addComponent(analyzerPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 198, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(analyzerPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 180, Short.MAX_VALUE)
.addContainerGap())
);
}// </editor-fold>//GEN-END:initComponents
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,13 @@
<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,1,-116,0,0,3,9"/>
<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,1,-35,0,0,3,66"/>
</AuxValues>

<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
<SubComponents>
<Container class="javax.swing.JSplitPane" name="jSplitPane1">
<Properties>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="null"/>
</Property>
<Property name="dividerLocation" type="int" value="320"/>
</Properties>
<Constraints>
Expand Down Expand Up @@ -127,15 +124,15 @@
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="optionsPanel" max="32767" attributes="0"/>
<Component id="descriptionPanel" alignment="0" pref="430" max="32767" attributes="0"/>
<Component id="descriptionPanel" alignment="0" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Component id="optionsPanel" pref="109" max="32767" attributes="0"/>
<EmptySpace min="-2" pref="12" max="-2" attributes="0"/>
<Component id="descriptionPanel" pref="186" max="32767" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<Component id="optionsPanel" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="descriptionPanel" pref="314" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
Expand Down Expand Up @@ -277,7 +274,7 @@
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="1" attributes="0">
<Component id="openInEditor" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="195" max="32767" attributes="0"/>
<EmptySpace pref="212" max="32767" attributes="0"/>
<Component id="saveButton" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="cancelEdit" min="-2" max="-2" attributes="0"/>
Expand Down Expand Up @@ -463,7 +460,7 @@
<Group type="102" alignment="0" attributes="0">
<Component id="configLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="configCombo" pref="683" max="32767" attributes="0"/>
<Component id="configCombo" pref="719" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
Expand Down Expand Up @@ -503,7 +500,7 @@
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="1" attributes="0">
<Component id="refactoringsLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="540" max="32767" attributes="0"/>
<EmptySpace pref="576" max="32767" attributes="0"/>
<Component id="searchLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="searchTextField" min="-2" pref="121" max="-2" attributes="0"/>
Expand Down
Loading