Skip to content

Commit 65e7566

Browse files
committed
Small fixes
1 parent d1ca52e commit 65e7566

File tree

3 files changed

+53
-110
lines changed

3 files changed

+53
-110
lines changed

jabgui/src/main/java/org/jabref/gui/util/component/HelpButton.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
public class HelpButton extends Button {
2020
private final StringProperty helpUrl = new SimpleStringProperty("");
21+
private final StringProperty tooltip = new SimpleStringProperty("");
2122
private boolean isHelpFileSet = false;
2223

2324
public HelpButton() {

jabgui/src/main/resources/org/jabref/gui/libraryproperties/keypattern/KeyPatternProperties.fxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
fx:controller="org.jabref.gui.libraryproperties.keypattern.KeyPatternPropertiesView">
1313
<HBox alignment="BOTTOM_LEFT" spacing="8.0">
1414
<Label styleClass="sectionHeader" text="%Key patterns"/>
15-
<HelpButton helpUrl="https://docs.jabref.org/setup/citationkeypatterns"/>
15+
<HelpButton helpUrl="https://docs.jabref.org/setup/citationkeypatterns" tooltip="%Help on key patterns"/>
1616
</HBox>
1717
<Label text="%( Note: Press return to commit changes in the table! )"/>
1818
<AnchorPane VBox.vgrow="ALWAYS">

jabgui/src/main/resources/org/jabref/gui/preferences/citationkeypattern/CitationKeyPatternTab.fxml

Lines changed: 51 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -13,139 +13,81 @@
1313
<?import javafx.scene.layout.VBox?>
1414
<?import org.jabref.gui.commonfxcontrols.CitationKeyPatternsPanel?>
1515
<?import org.jabref.gui.util.component.HelpButton?>
16-
<fx:root
17-
spacing="10.0"
18-
type="VBox"
19-
xmlns="http://javafx.com/javafx"
20-
xmlns:fx="http://javafx.com/fxml"
21-
fx:controller="org.jabref.gui.preferences.citationkeypattern.CitationKeyPatternTab">
16+
<fx:root spacing="10.0" type="VBox"
17+
xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml"
18+
fx:controller="org.jabref.gui.preferences.citationkeypattern.CitationKeyPatternTab">
2219
<fx:define>
23-
<ToggleGroup
24-
fx:id="uniqueKeyLetters"/>
20+
<ToggleGroup fx:id="uniqueKeyLetters"/>
2521
</fx:define>
26-
<Label styleClass="titleHeader"
27-
text="%Citation key patterns"/>
22+
<Label styleClass="titleHeader" text="%Citation key patterns"/>
2823

29-
<GridPane
30-
styleClass="innerGridPane">
24+
<GridPane styleClass="innerGridPane">
3125
<columnConstraints>
32-
<ColumnConstraints
33-
hgrow="SOMETIMES"
34-
percentWidth="30.0"/>
35-
<ColumnConstraints
36-
hgrow="SOMETIMES"/>
37-
<ColumnConstraints
38-
hgrow="NEVER"/>
26+
<ColumnConstraints hgrow="SOMETIMES" percentWidth="30.0"/>
27+
<ColumnConstraints hgrow="SOMETIMES"/>
28+
<ColumnConstraints hgrow="NEVER"/>
3929
</columnConstraints>
4030

41-
<Label styleClass="sectionHeader"
42-
text="%General"
43-
GridPane.columnIndex="0"
44-
GridPane.columnSpan="3"
45-
GridPane.rowIndex="0"/>
31+
<Label styleClass="sectionHeader" text="%General"
32+
GridPane.columnIndex="0" GridPane.columnSpan="3" GridPane.rowIndex="0"/>
4633

47-
<CheckBox
48-
fx:id="overwriteAllow"
49-
text="%Overwrite existing keys"
50-
GridPane.columnIndex="0"
51-
GridPane.columnSpan="3"
52-
GridPane.rowIndex="1"/>
34+
<CheckBox fx:id="overwriteAllow" text="%Overwrite existing keys"
35+
GridPane.columnIndex="0" GridPane.columnSpan="3" GridPane.rowIndex="1"/>
5336
<HBox styleClass="prefIndent"
54-
GridPane.columnIndex="0"
55-
GridPane.columnSpan="3"
56-
GridPane.rowIndex="2">
57-
<CheckBox
58-
fx:id="overwriteWarning"
59-
text="%Warn before overwriting existing keys"
60-
disable="${!overwriteAllow.selected}"/>
37+
GridPane.columnIndex="0" GridPane.columnSpan="3" GridPane.rowIndex="2">
38+
<CheckBox fx:id="overwriteWarning"
39+
text="%Warn before overwriting existing keys"
40+
disable="${!overwriteAllow.selected}"/>
6141
</HBox>
62-
<CheckBox
63-
fx:id="generateOnSave"
64-
text="%Generate keys before saving (for entries without a key)"
65-
GridPane.columnIndex="0"
66-
GridPane.columnSpan="3"
67-
GridPane.rowIndex="3"/>
68-
<CheckBox
69-
fx:id="generateNewKeyOnImport"
70-
text="%Generate a new key for imported entries (overwriting their default)"
71-
GridPane.columnIndex="0"
72-
GridPane.columnSpan="3"
73-
GridPane.rowIndex="4"/>
42+
<CheckBox fx:id="generateOnSave" text="%Generate keys before saving (for entries without a key)"
43+
GridPane.columnIndex="0" GridPane.columnSpan="3" GridPane.rowIndex="3"/>
44+
<CheckBox fx:id="generateNewKeyOnImport" text="%Generate a new key for imported entries (overwriting their default)"
45+
GridPane.columnIndex="0" GridPane.columnSpan="3" GridPane.rowIndex="4"/>
7446

75-
<Label text="%Letters after duplicate generated keys"
76-
GridPane.columnIndex="0"
77-
GridPane.columnSpan="3"
78-
GridPane.rowIndex="5"/>
79-
<VBox spacing="10.0"
80-
styleClass="prefIndent"
81-
GridPane.columnIndex="0"
82-
GridPane.columnSpan="3"
83-
GridPane.rowIndex="6">
84-
<RadioButton
85-
fx:id="letterStartA"
86-
text="%Start on second duplicate key with letter A (a, b, ...)"
87-
toggleGroup="$uniqueKeyLetters"/>
88-
<RadioButton
89-
fx:id="letterStartB"
90-
text="%Start on second duplicate key with letter B (b, c, ...)"
91-
toggleGroup="$uniqueKeyLetters"/>
92-
<RadioButton
93-
fx:id="letterAlwaysAdd"
94-
text="%Always add letter (a, b, ...) to generated keys"
95-
toggleGroup="$uniqueKeyLetters"/>
47+
<Label text="%Letters after duplicate generated keys" GridPane.columnIndex="0"
48+
GridPane.columnSpan="3" GridPane.rowIndex="5"/>
49+
<VBox spacing="10.0" styleClass="prefIndent"
50+
GridPane.columnIndex="0" GridPane.columnSpan="3" GridPane.rowIndex="6">
51+
<RadioButton fx:id="letterStartA"
52+
text="%Start on second duplicate key with letter A (a, b, ...)"
53+
toggleGroup="$uniqueKeyLetters"/>
54+
<RadioButton fx:id="letterStartB"
55+
text="%Start on second duplicate key with letter B (b, c, ...)"
56+
toggleGroup="$uniqueKeyLetters"/>
57+
<RadioButton fx:id="letterAlwaysAdd"
58+
text="%Always add letter (a, b, ...) to generated keys"
59+
toggleGroup="$uniqueKeyLetters"/>
9660
</VBox>
9761

9862
<Label text="%Replace (regular expression)"
99-
GridPane.columnIndex="0"
100-
GridPane.rowIndex="7"/>
101-
<HBox spacing="4.0"
102-
alignment="CENTER_LEFT"
103-
GridPane.columnIndex="1"
104-
GridPane.rowIndex="7">
105-
<TextField
106-
fx:id="keyPatternRegex"
107-
HBox.hgrow="ALWAYS"/>
63+
GridPane.columnIndex="0" GridPane.rowIndex="7"/>
64+
<HBox spacing="4.0" alignment="CENTER_LEFT"
65+
GridPane.columnIndex="1" GridPane.rowIndex="7">
66+
<TextField fx:id="keyPatternRegex" HBox.hgrow="ALWAYS"/>
10867
<Label text="%by"/>
109-
<TextField
110-
fx:id="keyPatternReplacement"
111-
HBox.hgrow="ALWAYS"/>
68+
<TextField fx:id="keyPatternReplacement" HBox.hgrow="ALWAYS"/>
11269
</HBox>
113-
<HelpButton
114-
helpUrl="https://docs.jabref.org/setup/citationkeypatterns#replace-via-regular-expression"
115-
GridPane.columnIndex="2"
116-
GridPane.rowIndex="7"/>
70+
<HelpButton helpUrl="https://docs.jabref.org/setup/citationkeypatterns#replace-via-regular-expression"
71+
GridPane.columnIndex="2" GridPane.rowIndex="7"/>
11772

11873
<Label text="%Remove the following characters:"
119-
GridPane.columnIndex="0"
120-
GridPane.rowIndex="8"/>
121-
<TextField
122-
fx:id="unwantedCharacters"
123-
GridPane.columnIndex="1"
124-
GridPane.rowIndex="8"/>
74+
GridPane.columnIndex="0" GridPane.rowIndex="8"/>
75+
<TextField fx:id="unwantedCharacters"
76+
GridPane.columnIndex="1" GridPane.rowIndex="8"/>
12577
</GridPane>
12678

127-
12879
<HBox spacing="8.0">
129-
<Label styleClass="sectionHeader"
130-
text="%Key patterns"/>
131-
<VBox alignment="BOTTOM_CENTER" >
132-
<HelpButton
133-
helpUrl="https://docs.jabref.org/setup/citationkeypatterns"
134-
styleClass="headerHelpButton"
135-
/>
80+
<Label styleClass="sectionHeader" text="%Key patterns"/>
81+
<VBox alignment="BOTTOM_CENTER">
82+
<HelpButton helpUrl="https://docs.jabref.org/setup/citationkeypatterns" styleClass="headerHelpButton"/>
13683
</VBox>
13784
</HBox>
13885

13986
<Label text="%( Note: Press return to commit changes in the table! )"/>
14087
<AnchorPane>
141-
<CitationKeyPatternsPanel
142-
fx:id="bibtexKeyPatternTable"
143-
AnchorPane.leftAnchor="0.0"
144-
AnchorPane.rightAnchor="0.0"
145-
prefHeight="180.0"/>
146-
<Button text="%Reset All"
147-
onAction="#resetAllKeyPatterns"
148-
AnchorPane.rightAnchor="0.0"
149-
AnchorPane.topAnchor="0.0"/>
88+
<CitationKeyPatternsPanel fx:id="bibtexKeyPatternTable"
89+
AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" prefHeight="180.0"/>
90+
<Button text="%Reset All" onAction="#resetAllKeyPatterns"
91+
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"/>
15092
</AnchorPane>
15193
</fx:root>

0 commit comments

Comments
 (0)