本文整理了Java中javafx.collections.ObservableList.indexOf()
方法的一些代码示例,展示了ObservableList.indexOf()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ObservableList.indexOf()
方法的具体详情如下:
包路径:javafx.collections.ObservableList
类名称:ObservableList
方法名:indexOf
暂无
代码示例来源:origin: speedment/speedment
private FilteredList<Node> inRow(RowConstraints row) {
final int index = grid.getRowConstraints().indexOf(row);
return grid.getChildren()
.filtered(node -> {
final Integer rowIndex = GridPane.getRowIndex(node);
return rowIndex != null && index == GridPane.getRowIndex(node);
});
}
代码示例来源:origin: jfoenixadmin/JFoenix
public JFXSliderSkin(JFXSlider slider) {
super(slider);
track = (StackPane) getSkinnable().lookup(".track");
thumb = (StackPane) getSkinnable().lookup(".thumb");
coloredTrack = new StackPane();
coloredTrack.getStyleClass().add("colored-track");
coloredTrack.setMouseTransparent(true);
sliderValue = new Text();
sliderValue.getStyleClass().setAll("slider-value");
animatedThumb = new StackPane();
animatedThumb.getStyleClass().add("animated-thumb");
animatedThumb.getChildren().add(sliderValue);
animatedThumb.setMouseTransparent(true);
animatedThumb.setScaleX(0);
animatedThumb.setScaleY(0);
getChildren().add(getChildren().indexOf(thumb), coloredTrack);
getChildren().add(getChildren().indexOf(thumb), animatedThumb);
getChildren().add(0, mouseHandlerPane);
registerChangeListener(slider.valueFactoryProperty(), "VALUE_FACTORY");
initListeners();
}
代码示例来源:origin: jfoenixadmin/JFoenix
while (this.getChildren().indexOf(newVal) != shapesEndIndex - 1) {
final Node temp = this.getChildren().get(shapesEndIndex - 1);
this.getChildren().remove(shapesEndIndex - 1);
代码示例来源:origin: torakiki/pdfsam
private void setFilteredItems(PdfVersion required) {
if (nonNull(required)) {
PdfVersionComboItem selected = getSelectionModel().getSelectedItem();
setItems(unfilteredItems.filtered(t -> t.isHigherOrEqual(required)));
int selecedIndex = getItems().indexOf(selected);
if (selecedIndex != -1) {
getSelectionModel().select(selecedIndex);
} else {
getSelectionModel().selectFirst();
}
}
}
代码示例来源:origin: jfoenixadmin/JFoenix
int index = getSkinnable().getTabs().indexOf(selectedTab);
if (index != i) {
tabsContainer.setTranslateX(-contentWidth * i);
代码示例来源:origin: org.reactfx/reactfx
@Override
public int indexOf(Object o) {
return delegate.indexOf(o);
}
代码示例来源:origin: nl.cloudfarming.client/calendar-api
/**
* Checks if the given value is plottable on this axis
*
* @param value
* The value to check if its on axis
* @return true if the given value is plottable on this axis
*/
@Override
public boolean isValueOnAxis(CalendarNode value) {
return getCategories().indexOf("" + value) != -1;
}
代码示例来源:origin: nl.cloudfarming.client/calendar-api
/**
* All axis values must be representable by some numeric value. This gets
* the numeric value for a given data value.
*
* @param value
* The data value to convert
* @return Numeric value for the given data value
*/
@Override
public double toNumericValue(CalendarNode value) {
return getCategories().indexOf(value);
}
代码示例来源:origin: at.bestsolution.eclipse/org.eclipse.fx.ui.controls
/**
* @return the line length
*/
public int getLineLength() {
int idx = StyledTextSkin.this.lineList.indexOf(this);
String s = getSkinnable().getContent().getLine(idx);
return s.length();
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
public static int getColumnAt(TableView tableView, Point2D point) {
TableCell selected = getTableCellAt(tableView, point);
if (selected == null) {
return -1;
}
return tableView.getColumns().indexOf(selected.getTableColumn());
}
代码示例来源:origin: at.bestsolution.eclipse/org.eclipse.fx.ui.controls
/**
* @return the line offset
*/
public int getLineOffset() {
int idx = StyledTextSkin.this.lineList.indexOf(this);
return getSkinnable().getContent().getOffsetAtLine(idx);
}
代码示例来源:origin: nl.cloudfarming.client/calendar-api
void toFront(Bar bar) {
bar.setOrder(getPlotChildren().indexOf(bar));
getPlotChildren().remove(bar);
getPlotChildren().add(bar);
}
代码示例来源:origin: org.jrebirth.af/component
/**
* Removes the marker.
*
* @return the int
*/
public int removeMarker() {
System.out.println("Remove Marker");
final int idx = getBox().getChildren().indexOf(this.marker);
getBox().getChildren().remove(this.marker);
return idx;
}
代码示例来源:origin: at.bestsolution.eclipse/org.eclipse.fx.ui.controls
/**
* @return the current text
*/
@Override
public String getText() {
return removeLineending(getSkinnable().getContent().getLine(StyledTextSkin.this.lineList.indexOf(this)));
}
代码示例来源:origin: no.tornado/tornadofx-controls
public void focusPrevious(Node current) {
int index = getChildren().indexOf(current);
if (index > 0) {
Node previous = getChildren().get(index - 1);
previous.requestFocus();
}
}
代码示例来源:origin: nl.cloudfarming.client/calendar-api
@Override
protected void dataItemAdded(Series<DateTime, CalendarNode> series, int itemIndex, Data<DateTime, CalendarNode> item) {
Node bar = getBar(getData().indexOf(series), item, itemIndex);
getPlotChildren().add(bar);
if (series.getNode() != null) {
series.getNode().toFront();
}
}
代码示例来源:origin: nl.cloudfarming.client/calendar-api
private int calculateRootPosition(CalendarNode model) {
int index = getCategories().indexOf(getRoot(model));
int position = ZERO_VALUE;
for (int i = 0; i < index; i++) {
CalendarNode root = getCategories().get(i);
int level = getChildrenLevel(root, 0);
position += level * BAR_SHIFT + PADDING;
}
return position;
}
代码示例来源:origin: org.drombler.commons/drombler-commons-fx-docking
private void addTab(PositionableAdapter<FXDockableEntry> dockable) {
final Tab tab = new Tab();
final FXDockableData dockableData = dockable.getAdapted().getDockableData();
tab.textProperty().bind(dockableData.titleProperty());
tab.graphicProperty().bind(dockableData.graphicProperty());
tab.contextMenuProperty().bind(dockableData.contextMenuProperty());
tab.setContent(dockable.getAdapted().getDockable());
tabPane.getTabs().add(control.getDockables().indexOf(dockable), tab);
}
}
代码示例来源:origin: com.github.giulianini.jestures/jestures
private void initTreeView() {
final TreeItem<String> root = new TreeItem<String>("Empty User");
root.setGraphic(ViewUtilities.iconSetter(Material.PERSON, IconDim.SMALL));
this.treeView.setRoot(root);
this.treeView.getSelectionModel().selectedItemProperty().addListener((v, oldValue, newValue) -> {
if (newValue != null && this.treeView.getTreeItemLevel(newValue) == 2) {
this.drawSavedGestureOnCanvas(newValue.getParent(),
newValue.getParent().getChildren().indexOf(newValue));
}
});
}
代码示例来源:origin: org.drombler.commons/drombler-commons-docking-fx
private void addTab(PositionableAdapter<FXDockableEntry> dockable) {
final Tab tab = new Tab();
final FXDockableData dockableData = dockable.getAdapted().getDockableData();
tab.textProperty().bind(dockableData.titleProperty());
tab.graphicProperty().bind(dockableData.graphicProperty());
tab.tooltipProperty().bind(dockableData.tooltipProperty());
tab.contextMenuProperty().bind(dockableData.contextMenuProperty());
tab.setContent(dockable.getAdapted().getDockable());
tab.setOnCloseRequest(tabManager.createOnCloseRequestHandler(tab, dockable.getAdapted(), control));
observeDockableData(dockableData, tab);
tabPane.getTabs().add(control.getDockables().indexOf(dockable), tab);
}
内容来源于网络,如有侵权,请联系作者删除!