Skip to content
forked from JabRef/jabref

Commit

Permalink
Added help button
Browse files Browse the repository at this point in the history
  • Loading branch information
calixtus committed Oct 13, 2019
1 parent 7a39096 commit f82a7c3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<?import javafx.scene.control.TextField?>
<?import javafx.scene.control.ToggleGroup?>

<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>

Expand Down Expand Up @@ -48,10 +49,13 @@
</padding>
</HBox>

<HBox prefWidth="650.0" alignment="BASELINE_CENTER">
<HBox prefWidth="650.0">
<Label styleClass="sectionHeader" text="%Key patterns"/>
<HBox HBox.hgrow="ALWAYS"/>
<Button text="Reset All" onAction="#resetAllKeyPatterns"/>
<Button fx:id="keyPatternHelp" prefWidth="20.0"/>
</HBox>
<HBox fx:id="keyPatternContainer" prefWidth="650.0" prefHeight="220.0"/>
<AnchorPane>
<HBox fx:id="keyPatternContainer" prefWidth="650.0" prefHeight="220.0"/>
<Button text="Reset All" onAction="#resetAllKeyPatterns" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"/>
</AnchorPane>
</fx:root>
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
package org.jabref.gui.preferences;

import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.CheckBox;
import javafx.scene.control.RadioButton;
import javafx.scene.control.TextField;
import javafx.scene.layout.HBox;

import org.jabref.Globals;
import org.jabref.gui.actions.ActionFactory;
import org.jabref.gui.actions.StandardActions;
import org.jabref.gui.bibtexkeypattern.BibtexKeyPatternTableView;
import org.jabref.gui.help.HelpAction;
import org.jabref.logic.help.HelpFile;
import org.jabref.logic.l10n.Localization;
import org.jabref.preferences.JabRefPreferences;

Expand All @@ -24,6 +29,7 @@ public class BibtexKeyPatternTabView extends AbstractPreferenceTabView<BibtexKey
@FXML public TextField keyPatternRegex;
@FXML public TextField keyPatternReplacement;
@FXML public HBox keyPatternContainer;
@FXML public Button keyPatternHelp;

private final BibtexKeyPatternTableView bibtexKeyPatternTable;

Expand Down Expand Up @@ -58,6 +64,9 @@ public void initialize () {
bibtexKeyPatternTable.patternListProperty().bindBidirectional(viewModel.patternListProperty());
bibtexKeyPatternTable.defaultKeyPatternProperty().bindBidirectional(viewModel.defaultKeyPatternProperty());
keyPatternContainer.getChildren().add(bibtexKeyPatternTable);

ActionFactory actionFactory = new ActionFactory(Globals.getKeyPrefs());
actionFactory.configureIconButton(StandardActions.HELP_KEY_PATTERNS, new HelpAction(HelpFile.BIBTEX_KEY_PATTERN), keyPatternHelp);
}

@Override
Expand Down

0 comments on commit f82a7c3

Please sign in to comment.