Skip to content

Commit 2ced07f

Browse files
committed
Minor GUI changes: Label texts alignment etc.
1 parent 1265df3 commit 2ced07f

File tree

2 files changed

+36
-27
lines changed

2 files changed

+36
-27
lines changed

src/coderarjob/kpdfsync/poc/MainFrame.form

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,19 @@
4848
</Group>
4949
<Group type="102" attributes="0">
5050
<Group type="103" groupAlignment="0" max="-2" attributes="0">
51-
<Component id="selectPdfFileLabel" pref="152" max="32767" attributes="0"/>
51+
<Component id="selectPdfFileLabel" max="32767" attributes="0"/>
5252
<Component id="pdfSkipPagesLabel" max="32767" attributes="0"/>
5353
</Group>
5454
<EmptySpace min="-2" max="-2" attributes="0"/>
5555
<Group type="103" groupAlignment="0" attributes="0">
5656
<Group type="102" alignment="0" attributes="0">
5757
<Component id="pdfSkipPagesSpinner" min="-2" pref="63" max="-2" attributes="0"/>
58-
<EmptySpace max="-2" attributes="0"/>
58+
<EmptySpace type="unrelated" max="-2" attributes="0"/>
5959
<Component id="matchThressholdLabel" min="-2" pref="183" max="-2" attributes="0"/>
6060
<EmptySpace max="-2" attributes="0"/>
6161
<Component id="matchThressholdSpinner" min="-2" pref="63" max="-2" attributes="0"/>
6262
<EmptySpace max="-2" attributes="0"/>
6363
<Component id="percentLabel" min="-2" pref="18" max="-2" attributes="0"/>
64-
<EmptySpace min="-2" pref="372" max="-2" attributes="0"/>
6564
</Group>
6665
<Group type="102" alignment="0" attributes="0">
6766
<Component id="selectPdfFileTextBox" max="32767" attributes="0"/>
@@ -78,12 +77,19 @@
7877
<Group type="102" attributes="0">
7978
<Group type="103" groupAlignment="1" attributes="0">
8079
<Group type="102" alignment="0" attributes="0">
81-
<Group type="103" groupAlignment="0" attributes="0">
82-
<Component id="selectBookNameLabel" alignment="0" min="-2" max="-2" attributes="0"/>
83-
<Component id="clippingsFileLabel" alignment="0" min="-2" max="-2" attributes="0"/>
84-
<Component id="statusLabel" alignment="0" min="-2" max="-2" 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>
8592
</Group>
86-
<EmptySpace min="-2" max="-2" attributes="0"/>
8793
<Group type="103" groupAlignment="0" attributes="0">
8894
<Component id="selectBookNameComboBox" max="32767" attributes="0"/>
8995
<Component id="clippingsFileTextBox" max="32767" attributes="0"/>
@@ -98,7 +104,7 @@
98104
</Group>
99105
<Component id="selectHighlightLabel" alignment="0" max="32767" attributes="0"/>
100106
<Group type="102" alignment="0" attributes="0">
101-
<Component id="pageNumbersLabel" min="-2" pref="110" max="-2" attributes="0"/>
107+
<Component id="pageNumbersLabel" min="-2" pref="162" max="-2" attributes="0"/>
102108
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
103109
</Group>
104110
</Group>
@@ -166,7 +172,7 @@
166172
<Group type="103" groupAlignment="0" attributes="0">
167173
<Group type="102" alignment="0" attributes="0">
168174
<Component id="logoLabel" min="-2" max="-2" attributes="0"/>
169-
<EmptySpace max="32767" attributes="0"/>
175+
<EmptySpace pref="552" max="32767" attributes="0"/>
170176
<Component id="optionsButton" min="-2" max="-2" attributes="0"/>
171177
<EmptySpace type="unrelated" max="-2" attributes="0"/>
172178
<Component id="exitButton" min="-2" max="-2" attributes="0"/>
@@ -316,12 +322,12 @@
316322
</Container>
317323
<Component class="javax.swing.JLabel" name="pageNumbersLabel">
318324
<Properties>
319-
<Property name="text" type="java.lang.String" value="Page numbers:"/>
325+
<Property name="text" type="java.lang.String" value="Pages with highlight/notes:"/>
320326
</Properties>
321327
</Component>
322328
<Component class="javax.swing.JLabel" name="selectHighlightLabel">
323329
<Properties>
324-
<Property name="text" type="java.lang.String" value="Highlight as associated notes. (Double-click to change)"/>
330+
<Property name="text" type="java.lang.String" value="Highlight and notes association. (Double-click to change)"/>
325331
</Properties>
326332
</Component>
327333
<Container class="javax.swing.JScrollPane" name="highlightsScrollPane">
@@ -432,7 +438,7 @@
432438
<Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
433439
<ComponentRef name="pdfSkipPagesSpinner"/>
434440
</Property>
435-
<Property name="text" type="java.lang.String" value="Number of pages to skip:"/>
441+
<Property name="text" type="java.lang.String" value="Number of pages before page 1:"/>
436442
</Properties>
437443
</Component>
438444
<Component class="javax.swing.JSpinner" name="pdfSkipPagesSpinner">

src/coderarjob/kpdfsync/poc/MainFrame.java

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
669669
headerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
670670
.addGroup(headerPanelLayout.createSequentialGroup()
671671
.addComponent(logoLabel)
672-
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
672+
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 552, Short.MAX_VALUE)
673673
.addComponent(optionsButton)
674674
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
675675
.addComponent(exitButton)
@@ -730,9 +730,9 @@ public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
730730
});
731731
pageNumbersScrollPane.setViewportView(pageNumbersList);
732732

733-
pageNumbersLabel.setText("Page numbers:");
733+
pageNumbersLabel.setText("Pages with highlight/notes:");
734734

735-
selectHighlightLabel.setText("Highlight as associated notes. (Double-click to change)");
735+
selectHighlightLabel.setText("Highlight and notes association. (Double-click to change)");
736736

737737
highlightsList.setBorder(javax.swing.BorderFactory.createEtchedBorder());
738738
highlightsList.setModel(highlightsListModel);
@@ -785,7 +785,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
785785
statusLabel.setText("Status:");
786786

787787
pdfSkipPagesLabel.setLabelFor(pdfSkipPagesSpinner);
788-
pdfSkipPagesLabel.setText("Number of pages to skip:");
788+
pdfSkipPagesLabel.setText("Number of pages before page 1:");
789789

790790
pdfSkipPagesSpinner.setModel(new javax.swing.SpinnerNumberModel());
791791

@@ -814,19 +814,18 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
814814
.addContainerGap())
815815
.addGroup(layout.createSequentialGroup()
816816
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
817-
.addComponent(selectPdfFileLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 152, Short.MAX_VALUE)
817+
.addComponent(selectPdfFileLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
818818
.addComponent(pdfSkipPagesLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
819819
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
820820
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
821821
.addGroup(layout.createSequentialGroup()
822822
.addComponent(pdfSkipPagesSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)
823-
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
823+
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
824824
.addComponent(matchThressholdLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 183, javax.swing.GroupLayout.PREFERRED_SIZE)
825825
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
826826
.addComponent(matchThressholdSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)
827827
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
828-
.addComponent(percentLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)
829-
.addGap(372, 372, 372))
828+
.addComponent(percentLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE))
830829
.addGroup(layout.createSequentialGroup()
831830
.addComponent(selectPdfFileTextBox)
832831
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
@@ -838,11 +837,15 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
838837
.addGroup(layout.createSequentialGroup()
839838
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
840839
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
841-
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
842-
.addComponent(selectBookNameLabel)
843-
.addComponent(clippingsFileLabel)
844-
.addComponent(statusLabel))
845-
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
840+
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
841+
.addGroup(layout.createSequentialGroup()
842+
.addComponent(statusLabel)
843+
.addGap(158, 158, 158))
844+
.addGroup(layout.createSequentialGroup()
845+
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
846+
.addComponent(selectBookNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
847+
.addComponent(clippingsFileLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
848+
.addGap(37, 37, 37)))
846849
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
847850
.addComponent(selectBookNameComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
848851
.addComponent(clippingsFileTextBox))
@@ -853,7 +856,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
853856
.addGap(5, 5, 5))
854857
.addComponent(selectHighlightLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
855858
.addGroup(layout.createSequentialGroup()
856-
.addComponent(pageNumbersLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
859+
.addComponent(pageNumbersLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE)
857860
.addGap(0, 0, Short.MAX_VALUE))))
858861
);
859862
layout.setVerticalGroup(

0 commit comments

Comments
 (0)