Skip to content

Commit bd8baa2

Browse files
committed
Improvements to GUI suitable for small resolutions.
* GUI is now more compact. * Displays suggestions in status label for next action user can take. * Also includes BugFix: "Empty or invalid clippings file." not shown everytime an invalid clippings file is selected.
1 parent 7ee437c commit bd8baa2

File tree

2 files changed

+197
-175
lines changed

2 files changed

+197
-175
lines changed

src/coderarjob/kpdfsync/poc/MainFrame.form

Lines changed: 94 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</NonVisualComponents>
1414
<Properties>
1515
<Property name="defaultCloseOperation" type="int" value="3"/>
16-
<Property name="title" type="java.lang.String" value="mk-float-kpdfsync-gui"/>
16+
<Property name="title" type="java.lang.String" value="kpdfsync"/>
1717
</Properties>
1818
<SyntheticProperties>
1919
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
@@ -35,77 +35,65 @@
3535
<DimensionLayout dim="0">
3636
<Group type="103" groupAlignment="0" attributes="0">
3737
<Component id="headerPanel" alignment="0" max="32767" attributes="0"/>
38-
<Group type="102" alignment="0" attributes="0">
38+
<Group type="102" attributes="0">
3939
<EmptySpace max="-2" attributes="0"/>
4040
<Group type="103" groupAlignment="0" attributes="0">
4141
<Group type="102" attributes="0">
4242
<Component id="highlightsScrollPane" max="32767" attributes="0"/>
4343
<EmptySpace max="-2" attributes="0"/>
4444
</Group>
4545
<Group type="102" attributes="0">
46-
<Component id="statusScrollPane" max="32767" attributes="0"/>
46+
<Component id="pageNumbersScrollPane" max="32767" attributes="0"/>
4747
<EmptySpace max="-2" attributes="0"/>
4848
</Group>
49+
<Component id="selectHighlightLabel" alignment="0" max="32767" attributes="0"/>
4950
<Group type="102" attributes="0">
50-
<Group type="103" groupAlignment="0" max="-2" attributes="0">
51-
<Component id="selectPdfFileLabel" max="32767" attributes="0"/>
52-
<Component id="pdfSkipPagesLabel" max="32767" attributes="0"/>
53-
</Group>
54-
<EmptySpace min="-2" max="-2" attributes="0"/>
5551
<Group type="103" groupAlignment="0" attributes="0">
52+
<Group type="102" attributes="0">
53+
<Component id="pageNumbersLabel" min="-2" pref="162" max="-2" attributes="0"/>
54+
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
55+
</Group>
5656
<Group type="102" alignment="0" attributes="0">
57+
<Component id="pdfSkipPagesLabel" min="-2" max="-2" attributes="0"/>
58+
<EmptySpace max="-2" attributes="0"/>
5759
<Component id="pdfSkipPagesSpinner" min="-2" pref="63" max="-2" attributes="0"/>
5860
<EmptySpace type="unrelated" max="-2" attributes="0"/>
59-
<Component id="matchThressholdLabel" min="-2" pref="183" max="-2" attributes="0"/>
61+
<Component id="matchThressholdLabel" min="-2" pref="177" max="-2" attributes="0"/>
6062
<EmptySpace max="-2" attributes="0"/>
6163
<Component id="matchThressholdSpinner" min="-2" pref="63" max="-2" attributes="0"/>
6264
<EmptySpace max="-2" attributes="0"/>
6365
<Component id="percentLabel" min="-2" pref="18" max="-2" attributes="0"/>
64-
</Group>
65-
<Group type="102" alignment="0" attributes="0">
66-
<Component id="selectPdfFileTextBox" max="32767" attributes="0"/>
67-
<EmptySpace max="-2" attributes="0"/>
68-
<Component id="browsePdfFileButton" min="-2" max="-2" attributes="0"/>
66+
<EmptySpace max="32767" attributes="0"/>
67+
<Component id="proceedButton" min="-2" max="-2" attributes="0"/>
6968
</Group>
7069
</Group>
7170
<EmptySpace max="-2" attributes="0"/>
7271
</Group>
73-
<Group type="102" attributes="0">
74-
<Component id="pageNumbersScrollPane" max="32767" attributes="0"/>
72+
<Group type="102" alignment="0" attributes="0">
73+
<Component id="selectPdfFileLabel" min="-2" pref="187" max="-2" attributes="0"/>
74+
<EmptySpace max="-2" attributes="0"/>
75+
<Component id="selectPdfFileTextBox" max="32767" attributes="0"/>
76+
<EmptySpace max="-2" attributes="0"/>
77+
<Component id="browsePdfFileButton" min="-2" pref="46" max="-2" attributes="0"/>
7578
<EmptySpace max="-2" attributes="0"/>
7679
</Group>
77-
<Group type="102" attributes="0">
78-
<Group type="103" groupAlignment="1" attributes="0">
79-
<Group type="102" alignment="0" attributes="0">
80-
<Group type="103" groupAlignment="0" max="-2" attributes="0">
81-
<Group type="102" attributes="0">
82-
<Component id="statusLabel" min="-2" max="-2" attributes="0"/>
83-
<EmptySpace min="-2" pref="158" max="-2" attributes="0"/>
84-
</Group>
85-
<Group type="102" attributes="0">
86-
<Group type="103" groupAlignment="0" attributes="0">
87-
<Component id="selectBookNameLabel" max="32767" attributes="0"/>
88-
<Component id="clippingsFileLabel" max="32767" attributes="0"/>
89-
</Group>
90-
<EmptySpace min="37" pref="37" max="-2" attributes="0"/>
91-
</Group>
92-
</Group>
93-
<Group type="103" groupAlignment="0" attributes="0">
94-
<Component id="selectBookNameComboBox" max="32767" attributes="0"/>
95-
<Component id="clippingsFileTextBox" max="32767" attributes="0"/>
96-
</Group>
97-
<EmptySpace max="-2" attributes="0"/>
98-
<Component id="browseClippingsFileButton" min="-2" max="-2" attributes="0"/>
99-
<EmptySpace min="6" pref="6" max="-2" attributes="0"/>
100-
</Group>
101-
<Component id="proceedPanel" alignment="0" max="32767" attributes="0"/>
80+
<Group type="102" alignment="1" attributes="0">
81+
<Group type="103" groupAlignment="0" max="-2" attributes="0">
82+
<Component id="selectBookNameLabel" pref="162" max="32767" attributes="0"/>
83+
<Component id="clippingsFileLabel" max="32767" attributes="0"/>
84+
</Group>
85+
<EmptySpace min="37" pref="37" max="-2" attributes="0"/>
86+
<Group type="103" groupAlignment="0" attributes="0">
87+
<Component id="selectBookNameComboBox" max="32767" attributes="0"/>
88+
<Component id="clippingsFileTextBox" max="32767" attributes="0"/>
10289
</Group>
103-
<EmptySpace min="5" pref="5" max="-2" attributes="0"/>
90+
<EmptySpace max="-2" attributes="0"/>
91+
<Component id="browseClippingsFileButton" min="-2" max="-2" attributes="0"/>
92+
<EmptySpace min="-2" pref="11" max="-2" attributes="0"/>
10493
</Group>
105-
<Component id="selectHighlightLabel" alignment="0" max="32767" attributes="0"/>
106-
<Group type="102" alignment="0" attributes="0">
107-
<Component id="pageNumbersLabel" min="-2" pref="162" max="-2" attributes="0"/>
108-
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
94+
<Group type="102" alignment="1" attributes="0">
95+
<Component id="proceedPanel" max="32767" attributes="0"/>
96+
<EmptySpace max="-2" attributes="0"/>
10997
</Group>
11098
</Group>
11199
</Group>
@@ -115,7 +103,7 @@
115103
<Group type="103" groupAlignment="0" attributes="0">
116104
<Group type="102" alignment="0" attributes="0">
117105
<Component id="headerPanel" min="-2" max="-2" attributes="0"/>
118-
<EmptySpace type="unrelated" max="-2" attributes="0"/>
106+
<EmptySpace min="-2" max="-2" attributes="0"/>
119107
<Group type="103" groupAlignment="3" attributes="0">
120108
<Component id="clippingsFileLabel" alignment="3" min="-2" max="-2" attributes="0"/>
121109
<Component id="clippingsFileTextBox" alignment="3" min="-2" max="-2" attributes="0"/>
@@ -133,7 +121,7 @@
133121
<EmptySpace max="-2" attributes="0"/>
134122
<Component id="selectHighlightLabel" min="-2" max="-2" attributes="0"/>
135123
<EmptySpace max="-2" attributes="0"/>
136-
<Component id="highlightsScrollPane" pref="459" max="32767" attributes="0"/>
124+
<Component id="highlightsScrollPane" pref="348" max="32767" attributes="0"/>
137125
<EmptySpace max="-2" attributes="0"/>
138126
<Group type="103" groupAlignment="3" attributes="0">
139127
<Component id="selectPdfFileLabel" alignment="3" min="-2" max="-2" attributes="0"/>
@@ -142,18 +130,15 @@
142130
</Group>
143131
<EmptySpace max="-2" attributes="0"/>
144132
<Group type="103" groupAlignment="3" attributes="0">
133+
<Component id="pdfSkipPagesLabel" alignment="3" min="-2" max="-2" attributes="0"/>
145134
<Component id="pdfSkipPagesSpinner" alignment="3" min="-2" max="-2" attributes="0"/>
146135
<Component id="matchThressholdLabel" alignment="3" min="-2" max="-2" attributes="0"/>
147136
<Component id="matchThressholdSpinner" alignment="3" min="-2" max="-2" attributes="0"/>
148137
<Component id="percentLabel" alignment="3" min="-2" max="-2" attributes="0"/>
149-
<Component id="pdfSkipPagesLabel" alignment="3" min="-2" max="-2" attributes="0"/>
138+
<Component id="proceedButton" alignment="3" min="-2" max="-2" attributes="0"/>
150139
</Group>
151-
<EmptySpace type="unrelated" max="-2" attributes="0"/>
152-
<Component id="proceedPanel" min="-2" max="-2" attributes="0"/>
153-
<EmptySpace max="-2" attributes="0"/>
154-
<Component id="statusLabel" min="-2" max="-2" attributes="0"/>
155140
<EmptySpace max="-2" attributes="0"/>
156-
<Component id="statusScrollPane" min="-2" pref="81" max="-2" attributes="0"/>
141+
<Component id="proceedPanel" min="-2" pref="131" max="-2" attributes="0"/>
157142
<EmptySpace max="-2" attributes="0"/>
158143
</Group>
159144
</Group>
@@ -172,7 +157,7 @@
172157
<Group type="103" groupAlignment="0" attributes="0">
173158
<Group type="102" alignment="0" attributes="0">
174159
<Component id="logoLabel" min="-2" max="-2" attributes="0"/>
175-
<EmptySpace pref="552" max="32767" attributes="0"/>
160+
<EmptySpace pref="546" max="32767" attributes="0"/>
176161
<Component id="optionsButton" min="-2" max="-2" attributes="0"/>
177162
<EmptySpace type="unrelated" max="-2" attributes="0"/>
178163
<Component id="exitButton" min="-2" max="-2" attributes="0"/>
@@ -181,9 +166,9 @@
181166
</Group>
182167
</DimensionLayout>
183168
<DimensionLayout dim="1">
184-
<Group type="103" groupAlignment="0" attributes="0">
185-
<Component id="logoLabel" alignment="1" min="-2" max="-2" attributes="0"/>
186-
<Group type="102" alignment="1" attributes="0">
169+
<Group type="103" groupAlignment="1" attributes="0">
170+
<Component id="logoLabel" min="-2" max="-2" attributes="0"/>
171+
<Group type="102" attributes="0">
187172
<Group type="103" groupAlignment="3" attributes="0">
188173
<Component id="exitButton" alignment="3" min="-2" max="-2" attributes="0"/>
189174
<Component id="optionsButton" alignment="3" min="-2" max="-2" attributes="0"/>
@@ -354,36 +339,41 @@
354339
</SubComponents>
355340
</Container>
356341
<Container class="javax.swing.JPanel" name="proceedPanel">
342+
<Properties>
343+
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
344+
<Border info="org.netbeans.modules.form.compat2.border.SoftBevelBorderInfo">
345+
<BevelBorder/>
346+
</Border>
347+
</Property>
348+
</Properties>
357349

358350
<Layout>
359351
<DimensionLayout dim="0">
360352
<Group type="103" groupAlignment="0" attributes="0">
361-
<Group type="102" alignment="1" attributes="0">
362-
<EmptySpace max="-2" attributes="0"/>
363-
<Component id="jProgressBar1" max="32767" attributes="0"/>
364-
<EmptySpace max="-2" attributes="0"/>
365-
<Component id="proceedButton" min="-2" max="-2" attributes="0"/>
366-
<EmptySpace max="-2" attributes="0"/>
367-
</Group>
353+
<Component id="statusLabel" alignment="0" pref="922" max="32767" attributes="0"/>
354+
<Component id="jProgressBar1" alignment="1" max="32767" attributes="0"/>
355+
<Component id="statusScrollPane" alignment="0" max="32767" attributes="0"/>
368356
</Group>
369357
</DimensionLayout>
370358
<DimensionLayout dim="1">
371359
<Group type="103" groupAlignment="0" attributes="0">
372-
<Group type="103" groupAlignment="3" attributes="0">
373-
<Component id="jProgressBar1" alignment="3" min="-2" pref="24" max="-2" attributes="0"/>
374-
<Component id="proceedButton" alignment="3" min="-2" max="-2" attributes="0"/>
360+
<Group type="102" attributes="0">
361+
<Component id="statusLabel" min="-2" max="-2" attributes="0"/>
362+
<EmptySpace max="-2" attributes="0"/>
363+
<Component id="jProgressBar1" min="-2" max="-2" attributes="0"/>
364+
<EmptySpace max="-2" attributes="0"/>
365+
<Component id="statusScrollPane" min="-2" pref="83" max="-2" attributes="0"/>
366+
<EmptySpace max="-2" attributes="0"/>
375367
</Group>
376368
</Group>
377369
</DimensionLayout>
378370
</Layout>
379371
<SubComponents>
380-
<Component class="javax.swing.JButton" name="proceedButton">
372+
<Component class="javax.swing.JLabel" name="statusLabel">
381373
<Properties>
382-
<Property name="text" type="java.lang.String" value="Proceed"/>
374+
<Property name="text" type="java.lang.String" value="Status:"/>
375+
<Property name="opaque" type="boolean" value="true"/>
383376
</Properties>
384-
<Events>
385-
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="proceedButtonActionPerformed"/>
386-
</Events>
387377
</Component>
388378
<Component class="javax.swing.JProgressBar" name="jProgressBar1">
389379
<Properties>
@@ -395,35 +385,35 @@
395385
<EtchetBorder/>
396386
</Border>
397387
</Property>
398-
<Property name="stringPainted" type="boolean" value="true"/>
399388
</Properties>
400389
</Component>
401-
</SubComponents>
402-
</Container>
403-
<Container class="javax.swing.JScrollPane" name="statusScrollPane">
404-
<AuxValues>
405-
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
406-
</AuxValues>
407-
408-
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
409-
<SubComponents>
410-
<Component class="javax.swing.JList" name="statusList">
411-
<Properties>
412-
<Property name="model" type="javax.swing.ListModel" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
413-
<Connection code="this.statusListModel" type="code"/>
414-
</Property>
415-
</Properties>
390+
<Container class="javax.swing.JScrollPane" name="statusScrollPane">
416391
<AuxValues>
417-
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="&lt;String&gt;"/>
392+
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
418393
</AuxValues>
419-
</Component>
394+
395+
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
396+
<SubComponents>
397+
<Component class="javax.swing.JList" name="statusList">
398+
<Properties>
399+
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
400+
<Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
401+
<EmptyBorder/>
402+
</Border>
403+
</Property>
404+
<Property name="model" type="javax.swing.ListModel" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
405+
<Connection code="statusListModel" type="code"/>
406+
</Property>
407+
<Property name="selectionMode" type="int" value="0"/>
408+
</Properties>
409+
<AuxValues>
410+
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="&lt;String&gt;"/>
411+
</AuxValues>
412+
</Component>
413+
</SubComponents>
414+
</Container>
420415
</SubComponents>
421416
</Container>
422-
<Component class="javax.swing.JLabel" name="statusLabel">
423-
<Properties>
424-
<Property name="text" type="java.lang.String" value="Status:"/>
425-
</Properties>
426-
</Component>
427417
<Component class="javax.swing.JLabel" name="pdfSkipPagesLabel">
428418
<Properties>
429419
<Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
@@ -465,5 +455,13 @@
465455
<Property name="text" type="java.lang.String" value="%"/>
466456
</Properties>
467457
</Component>
458+
<Component class="javax.swing.JButton" name="proceedButton">
459+
<Properties>
460+
<Property name="text" type="java.lang.String" value="Proceed"/>
461+
</Properties>
462+
<Events>
463+
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="proceedButtonActionPerformed"/>
464+
</Events>
465+
</Component>
468466
</SubComponents>
469467
</Form>

0 commit comments

Comments
 (0)