Skip to content

Commit

Permalink
Cleanup after merge
Browse files Browse the repository at this point in the history
  • Loading branch information
florian-beetz committed Jul 23, 2018
1 parent 88751da commit 85f9685
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@
requires jgoodies.forms;
requires commons.logging;
requires com.google.common;
requires spin;
requires easybind;
requires de.jensd.fx.glyphs.commons;
requires controlsfx;
requires mvvmfx;

// Libre Office
/*requires ridl;
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/jabref/Globals.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ private static void stopTelemetryClient() {
client.flush();

//FIXME: Workaround for bug https://github.com/Microsoft/ApplicationInsights-Java/issues/662
SDKShutdownActivity.INSTANCE.stopAll();
// TODO: Java 9, Application Insights
// SDKShutdownActivity.INSTANCE.stopAll();
});
}

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/jabref/gui/actions/ActionFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ public Button createIconButton(Action action, Command command) {
public ButtonBase configureIconButton(Action action, Command command, ButtonBase button) {
ActionUtils.configureButton(
new JabRefAction(action, command, keyBindingRepository),
button,
ActionUtils.ActionTextBehavior.HIDE);
button/*,
ActionUtils.ActionTextBehavior.HIDE*/); // TODO: Java 9 why is this argument too much?

button.getStyleClass().add("flatButton");

Expand Down
53 changes: 26 additions & 27 deletions src/main/java/org/jabref/gui/fieldeditors/EditorTextField.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@
import java.util.function.Supplier;

import javafx.fxml.Initializable;
import javafx.scene.control.ContextMenu;
import javafx.scene.control.MenuItem;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;

import com.sun.javafx.scene.control.skin.TextFieldSkin;
//import com.sun.javafx.scene.control.skin.TextFieldSkin;

// TODO: java 9 TextFieldSkin not accessible in Java 9
public class EditorTextField extends javafx.scene.control.TextField implements Initializable, ContextMenuAddable {

public EditorTextField() {
Expand All @@ -27,35 +26,35 @@ public EditorTextField(final String text) {

// Should behave as a normal text field with respect to TAB behaviour
addEventFilter(KeyEvent.KEY_PRESSED, event -> {
if (event.getCode() == KeyCode.TAB) {
TextFieldSkin skin = (TextFieldSkin) getSkin();
if (event.isShiftDown()) {
// Shift + Tab > previous text area
skin.getBehavior().traversePrevious();
} else {
if (event.isControlDown()) {
// Ctrl + Tab > insert tab
skin.getBehavior().callAction("InsertTab");
} else {
// Tab > next text area
skin.getBehavior().traverseNext();
}
}
event.consume();
}
// if (event.getCode() == KeyCode.TAB) {
// TextFieldSkin skin = (TextFieldSkin) getSkin();
// if (event.isShiftDown()) {
// // Shift + Tab > previous text area
// skin.getBehavior().traversePrevious();
// } else {
// if (event.isControlDown()) {
// // Ctrl + Tab > insert tab
// skin.getBehavior().callAction("InsertTab");
// } else {
// // Tab > next text area
// skin.getBehavior().traverseNext();
// }
// }
// event.consume();
// }
});
}

@Override
public void addToContextMenu(final Supplier<List<MenuItem>> items) {
TextFieldSkin customContextSkin = new TextFieldSkin(this) {
@Override
public void populateContextMenu(ContextMenu contextMenu) {
super.populateContextMenu(contextMenu);
contextMenu.getItems().addAll(0, items.get());
}
};
setSkin(customContextSkin);
// TextFieldSkin customContextSkin = new TextFieldSkin(this) {
// @Override
// public void populateContextMenu(ContextMenu contextMenu) {
// super.populateContextMenu(contextMenu);
// contextMenu.getItems().addAll(0, items.get());
// }
// };
// setSkin(customContextSkin);
}

@Override
Expand Down

0 comments on commit 85f9685

Please sign in to comment.