List of usage examples for javafx.scene Node equals
public boolean equals(Object obj)
From source file:cz.lbenda.dataman.rc.DatamanApp.java
private void focusNode(@Nonnull Node node) { detailTabs.getTabs().stream().filter(tab -> node.equals(tab.getContent())) .forEach(tab -> this.detailTabs.getSelectionModel().select(tab)); }
From source file:cz.lbenda.dataman.rc.DatamanApp.java
/** Add node to center pane */ private void addRemoveToDetail(@Nonnull String title, @Nonnull Node node, boolean closable) { boolean removed = false; for (Iterator<Tab> itt = detailTabs.getTabs().iterator(); itt.hasNext();) { Tab tab = itt.next();/*from w ww.ja v a 2s . c o m*/ if (node.equals(tab.getContent())) { itt.remove(); removed = true; } } if (!removed) { Tab tab = new Tab(title, node); tab.setClosable(closable); this.detailTabs.getTabs().add(tab); this.detailTabs.getSelectionModel().select(tab); } }