Skip to content

Commit 1647119

Browse files
authored
Material Editor overhaul (#389)
* icons and some ui tweaks for material editor * some layout changes to Material Editor * tweaked appearance of icons and components * fixing branch.. * reverting genfiles.properties * used two column grid for options. resized panels to fit. * fixing a bunch of aesthetic issues with the widgets. should be few options cut off, and boxes same size,etc
1 parent 9625985 commit 1647119

32 files changed

+1320
-720
lines changed
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
CTL_MaterialEditorAction=MaterialEditor
22
CTL_MaterialEditorTopComponent=MaterialEditor Window
33
HINT_MaterialEditorTopComponent=This is a MaterialEditor window
4-
MaterialEditorTopComponent.jLabel1.text=Material Definition
54
MaterialEditorTopComponent.jScrollPane1.TabConstraints.tabTitle=Source
65
MaterialEditorTopComponent.jScrollPane2.TabConstraints.tabTitle=Properties
7-
MaterialEditorTopComponent.jPanel4.TabConstraints.tabTitle=Editor
8-
MaterialEditorTopComponent.jLabel3.text=Name
6+
MaterialEditorTopComponent.jScrollPane10.TabConstraints.tabTitle=Additional RenderState
7+
MaterialEditorTopComponent.jCheckBox1.text=save immediately
98
MaterialEditorTopComponent.jTextField1.text=jTextField1
10-
MaterialEditorTopComponent.jScrollPane3.TabConstraints.tabTitle=Textures & Colors
11-
MaterialEditorTopComponent.jScrollPane9.TabConstraints.tabTitle=Additional RenderState
9+
MaterialEditorTopComponent.jLabel3.text=Name
10+
MaterialEditorTopComponent.jLabel1.text=Material Definition
1211
MaterialEditorTopComponent.jScrollPane2.TabConstraints.tabTitle_1=Options
13-
MaterialEditorTopComponent.jCheckBox1.text=save immediately
12+
MaterialEditorTopComponent.jScrollPane3.TabConstraints.tabTitle=Textures & Colors
13+
MaterialEditorTopComponent.editorPanel.TabConstraints.tabTitle=Editor
14+
MaterialEditorTopComponent.jScrollPane4.TabConstraints.tabTitle=Editor

jme3-materialeditor/src/com/jme3/gde/materials/multiview/MaterialEditorTopComponent.form

Lines changed: 295 additions & 213 deletions
Large diffs are not rendered by default.

jme3-materialeditor/src/com/jme3/gde/materials/multiview/MaterialEditorTopComponent.java

Lines changed: 118 additions & 73 deletions
Large diffs are not rendered by default.

jme3-materialeditor/src/com/jme3/gde/materials/multiview/widgets/BooleanPanel.form

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22

33
<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
4+
<Properties>
5+
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
6+
<Dimension value="[61, 27]"/>
7+
</Property>
8+
</Properties>
49
<AuxValues>
510
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
611
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
@@ -28,7 +33,6 @@
2833
<SubComponents>
2934
<Container class="javax.swing.JToolBar" name="jToolBar1">
3035
<Properties>
31-
<Property name="floatable" type="boolean" value="false"/>
3236
<Property name="rollover" type="boolean" value="true"/>
3337
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
3438
<Dimension value="[81, 27]"/>
@@ -42,35 +46,27 @@
4246
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
4347
<ResourceString bundle="com/jme3/gde/materials/multiview/widgets/Bundle.properties" key="BooleanPanel.jLabel1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
4448
</Property>
49+
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
50+
<Dimension value="[300, 17]"/>
51+
</Property>
4552
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
46-
<Dimension value="[100, 25]"/>
53+
<Dimension value="[150, 25]"/>
4754
</Property>
4855
</Properties>
4956
</Component>
50-
<Container class="javax.swing.JPanel" name="jPanel1">
57+
<Component class="javax.swing.Box$Filler" name="filler1">
5158
<Properties>
52-
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
53-
<Dimension value="[0, 0]"/>
59+
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
60+
<Dimension value="[32767, 0]"/>
5461
</Property>
55-
<Property name="opaque" type="boolean" value="false"/>
5662
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
57-
<Dimension value="[32767, 23]"/>
63+
<Dimension value="[20, 0]"/>
5864
</Property>
5965
</Properties>
60-
61-
<Layout>
62-
<DimensionLayout dim="0">
63-
<Group type="103" groupAlignment="0" attributes="0">
64-
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
65-
</Group>
66-
</DimensionLayout>
67-
<DimensionLayout dim="1">
68-
<Group type="103" groupAlignment="0" attributes="0">
69-
<EmptySpace min="0" pref="23" max="32767" attributes="0"/>
70-
</Group>
71-
</DimensionLayout>
72-
</Layout>
73-
</Container>
66+
<AuxValues>
67+
<AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.HorizontalGlue"/>
68+
</AuxValues>
69+
</Component>
7470
<Component class="javax.swing.JCheckBox" name="jCheckBox1">
7571
<Properties>
7672
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">

jme3-materialeditor/src/com/jme3/gde/materials/multiview/widgets/BooleanPanel.java

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -34,33 +34,18 @@ private void initComponents() {
3434

3535
jToolBar1 = new javax.swing.JToolBar();
3636
jLabel1 = new javax.swing.JLabel();
37-
jPanel1 = new javax.swing.JPanel();
37+
filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(20, 0), new java.awt.Dimension(32767, 0));
3838
jCheckBox1 = new javax.swing.JCheckBox();
3939

4040
jToolBar1.setFloatable(false);
4141
jToolBar1.setRollover(true);
4242
jToolBar1.setPreferredSize(new java.awt.Dimension(81, 27));
4343

4444
org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(BooleanPanel.class, "BooleanPanel.jLabel1.text")); // NOI18N
45-
jLabel1.setPreferredSize(new java.awt.Dimension(100, 25));
45+
jLabel1.setMaximumSize(new java.awt.Dimension(300, 17));
46+
jLabel1.setPreferredSize(new java.awt.Dimension(150, 25));
4647
jToolBar1.add(jLabel1);
47-
48-
jPanel1.setMinimumSize(new java.awt.Dimension(0, 0));
49-
jPanel1.setOpaque(false);
50-
jPanel1.setPreferredSize(new java.awt.Dimension(32767, 23));
51-
52-
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
53-
jPanel1.setLayout(jPanel1Layout);
54-
jPanel1Layout.setHorizontalGroup(
55-
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
56-
.addGap(0, 0, Short.MAX_VALUE)
57-
);
58-
jPanel1Layout.setVerticalGroup(
59-
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
60-
.addGap(0, 23, Short.MAX_VALUE)
61-
);
62-
63-
jToolBar1.add(jPanel1);
48+
jToolBar1.add(filler1);
6449

6550
org.openide.awt.Mnemonics.setLocalizedText(jCheckBox1, org.openide.util.NbBundle.getMessage(BooleanPanel.class, "BooleanPanel.jCheckBox1.text")); // NOI18N
6651
jCheckBox1.setFocusable(false);
@@ -114,9 +99,9 @@ public void run() {
11499
});
115100
}
116101
// Variables declaration - do not modify//GEN-BEGIN:variables
102+
private javax.swing.Box.Filler filler1;
117103
private javax.swing.JCheckBox jCheckBox1;
118104
private javax.swing.JLabel jLabel1;
119-
private javax.swing.JPanel jPanel1;
120105
private javax.swing.JToolBar jToolBar1;
121106
// End of variables declaration//GEN-END:variables
122107
}

jme3-materialeditor/src/com/jme3/gde/materials/multiview/widgets/Bundle.properties

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ ColorRGBADialog.alphaLabel.text=Alpha:
1313
# To change this template, choose Tools | Templates
1414
# and open the template in the editor.
1515
ColorPanel.jLabel1.text=jLabel1
16-
ColorPanel.jButton1.text=
1716
TexturePanel.jLabel1.text=jLabel1
18-
TexturePanel.jButton1.text=set...
1917
TexturePanel.jButton2.text=
2018
# To change this template, choose Tools | Templates
2119
# and open the template in the editor.
@@ -36,15 +34,6 @@ MaterialPreviewWidget.sphereButton.toolTipText=Preview material on a sphere
3634
MaterialPreviewWidget.cubeButton.toolTipText=Preview material on a cube
3735
MaterialPreviewWidget.planeButton.toolTipText=Preview material on a plane
3836
MaterialPreviewWidget.previewLabel.text=
39-
ColorPanel.colorPreview.text=
40-
ColorPanel.jLabel2.text=\ r :
41-
ColorPanel.jLabel3.text=\ g :
42-
ColorPanel.jLabel4.text=\ b :
43-
ColorPanel.jLabel5.text=\ a :
44-
ColorPanel.rLabel.text=0.2545
45-
ColorPanel.gLabel.text=0.2545
46-
ColorPanel.bLabel.text=0.2545
47-
ColorPanel.aLabel.text=0.2545
4837
TexturePanel.jButton2.toolTipText=Remove this texture
4938
TexturePanel.texturePreview.text=
5039
TexturePanelSquare.jCheckBox2.text=repeat
@@ -54,3 +43,13 @@ TexturePanelSquare.text=
5443
MaterialPreviewWidget.jToggleButton1.text=jToggleButton1
5544
MaterialPreviewWidget.togglePbrEnvButton.label=
5645
MaterialPreviewWidget.togglePbrEnvButton.toolTipText=Toggle PBR environment
46+
ColorPanel.gLabel.text=0.2545
47+
ColorPanel.rLabel.text=0.2545
48+
ColorPanel.colorPreview.text=
49+
ColorPanel.jLabel5.text=\ a :
50+
ColorPanel.aLabel.text=0.2545
51+
ColorPanel.jLabel4.text=\ b :
52+
ColorPanel.jLabel3.text=\ g :
53+
ColorPanel.jLabel2.text=\ r :
54+
ColorPanel.bLabel.text=0.2545
55+
TexturePanel.texturePreview.toolTipText=Texture

jme3-materialeditor/src/com/jme3/gde/materials/multiview/widgets/ColorPanel.form

Lines changed: 33 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,14 @@
2424
<Layout>
2525
<DimensionLayout dim="0">
2626
<Group type="103" groupAlignment="0" attributes="0">
27-
<Group type="102" alignment="1" attributes="0">
28-
<Group type="103" groupAlignment="1" attributes="0">
29-
<Component id="jSeparator1" alignment="1" pref="420" max="32767" attributes="0"/>
30-
<Group type="102" alignment="1" attributes="0">
31-
<Component id="jLabel1" pref="70" max="32767" attributes="0"/>
27+
<Group type="102" attributes="0">
28+
<Group type="103" groupAlignment="0" attributes="0">
29+
<Component id="jSeparator1" alignment="1" max="32767" attributes="0"/>
30+
<Group type="102" attributes="0">
31+
<Component id="jLabel1" min="-2" pref="91" max="-2" attributes="0"/>
3232
<EmptySpace max="-2" attributes="0"/>
33-
<Component id="jPanel2" min="-2" max="-2" attributes="0"/>
34-
<EmptySpace type="unrelated" max="-2" attributes="0"/>
35-
<Component id="jButton1" min="-2" pref="29" max="-2" attributes="0"/>
33+
<Component id="jPanel2" min="-2" pref="390" max="-2" attributes="0"/>
34+
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
3635
</Group>
3736
</Group>
3837
<EmptySpace max="-2" attributes="0"/>
@@ -42,13 +41,13 @@
4241
<DimensionLayout dim="1">
4342
<Group type="103" groupAlignment="0" attributes="0">
4443
<Group type="102" alignment="0" attributes="0">
44+
<EmptySpace min="-2" pref="4" max="-2" attributes="0"/>
4545
<Group type="103" groupAlignment="0" max="-2" attributes="0">
46-
<Component id="jButton1" max="32767" attributes="1"/>
47-
<Component id="jLabel1" alignment="0" max="32767" attributes="1"/>
48-
<Component id="jPanel2" alignment="0" max="32767" attributes="1"/>
46+
<Component id="jLabel1" max="32767" attributes="1"/>
47+
<Component id="jPanel2" max="32767" attributes="1"/>
4948
</Group>
50-
<EmptySpace max="-2" attributes="0"/>
51-
<Component id="jSeparator1" pref="9" max="32767" attributes="0"/>
49+
<EmptySpace min="-2" max="-2" attributes="0"/>
50+
<Component id="jSeparator1" pref="1" max="32767" attributes="0"/>
5251
</Group>
5352
</Group>
5453
</DimensionLayout>
@@ -65,14 +64,18 @@
6564
</Properties>
6665
</Component>
6766
<Container class="javax.swing.JPanel" name="jPanel2">
67+
<Properties>
68+
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
69+
<Dimension value="[377, 40]"/>
70+
</Property>
71+
</Properties>
6872

6973
<Layout>
7074
<DimensionLayout dim="0">
7175
<Group type="103" groupAlignment="0" attributes="0">
7276
<Group type="102" alignment="1" attributes="0">
73-
<EmptySpace max="-2" attributes="0"/>
74-
<Component id="colorPreview" pref="18" max="32767" attributes="0"/>
75-
<EmptySpace max="-2" attributes="0"/>
77+
<Component id="colorPreview" min="-2" pref="41" max="-2" attributes="0"/>
78+
<EmptySpace pref="51" max="32767" attributes="0"/>
7679
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
7780
<EmptySpace max="-2" attributes="0"/>
7881
<Component id="rLabel" min="-2" pref="46" max="-2" attributes="0"/>
@@ -93,17 +96,17 @@
9396
</DimensionLayout>
9497
<DimensionLayout dim="1">
9598
<Group type="103" groupAlignment="0" attributes="0">
96-
<Component id="gLabel" alignment="0" pref="20" max="32767" attributes="1"/>
97-
<Component id="bLabel" alignment="0" pref="20" max="32767" attributes="1"/>
99+
<Component id="jLabel2" alignment="0" max="32767" attributes="0"/>
98100
<Group type="103" groupAlignment="3" attributes="0">
99-
<Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/>
101+
<Component id="jLabel3" alignment="3" min="-2" pref="40" max="-2" attributes="0"/>
100102
<Component id="jLabel4" alignment="3" min="-2" max="-2" attributes="0"/>
101103
<Component id="jLabel5" alignment="3" min="-2" max="-2" attributes="0"/>
102-
<Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
103-
<Component id="rLabel" alignment="3" pref="20" max="32767" attributes="1"/>
104+
<Component id="rLabel" alignment="3" max="32767" attributes="1"/>
105+
<Component id="gLabel" alignment="3" min="-2" max="-2" attributes="1"/>
106+
<Component id="bLabel" alignment="3" min="-2" max="-2" attributes="1"/>
107+
<Component id="aLabel" alignment="3" min="-2" max="-2" attributes="1"/>
104108
</Group>
105-
<Component id="colorPreview" alignment="0" pref="20" max="32767" attributes="1"/>
106-
<Component id="aLabel" alignment="0" pref="20" max="32767" attributes="1"/>
109+
<Component id="colorPreview" alignment="0" max="32767" attributes="1"/>
107110
</Group>
108111
</DimensionLayout>
109112
</Layout>
@@ -199,14 +202,11 @@
199202
<ResourceString bundle="com/jme3/gde/materials/multiview/widgets/Bundle.properties" key="ColorPanel.aLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
200203
</Property>
201204
<Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor">
202-
<Color id="Curseur de texte"/>
205+
<Color id="Default Cursor"/>
203206
</Property>
204207
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
205208
<Dimension value="[110, 2147483647]"/>
206209
</Property>
207-
<Property name="nextFocusableComponent" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
208-
<ComponentRef name="jButton1"/>
209-
</Property>
210210
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
211211
<Dimension value="[110, 28]"/>
212212
</Property>
@@ -241,34 +241,16 @@
241241
</Border>
242242
</Property>
243243
<Property name="opaque" type="boolean" value="true"/>
244+
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
245+
<Dimension value="[64, 2]"/>
246+
</Property>
244247
</Properties>
248+
<Events>
249+
<EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="colorPreviewMouseClicked"/>
250+
</Events>
245251
</Component>
246252
</SubComponents>
247253
</Container>
248-
<Component class="javax.swing.JButton" name="jButton1">
249-
<Properties>
250-
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
251-
<Image iconType="3" name="/com/jme3/gde/materials/multiview/widgets/icons/color_wheel.png"/>
252-
</Property>
253-
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
254-
<ResourceString bundle="com/jme3/gde/materials/multiview/widgets/Bundle.properties" key="ColorPanel.jButton1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
255-
</Property>
256-
<Property name="horizontalTextPosition" type="int" value="0"/>
257-
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
258-
<Dimension value="[43, 15]"/>
259-
</Property>
260-
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
261-
<Dimension value="[43, 15]"/>
262-
</Property>
263-
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
264-
<Dimension value="[43, 15]"/>
265-
</Property>
266-
<Property name="verticalTextPosition" type="int" value="3"/>
267-
</Properties>
268-
<Events>
269-
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/>
270-
</Events>
271-
</Component>
272254
<Component class="javax.swing.JSeparator" name="jSeparator1">
273255
</Component>
274256
</SubComponents>

0 commit comments

Comments
 (0)