Skip to content

Commit bfdb7c4

Browse files
committed
fix: status bar flickering
1 parent 17c1d80 commit bfdb7c4

File tree

3 files changed

+105
-49
lines changed

3 files changed

+105
-49
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
<groupId>com.berdal84</groupId>
1616
<artifactId>Mageek</artifactId>
17-
<version>1.1.1</version>
17+
<version>1.1.2</version>
1818

1919
<name>Mageek</name>
2020
<description>A small plugin to colorize images channels, works with multi series/channels/slices.</description>

src/main/java/com/berdal84/mageek/GUI.form

Lines changed: 62 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@
3939
<EmptySpace min="-2" max="-2" attributes="0"/>
4040
<Group type="103" groupAlignment="1" attributes="0">
4141
<Component id="jLabel1" max="32767" attributes="0"/>
42-
<Component id="srcDirPanel" pref="843" max="32767" attributes="0"/>
43-
<Component id="statusLabel" alignment="0" max="32767" attributes="0"/>
42+
<Component id="srcDirPanel" pref="891" max="32767" attributes="0"/>
4443
<Group type="102" alignment="0" attributes="0">
4544
<Component id="extensionsPanel" min="-2" max="-2" attributes="0"/>
4645
<EmptySpace min="-2" max="-2" attributes="0"/>
@@ -52,6 +51,7 @@
5251
<Component id="processPanel" pref="0" max="32767" attributes="0"/>
5352
</Group>
5453
</Group>
54+
<Component id="jScrollPane1" max="32767" attributes="0"/>
5555
</Group>
5656
</Group>
5757
</Group>
@@ -69,23 +69,19 @@
6969
<Component id="srcDirPanel" min="-2" max="-2" attributes="0"/>
7070
<EmptySpace min="-2" max="-2" attributes="0"/>
7171
<Group type="103" groupAlignment="0" attributes="0">
72-
<Group type="102" attributes="0">
73-
<Group type="103" groupAlignment="0" attributes="0">
74-
<Component id="extensionsPanel" alignment="0" max="32767" attributes="0"/>
75-
<Component id="fileListPanel" alignment="0" max="32767" attributes="0"/>
76-
</Group>
77-
<EmptySpace min="-2" pref="7" max="-2" attributes="0"/>
78-
</Group>
79-
<Group type="102" attributes="0">
72+
<Group type="102" alignment="1" attributes="0">
8073
<Component id="jLabel10" min="-2" max="-2" attributes="0"/>
8174
<EmptySpace max="-2" attributes="0"/>
82-
<Component id="colorPanel" max="32767" attributes="0"/>
75+
<Component id="colorPanel" min="-2" max="-2" attributes="0"/>
8376
<EmptySpace max="-2" attributes="0"/>
84-
<Component id="processPanel" min="-2" max="-2" attributes="0"/>
85-
<EmptySpace min="-2" max="-2" attributes="0"/>
77+
<Component id="processPanel" max="32767" attributes="0"/>
8678
</Group>
79+
<Component id="extensionsPanel" alignment="0" max="32767" attributes="0"/>
80+
<Component id="fileListPanel" alignment="0" max="32767" attributes="0"/>
8781
</Group>
88-
<Component id="statusLabel" min="-2" pref="24" max="-2" attributes="0"/>
82+
<EmptySpace min="-2" max="-2" attributes="0"/>
83+
<Component id="jScrollPane1" min="-2" pref="32" max="-2" attributes="0"/>
84+
<EmptySpace min="-2" max="-2" attributes="0"/>
8985
</Group>
9086
</Group>
9187
</DimensionLayout>
@@ -150,17 +146,6 @@
150146
</Component>
151147
</SubComponents>
152148
</Container>
153-
<Component class="javax.swing.JLabel" name="statusLabel">
154-
<Properties>
155-
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
156-
<Color blue="99" green="99" red="99" type="rgb"/>
157-
</Property>
158-
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
159-
<Font name="Lucida Grande" size="13" style="2"/>
160-
</Property>
161-
<Property name="text" type="java.lang.String" value="Status: Please select a source folder"/>
162-
</Properties>
163-
</Component>
164149
<Container class="javax.swing.JPanel" name="srcDirPanel">
165150

166151
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout"/>
@@ -268,7 +253,7 @@
268253
<Group type="102" alignment="0" attributes="0">
269254
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
270255
<EmptySpace max="-2" attributes="0"/>
271-
<Component id="jScrollPane4" pref="304" max="32767" attributes="0"/>
256+
<Component id="jScrollPane4" max="32767" attributes="0"/>
272257
</Group>
273258
</Group>
274259
</DimensionLayout>
@@ -389,7 +374,7 @@
389374
</Group>
390375
<EmptySpace max="-2" attributes="0"/>
391376
<Component id="batchCheckBox" min="-2" pref="29" max="-2" attributes="0"/>
392-
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
377+
<EmptySpace min="0" pref="7" max="32767" attributes="0"/>
393378
</Group>
394379
</Group>
395380
</DimensionLayout>
@@ -504,5 +489,55 @@
504489
<Property name="text" type="java.lang.String" value="Options:"/>
505490
</Properties>
506491
</Component>
492+
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
493+
<Properties>
494+
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
495+
<Color blue="0" green="66" red="ff" type="rgb"/>
496+
</Property>
497+
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
498+
<Border info="null"/>
499+
</Property>
500+
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
501+
<Color blue="0" green="ff" red="cc" type="rgb"/>
502+
</Property>
503+
<Property name="opaque" type="boolean" value="false"/>
504+
</Properties>
505+
<AuxValues>
506+
<AuxValue name="JavaCodeGenerator_CreateCodePost" type="java.lang.String" value="jScrollPane1.setBackground(new Color(0,0,0,0));"/>
507+
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
508+
</AuxValues>
509+
510+
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
511+
<SubComponents>
512+
<Component class="javax.swing.JTextArea" name="statusLabel">
513+
<Properties>
514+
<Property name="editable" type="boolean" value="false"/>
515+
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
516+
<Color blue="ee" green="ee" id="window" palette="3" red="ee" type="palette"/>
517+
</Property>
518+
<Property name="columns" type="int" value="20"/>
519+
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
520+
<Font name="Lucida Grande" size="13" style="2"/>
521+
</Property>
522+
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
523+
<Color blue="66" green="66" red="66" type="rgb"/>
524+
</Property>
525+
<Property name="lineWrap" type="boolean" value="true"/>
526+
<Property name="rows" type="int" value="2"/>
527+
<Property name="tabSize" type="int" value="4"/>
528+
<Property name="text" type="java.lang.String" value="Status: here will be the status.&#xa;Can use two lines."/>
529+
<Property name="toolTipText" type="java.lang.String" value=""/>
530+
<Property name="wrapStyleWord" type="boolean" value="true"/>
531+
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
532+
<Border info="null"/>
533+
</Property>
534+
<Property name="dragEnabled" type="boolean" value="false"/>
535+
</Properties>
536+
<AuxValues>
537+
<AuxValue name="JavaCodeGenerator_CreateCodePost" type="java.lang.String" value="statusLabel.setOpaque(false);&#xa;Color bgColor = new Color( 0, 0, 0, 0);&#xa;statusLabel.setBackground(bgColor);&#xa;&#xa;&#xa;"/>
538+
</AuxValues>
539+
</Component>
540+
</SubComponents>
541+
</Container>
507542
</SubComponents>
508543
</Form>

src/main/java/com/berdal84/mageek/GUI.java

Lines changed: 42 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
*/
2424
package com.berdal84.mageek;
2525

26+
import java.awt.Color;
2627
import java.awt.event.ActionListener;
2728
import java.awt.event.ItemListener;
2829
import java.beans.PropertyChangeListener;
@@ -79,7 +80,6 @@ private void initComponents()
7980
cancelBtn = new javax.swing.JButton();
8081
processBtn = new javax.swing.JButton();
8182
progressBar = new javax.swing.JProgressBar();
82-
statusLabel = new javax.swing.JLabel();
8383
srcDirPanel = new javax.swing.JPanel();
8484
jLabel3 = new javax.swing.JLabel();
8585
filler2 = new javax.swing.Box.Filler(new java.awt.Dimension(10, 30), new java.awt.Dimension(10, 30), new java.awt.Dimension(32767, 30));
@@ -109,6 +109,12 @@ private void initComponents()
109109
color4ComboBox = new javax.swing.JComboBox<>();
110110
batchCheckBox = new javax.swing.JCheckBox();
111111
jLabel10 = new javax.swing.JLabel();
112+
jScrollPane1 = new javax.swing.JScrollPane();
113+
jScrollPane1.setBackground(new Color(0,0,0,0));
114+
statusLabel = new javax.swing.JTextArea();
115+
statusLabel.setOpaque(false);
116+
Color bgColor = new Color( 0, 0, 0, 0);
117+
statusLabel.setBackground(bgColor);
112118

113119
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
114120

@@ -130,10 +136,6 @@ private void initComponents()
130136
progressBar.setStringPainted(true);
131137
processPanel.add(progressBar);
132138

133-
statusLabel.setBackground(new java.awt.Color(153, 153, 153));
134-
statusLabel.setFont(new java.awt.Font("Lucida Grande", 2, 13)); // NOI18N
135-
statusLabel.setText("Status: Please select a source folder");
136-
137139
srcDirPanel.setLayout(new javax.swing.BoxLayout(srcDirPanel, javax.swing.BoxLayout.LINE_AXIS));
138140

139141
jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
@@ -199,7 +201,7 @@ public void valueChanged(javax.swing.event.ListSelectionEvent evt)
199201
.addGroup(extensionsPanelLayout.createSequentialGroup()
200202
.addComponent(jLabel2)
201203
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
202-
.addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 304, Short.MAX_VALUE))
204+
.addComponent(jScrollPane4))
203205
);
204206

205207
jLabel1.setFont(new java.awt.Font("Lucida Grande", 0, 24)); // NOI18N
@@ -287,11 +289,31 @@ public void valueChanged(javax.swing.event.ListSelectionEvent evt)
287289
.addComponent(jLabel9))
288290
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
289291
.addComponent(batchCheckBox, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
290-
.addGap(0, 0, Short.MAX_VALUE))
292+
.addGap(0, 7, Short.MAX_VALUE))
291293
);
292294

293295
jLabel10.setText("Options:");
294296

297+
jScrollPane1.setBackground(new java.awt.Color(255, 102, 0));
298+
jScrollPane1.setBorder(null);
299+
jScrollPane1.setForeground(new java.awt.Color(204, 255, 0));
300+
jScrollPane1.setOpaque(false);
301+
302+
statusLabel.setEditable(false);
303+
statusLabel.setBackground(javax.swing.UIManager.getDefaults().getColor("window"));
304+
statusLabel.setColumns(20);
305+
statusLabel.setFont(new java.awt.Font("Lucida Grande", 2, 13)); // NOI18N
306+
statusLabel.setForeground(new java.awt.Color(102, 102, 102));
307+
statusLabel.setLineWrap(true);
308+
statusLabel.setRows(2);
309+
statusLabel.setTabSize(4);
310+
statusLabel.setText("Status: here will be the status.\nCan use two lines.");
311+
statusLabel.setToolTipText("");
312+
statusLabel.setWrapStyleWord(true);
313+
statusLabel.setBorder(null);
314+
statusLabel.setDragEnabled(false);
315+
jScrollPane1.setViewportView(statusLabel);
316+
295317
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
296318
getContentPane().setLayout(layout);
297319
layout.setHorizontalGroup(
@@ -305,8 +327,7 @@ public void valueChanged(javax.swing.event.ListSelectionEvent evt)
305327
.addContainerGap()
306328
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
307329
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
308-
.addComponent(srcDirPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 843, Short.MAX_VALUE)
309-
.addComponent(statusLabel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
330+
.addComponent(srcDirPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 891, Short.MAX_VALUE)
310331
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
311332
.addComponent(extensionsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
312333
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
@@ -315,7 +336,8 @@ public void valueChanged(javax.swing.event.ListSelectionEvent evt)
315336
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
316337
.addComponent(colorPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
317338
.addComponent(jLabel10)
318-
.addComponent(processPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))))))
339+
.addComponent(processPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)))
340+
.addComponent(jScrollPane1))))
319341
.addContainerGap())
320342
);
321343
layout.setVerticalGroup(
@@ -328,19 +350,17 @@ public void valueChanged(javax.swing.event.ListSelectionEvent evt)
328350
.addComponent(srcDirPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
329351
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
330352
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
331-
.addGroup(layout.createSequentialGroup()
332-
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
333-
.addComponent(extensionsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
334-
.addComponent(fileListPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
335-
.addGap(7, 7, 7))
336-
.addGroup(layout.createSequentialGroup()
353+
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
337354
.addComponent(jLabel10)
338355
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
339-
.addComponent(colorPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
356+
.addComponent(colorPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
340357
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
341-
.addComponent(processPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
342-
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
343-
.addComponent(statusLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE))
358+
.addComponent(processPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
359+
.addComponent(extensionsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
360+
.addComponent(fileListPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
361+
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
362+
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)
363+
.addContainerGap())
344364
);
345365

346366
pack();
@@ -379,6 +399,7 @@ private void extensionListValueChanged(javax.swing.event.ListSelectionEvent evt)
379399
private javax.swing.JLabel jLabel8;
380400
private javax.swing.JLabel jLabel9;
381401
private javax.swing.JPanel jPanel2;
402+
private javax.swing.JScrollPane jScrollPane1;
382403
private javax.swing.JScrollPane jScrollPane2;
383404
private javax.swing.JScrollPane jScrollPane4;
384405
private javax.swing.JTabbedPane jTabbedPane1;
@@ -387,7 +408,7 @@ private void extensionListValueChanged(javax.swing.event.ListSelectionEvent evt)
387408
private javax.swing.JProgressBar progressBar;
388409
private javax.swing.JTextField sourceDirectoryTextEdit;
389410
private javax.swing.JPanel srcDirPanel;
390-
private javax.swing.JLabel statusLabel;
411+
private javax.swing.JTextArea statusLabel;
391412
private javax.swing.JComboBox<String> zProjectionComboBox;
392413
private javax.swing.JLabel zProjectionLabel;
393414
// End of variables declaration//GEN-END:variables

0 commit comments

Comments
 (0)