@Override public void browse(String url) { application.getHostServices().showDocument(url); } }
public static void main(final String[] arguments) { Application.launch(arguments); } }
@Override public void clearLog() { runLater(outputMessages::clear); }
/** * This method is used to run a specified Runnable in the FX Application thread, * it returns before the task finished execution * * @param doRun This is the sepcifed task to be excuted by the FX Application thread * @return Nothing */ public static void runInFX(Runnable doRun) { if (Platform.isFxApplicationThread()) { doRun.run(); return; } Platform.runLater(doRun); }
@FXML private void submit() { if (toolbarPopupList.getSelectionModel().getSelectedIndex() == 1) { Platform.exit(); } } }
private void parseParameters(Parameters params) { List<String> raw = params.getRaw(); if (!raw.contains("-v") && !raw.contains("--verbose")) { // error output is disabled by default System.err.close(); } }
@Override public void clear(){ Platform.runLater(issues::clear); }
public static void main(String[] args) { Application.launch(args); }
@Override public void post(Issue issue) { Platform.runLater( () -> { issues.add(issue); }); }
public static void main(String[] args) { Application.launch(args); }
@Override public void log(Label line) { runLater(() -> outputMessages.add(line)); }
private void addToOutputMessages(Node node) { runLater(() -> outputMessages.add(node)); }
/** * @param maximized */ public void setMaximized(boolean maximized) { if (this.maximized != maximized) { Platform.runLater(() -> { btnMax.fire(); }); } }
/** * Executed when the user selects a node in a treeView or listView. * * @param isFromNameDecl Whether the node was selected in the scope hierarchy treeview */ public void onNodeItemSelected(Node selectedValue, boolean isFromNameDecl) { // doing that in parallel speeds it up Platform.runLater(() -> nodeInfoPanelController.setFocusNode(selectedValue, isFromNameDecl)); Platform.runLater(() -> sourceEditorController.setFocusNode(selectedValue)); }
private void clear(Text text) { final List<Rectangle> rectangles = boxes.get(text); if(rectangles != null && !rectangles.isEmpty()) Platform.runLater(() -> getParentChildren(parent).removeAll(rectangles)); } }
private void applySuggestion(int insertionIndex, String toReplace, String replacement) { myCodeArea.replaceText(insertionIndex, insertionIndex + toReplace.length(), replacement); Platform.runLater(autoCompletePopup::hide); }
@Override public void showNotification(String message, Icon icon, Palette palette, Runnable action) { runLater(() -> notifications.add(new NotificationImpl(message, icon, palette, action)) ); }
@Override public void startEdit() { Platform.runLater(() -> { textField.selectAll(); textField.requestFocus(); }); }
@Override public void updateItem(T item, boolean empty) { Platform.runLater(() -> { textField.selectAll(); textField.requestFocus(); }); }
@Override public void initialize(URL location, ResourceBundle resources) { runLater(() -> prepareTree(ui.projectProperty())); }