Skip to content

Commit

Permalink
Fix Options panel
Browse files Browse the repository at this point in the history
  • Loading branch information
junichi11 committed Mar 4, 2014
1 parent 2664c4d commit a5c080b
Show file tree
Hide file tree
Showing 3 changed files with 111 additions and 64 deletions.
1 change: 1 addition & 0 deletions src/org/cakephp/netbeans/options/Bundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,4 @@ CakePhpOptionsPanel.testLabel.text=Test:
CakePhpOptionsPanel.testStderrCheckBox.toolTipText=Add --stderr option to custom phpunit script
CakePhpOptionsPanel.testStderrCheckBox.text=--stderr
CakePhpOptionsPanel.notificationLabel.text=Notification:
CakePhpOptionsPanel.nodePanel.TabConstraints.tabTitle=Nodes
111 changes: 70 additions & 41 deletions src/org/cakephp/netbeans/options/CakePhpOptionsPanel.form
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="optionsTabbedPane" min="-2" pref="450" max="-2" attributes="0"/>
<Component id="optionsTabbedPane" alignment="0" pref="286" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
</Layout>
Expand Down Expand Up @@ -69,18 +69,12 @@
<Component id="jSeparator1" max="32767" attributes="0"/>
</Group>
<Group type="102" attributes="0">
<EmptySpace min="12" pref="12" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="customNodesLabel" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="jScrollPane1" alignment="0" min="-2" max="-2" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="12" pref="12" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="notifyAutoDetectionCheckBox" min="-2" max="-2" attributes="0"/>
<Component id="notifyNewVersionCheckBox" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<Component id="notifyAutoDetectionCheckBox" min="-2" max="-2" attributes="0"/>
<Component id="notifyNewVersionCheckBox" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
<EmptySpace min="0" pref="324" max="32767" attributes="0"/>
</Group>
</Group>
<EmptySpace min="-2" pref="12" max="-2" attributes="0"/>
Expand Down Expand Up @@ -135,11 +129,7 @@
</Group>
<EmptySpace max="-2" attributes="0"/>
<Component id="testStderrCheckBox" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="customNodesLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="jScrollPane1" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="17" max="32767" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
Expand Down Expand Up @@ -203,29 +193,6 @@
</Property>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="customNodesLabel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/cakephp/netbeans/options/Bundle.properties" key="CakePhpOptionsPanel.customNodesLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
<AuxValues>
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
</AuxValues>

<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
<SubComponents>
<Component class="javax.swing.JList" name="customNodesList">
<Properties>
<Property name="model" type="javax.swing.ListModel" editor="org.netbeans.modules.form.editors2.ListModelEditor">
<StringArray count="0"/>
</Property>
</Properties>
</Component>
</SubComponents>
</Container>
<Component class="javax.swing.JSeparator" name="jSeparator1">
</Component>
<Component class="javax.swing.JLabel" name="testLabel">
Expand Down Expand Up @@ -298,7 +265,7 @@
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="installingComposerLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="jScrollPane3" pref="331" max="32767" attributes="0"/>
<Component id="jScrollPane3" pref="167" max="32767" attributes="0"/>
<EmptySpace min="-2" pref="6" max="-2" attributes="0"/>
</Group>
</Group>
Expand Down Expand Up @@ -409,7 +376,7 @@
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jScrollPane2" pref="364" max="32767" attributes="0"/>
<Component id="jScrollPane2" pref="202" max="32767" attributes="0"/>
<Group type="102" attributes="0">
<Component id="addButton" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
Expand Down Expand Up @@ -500,6 +467,68 @@
</Component>
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="nodePanel">
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
<JTabbedPaneConstraints tabName="Nodes">
<Property name="tabTitle" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/cakephp/netbeans/options/Bundle.properties" key="CakePhpOptionsPanel.nodePanel.TabConstraints.tabTitle" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</JTabbedPaneConstraints>
</Constraint>
</Constraints>

<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="customNodesLabel" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="jScrollPane1" alignment="0" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace pref="435" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="customNodesLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="jScrollPane1" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="84" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="javax.swing.JLabel" name="customNodesLabel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/cakephp/netbeans/options/Bundle.properties" key="CakePhpOptionsPanel.customNodesLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
<AuxValues>
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
</AuxValues>

<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
<SubComponents>
<Component class="javax.swing.JList" name="customNodesList">
<Properties>
<Property name="model" type="javax.swing.ListModel" editor="org.netbeans.modules.form.editors2.ListModelEditor">
<StringArray count="0"/>
</Property>
</Properties>
</Component>
</SubComponents>
</Container>
</SubComponents>
</Container>
</SubComponents>
</Container>
</SubComponents>
Expand Down
63 changes: 40 additions & 23 deletions src/org/cakephp/netbeans/options/CakePhpOptionsPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,6 @@ private void initComponents() {
notificationLabel = new javax.swing.JLabel();
notifyNewVersionCheckBox = new javax.swing.JCheckBox();
notifyAutoDetectionCheckBox = new javax.swing.JCheckBox();
customNodesLabel = new javax.swing.JLabel();
jScrollPane1 = new javax.swing.JScrollPane();
customNodesList = new javax.swing.JList();
jSeparator1 = new javax.swing.JSeparator();
testLabel = new javax.swing.JLabel();
testStderrCheckBox = new javax.swing.JCheckBox();
Expand All @@ -168,6 +165,10 @@ private void initComponents() {
addButton = new javax.swing.JButton();
editButton = new javax.swing.JButton();
deleteButton = new javax.swing.JButton();
nodePanel = new javax.swing.JPanel();
customNodesLabel = new javax.swing.JLabel();
jScrollPane1 = new javax.swing.JScrollPane();
customNodesList = new javax.swing.JList();

org.openide.awt.Mnemonics.setLocalizedText(defaultLabel, org.openide.util.NbBundle.getMessage(CakePhpOptionsPanel.class, "CakePhpOptionsPanel.defaultLabel.text")); // NOI18N

Expand Down Expand Up @@ -196,10 +197,6 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {

org.openide.awt.Mnemonics.setLocalizedText(notifyAutoDetectionCheckBox, org.openide.util.NbBundle.getMessage(CakePhpOptionsPanel.class, "CakePhpOptionsPanel.notifyAutoDetectionCheckBox.text")); // NOI18N

org.openide.awt.Mnemonics.setLocalizedText(customNodesLabel, org.openide.util.NbBundle.getMessage(CakePhpOptionsPanel.class, "CakePhpOptionsPanel.customNodesLabel.text")); // NOI18N

jScrollPane1.setViewportView(customNodesList);

org.openide.awt.Mnemonics.setLocalizedText(testLabel, org.openide.util.NbBundle.getMessage(CakePhpOptionsPanel.class, "CakePhpOptionsPanel.testLabel.text")); // NOI18N

org.openide.awt.Mnemonics.setLocalizedText(testStderrCheckBox, org.openide.util.NbBundle.getMessage(CakePhpOptionsPanel.class, "CakePhpOptionsPanel.testStderrCheckBox.text")); // NOI18N
Expand Down Expand Up @@ -230,15 +227,11 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jSeparator1))
.addGroup(generalPanelLayout.createSequentialGroup()
.addGap(12, 12, 12)
.addGroup(generalPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(customNodesLabel)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(generalPanelLayout.createSequentialGroup()
.addGap(12, 12, 12)
.addGroup(generalPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(notifyAutoDetectionCheckBox)
.addComponent(notifyNewVersionCheckBox))))
.addGap(0, 0, Short.MAX_VALUE)))
.addComponent(notifyAutoDetectionCheckBox)
.addComponent(notifyNewVersionCheckBox))
.addGap(0, 324, Short.MAX_VALUE)))
.addGap(12, 12, 12))
.addGroup(generalPanelLayout.createSequentialGroup()
.addGroup(generalPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
Expand Down Expand Up @@ -279,11 +272,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
.addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(testStderrCheckBox)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(customNodesLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(17, Short.MAX_VALUE))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);

notificationLabel.getAccessibleContext().setAccessibleParent(this);
Expand Down Expand Up @@ -346,7 +335,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(installingComposerLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 331, Short.MAX_VALUE)
.addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 167, Short.MAX_VALUE)
.addGap(6, 6, 6))
);

Expand Down Expand Up @@ -414,7 +403,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
.addComponent(messageLabel))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(pluginsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 364, Short.MAX_VALUE)
.addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 202, Short.MAX_VALUE)
.addGroup(pluginsPanelLayout.createSequentialGroup()
.addComponent(addButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
Expand All @@ -427,6 +416,33 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {

optionsTabbedPane.addTab(org.openide.util.NbBundle.getMessage(CakePhpOptionsPanel.class, "CakePhpOptionsPanel.pluginsPanel.TabConstraints.tabTitle"), pluginsPanel); // NOI18N

org.openide.awt.Mnemonics.setLocalizedText(customNodesLabel, org.openide.util.NbBundle.getMessage(CakePhpOptionsPanel.class, "CakePhpOptionsPanel.customNodesLabel.text")); // NOI18N

jScrollPane1.setViewportView(customNodesList);

javax.swing.GroupLayout nodePanelLayout = new javax.swing.GroupLayout(nodePanel);
nodePanel.setLayout(nodePanelLayout);
nodePanelLayout.setHorizontalGroup(
nodePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(nodePanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(nodePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(customNodesLabel)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(435, Short.MAX_VALUE))
);
nodePanelLayout.setVerticalGroup(
nodePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(nodePanelLayout.createSequentialGroup()
.addContainerGap()
.addComponent(customNodesLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(84, Short.MAX_VALUE))
);

optionsTabbedPane.addTab(org.openide.util.NbBundle.getMessage(CakePhpOptionsPanel.class, "CakePhpOptionsPanel.nodePanel.TabConstraints.tabTitle"), nodePanel); // NOI18N

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
Expand All @@ -435,7 +451,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(optionsTabbedPane, javax.swing.GroupLayout.PREFERRED_SIZE, 450, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(optionsTabbedPane, javax.swing.GroupLayout.DEFAULT_SIZE, 286, Short.MAX_VALUE)
);
}// </editor-fold>//GEN-END:initComponents

Expand Down Expand Up @@ -696,6 +712,7 @@ public void removePlugin(int index) {
private javax.swing.JTextField localFilePathTextField;
private javax.swing.JLabel messageLabel;
private javax.swing.JPanel newProjectPanel;
private javax.swing.JPanel nodePanel;
private javax.swing.JLabel notificationLabel;
private javax.swing.JCheckBox notifyAutoDetectionCheckBox;
private javax.swing.JCheckBox notifyNewVersionCheckBox;
Expand Down

0 comments on commit a5c080b

Please sign in to comment.