本文整理汇总了Java中javafx.scene.control.TreeTableCell类的典型用法代码示例。如果您正苦于以下问题:Java TreeTableCell类的具体用法?Java TreeTableCell怎么用?Java TreeTableCell使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TreeTableCell类属于javafx.scene.control包,在下文中一共展示了TreeTableCell类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getPoint
import javafx.scene.control.TreeTableCell; //导入依赖的package包/类
protected Point2D getPoint(TreeTableView<?> treeTableView, int rowIndex, int columnIndex) {
Set<Node> treeTableRowCell = treeTableView.lookupAll(".tree-table-row-cell");
TreeTableRow<?> row = null;
for (Node tableRow : treeTableRowCell) {
TreeTableRow<?> r = (TreeTableRow<?>) tableRow;
if (r.getIndex() == rowIndex) {
row = r;
break;
}
}
Set<Node> cells = row.lookupAll(".tree-table-cell");
for (Node node : cells) {
TreeTableCell<?, ?> cell = (TreeTableCell<?, ?>) node;
if (treeTableView.getColumns().indexOf(cell.getTableColumn()) == columnIndex) {
Bounds bounds = cell.getBoundsInParent();
Point2D localToParent = cell.localToParent(bounds.getWidth() / 2, bounds.getHeight() / 2);
Point2D rowLocal = row.localToScene(localToParent, true);
return rowLocal;
}
}
return null;
}
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:23,代码来源:RFXComponentTest.java
示例2: call
import javafx.scene.control.TreeTableCell; //导入依赖的package包/类
@Override
public TreeTableCell<ReferenceDescription, ReferenceDescription> call(TreeTableColumn<ReferenceDescription, ReferenceDescription> param) {
return new TreeTableCell<ReferenceDescription, ReferenceDescription>() {
@Override
protected void updateItem(ReferenceDescription item, boolean empty) {
super.updateItem(item, empty);
if (!empty && item != null) {
setText(item.getDisplayName().getText());
setGraphic(createGraphicNode(item));
} else {
setText(null);
setGraphic(null);
}
}
};
}
开发者ID:comtel2000,项目名称:opc-ua-client,代码行数:18,代码来源:DataTreeNodeCellFactory.java
示例3: getVisibleRange
import javafx.scene.control.TreeTableCell; //导入依赖的package包/类
protected static Range getVisibleRange(final Wrap<? extends Control> testedControl) {
int[] visibleIndices;
if (testedControl.getControl() instanceof TableView) {
visibleIndices = org.jemmy.fx.control.TableUtils.shown(
testedControl.getEnvironment(),
testedControl,
new org.jemmy.fx.control.TableUtils.TableViewIndexInfoProvider((TableViewWrap) testedControl), TableCell.class);
} else {
visibleIndices = org.jemmy.fx.control.TableUtils.shown(
testedControl.getEnvironment(),
testedControl,
new org.jemmy.fx.control.TableUtils.TreeTableViewIndexInfoProvider((TreeTableViewWrap) testedControl), TreeTableCell.class);
}
return new Range(visibleIndices[1], visibleIndices[3]);
}
开发者ID:teamfx,项目名称:openjfx-8u-dev-tests,代码行数:18,代码来源:TestBaseCommon.java
示例4: check
import javafx.scene.control.TreeTableCell; //导入依赖的package包/类
@Override
public boolean check(IndexedCell control) {
if (control.isVisible() && control.getOpacity() == 1.0) {
if (isTreeViewTests) {
if (control instanceof TreeCell) {
if ((((TreeCell) control).getTreeItem() != null) && ((TreeCell) control).getTreeItem().equals(item)) {
return true;
}
}
} else {
if (control instanceof TreeTableCell) {
if ((((TreeTableCell) control).getTreeTableRow().getTreeItem() != null) && ((TreeTableCell) control).getTreeTableRow().getTreeItem().equals(item)) {
return true;
}
}
}
}
return false;
}
开发者ID:teamfx,项目名称:openjfx-8u-dev-tests,代码行数:20,代码来源:TreeViewTest.java
示例5: call
import javafx.scene.control.TreeTableCell; //导入依赖的package包/类
@Override
public TreeTableCell<FeatureTableRow, Object> call(TreeTableColumn<FeatureTableRow, Object> p) {
return new TreeTableCell<FeatureTableRow, Object>() {
@Override
public void updateItem(Object object, boolean empty) {
super.updateItem(object, empty);
setStyle("-fx-alignment: CENTER;"
+ "-fx-border-color: transparent -fx-table-cell-border-color -fx-table-cell-border-color transparent;");
if (object == null) {
setText(null);
} else {
NumberFormat formatter = MZmineCore.getConfiguration().getMZFormat();
Double doubleValue = Double.parseDouble(object.toString());
setText(formatter.format(doubleValue));
}
}
};
}
开发者ID:mzmine,项目名称:mzmine3,代码行数:19,代码来源:MzRenderer.java
示例6: call
import javafx.scene.control.TreeTableCell; //导入依赖的package包/类
@Override
public TreeTableCell<FeatureTableRow, Object> call(TreeTableColumn<FeatureTableRow, Object> p) {
return new TreeTableCell<FeatureTableRow, Object>() {
@Override
public void updateItem(Object object, boolean empty) {
super.updateItem(object, empty);
setStyle("-fx-alignment: CENTER;"
+ "-fx-border-color: transparent -fx-table-cell-border-color -fx-table-cell-border-color transparent;");
if (object == null) {
setText(null);
} else {
try {
NumberFormat formatter = new DecimalFormat("#0.00");
Double doubleValue = Double.parseDouble(object.toString());
setText(formatter.format(doubleValue));
} catch (NumberFormatException e) {
setText(object.toString());
}
}
}
};
}
开发者ID:mzmine,项目名称:mzmine3,代码行数:25,代码来源:DefaultRenderer.java
示例7: call
import javafx.scene.control.TreeTableCell; //导入依赖的package包/类
@Override
public TreeTableCell<FeatureTableRow, Object> call(TreeTableColumn<FeatureTableRow, Object> p) {
return new TreeTableCell<FeatureTableRow, Object>() {
@Override
public void updateItem(Object object, boolean empty) {
super.updateItem(object, empty);
setStyle("-fx-alignment: CENTER;"
+ "-fx-border-color: transparent -fx-table-cell-border-color -fx-table-cell-border-color transparent;");
if (object == null) {
setText(null);
} else {
Integer integerValue = Integer.parseInt(object.toString());
setText(integerValue.toString());
}
}
};
}
开发者ID:mzmine,项目名称:mzmine3,代码行数:18,代码来源:IntegerRenderer.java
示例8: call
import javafx.scene.control.TreeTableCell; //导入依赖的package包/类
@Override
public TreeTableCell<FeatureTableRow, Object> call(TreeTableColumn<FeatureTableRow, Object> p) {
return new TreeTableCell<FeatureTableRow, Object>() {
@Override
public void updateItem(Object object, boolean empty) {
super.updateItem(object, empty);
setStyle("-fx-alignment: CENTER;"
+ "-fx-border-color: transparent -fx-table-cell-border-color -fx-table-cell-border-color transparent;");
if (object == null) {
setText(null);
} else {
Range rangeValue = (Range) object;
NumberFormat formatter = MZmineCore.getConfiguration().getMZFormat();
String value = formatter.format(rangeValue.lowerEndpoint()) + " - "
+ formatter.format(rangeValue.upperEndpoint());
setText(value);
}
}
};
}
开发者ID:mzmine,项目名称:mzmine3,代码行数:21,代码来源:RtRangeRenderer.java
示例9: call
import javafx.scene.control.TreeTableCell; //导入依赖的package包/类
@Override
public TreeTableCell<FeatureTableRow, Object> call(TreeTableColumn<FeatureTableRow, Object> p) {
return new TreeTableCell<FeatureTableRow, Object>() {
@Override
public void updateItem(Object object, boolean empty) {
super.updateItem(object, empty);
setStyle("-fx-alignment: CENTER;"
+ "-fx-border-color: transparent -fx-table-cell-border-color -fx-table-cell-border-color transparent;");
if (object == null) {
setText(null);
} else {
Double doubleValue = Double.parseDouble(object.toString());
NumberFormat formatter = MZmineCore.getConfiguration().getIntensityFormat();
setText(formatter.format(doubleValue));
}
}
};
}
开发者ID:mzmine,项目名称:mzmine3,代码行数:19,代码来源:IntensityRenderer.java
示例10: call
import javafx.scene.control.TreeTableCell; //导入依赖的package包/类
@Override
public TreeTableCell<FeatureTableRow, Object> call(TreeTableColumn<FeatureTableRow, Object> p) {
return new TreeTableCell<FeatureTableRow, Object>() {
@Override
public void updateItem(Object object, boolean empty) {
super.updateItem(object, empty);
setStyle("-fx-alignment: CENTER;"
+ "-fx-border-color: transparent -fx-table-cell-border-color -fx-table-cell-border-color transparent;");
if (object == null) {
setText(null);
} else {
NumberFormat formatter = MZmineCore.getConfiguration().getRTFormat();
Float floatValue = Float.parseFloat(object.toString());
setText(formatter.format(floatValue));
}
}
};
}
开发者ID:mzmine,项目名称:mzmine3,代码行数:19,代码来源:RtRenderer.java
示例11: call
import javafx.scene.control.TreeTableCell; //导入依赖的package包/类
@Override
public TreeTableCell<FeatureTableRow, Object> call(TreeTableColumn<FeatureTableRow, Object> p) {
return new TreeTableCell<FeatureTableRow, Object>() {
@Override
public void updateItem(Object object, boolean empty) {
super.updateItem(object, empty);
setStyle("-fx-alignment: CENTER;"
+ "-fx-border-color: transparent -fx-table-cell-border-color -fx-table-cell-border-color transparent;");
if (object == null) {
setText(null);
} else {
// Default format to two decimals
NumberFormat formatter = new DecimalFormat("#0.00");
Double doubleValue = Double.parseDouble(object.toString());
setText(formatter.format(doubleValue));
}
}
};
}
开发者ID:mzmine,项目名称:mzmine3,代码行数:20,代码来源:DoubleRenderer.java
示例12: getTreeTableCell
import javafx.scene.control.TreeTableCell; //导入依赖的package包/类
private TreeTableCell<S, LocalDate> getTreeTableCell() {
return new TreeTableCell<S, LocalDate>() {
@Override
protected void updateItem(LocalDate date, boolean empty) {
super.updateItem(date, empty);
this.setAlignment(Pos.CENTER);
if (empty) {
this.setText(null);
this.setGraphic(null);
} else {
String dateFormatter = DateTimeFormatter.ofPattern("dd.MM.yyyy", Locale.getDefault()).format(date);
this.setText(dateFormatter);
}
}
};
}
开发者ID:khasang,项目名称:Cachoeira,代码行数:17,代码来源:TaskTableView.java
示例13: PgpKeyTreePane
import javafx.scene.control.TreeTableCell; //导入依赖的package包/类
public PgpKeyTreePane() {
loadDynamicComponentFxml(PgpKeyTreePane.class, this);
treeTableView.setShowRoot(false);
treeTableView.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
nameTreeTableColumn.setCellFactory(new Callback<TreeTableColumn<PgpKeyTreeItem<?>,String>, TreeTableCell<PgpKeyTreeItem<?>,String>>() {
@Override
public TreeTableCell<PgpKeyTreeItem<?>, String> call(TreeTableColumn<PgpKeyTreeItem<?>, String> param) {
return new NameCell();
}
});
checkedTreeItems.addListener(new SetChangeListener<PgpKeyTreeItem<?>>() {
@Override
public void onChanged(SetChangeListener.Change<? extends PgpKeyTreeItem<?>> change) {
final PgpKeyTreeItem<?> elementAdded = change.getElementAdded();
if (elementAdded != null)
elementAdded.setChecked(true);
final PgpKeyTreeItem<?> elementRemoved = change.getElementRemoved();
if (elementRemoved != null)
elementRemoved.setChecked(false);
}
});
}
开发者ID:subshare,项目名称:subshare,代码行数:27,代码来源:PgpKeyTreePane.java
示例14: call
import javafx.scene.control.TreeTableCell; //导入依赖的package包/类
@Override
public TreeTableCell<FileTreeItem<?>, String> call(TreeTableColumn<FileTreeItem<?>, String> param) {
return new TreeTableCell<FileTreeItem<?>, String>() {
@Override
protected void updateItem(String value, boolean empty) {
super.updateItem(value, empty);
final FileTreeItem<?> treeItem = getTreeTableRow().getItem();
if (value == null || treeItem == null || empty) {
setText(null);
setGraphic(null);
} else {
setText(value);
setGraphic(treeItem2CollisionIconImageView.get(treeItem));
updateGraphicAsync(this, treeItem);
}
}
};
}
开发者ID:subshare,项目名称:subshare,代码行数:22,代码来源:RepoAwareFileTreePane.java
示例15: getTreeTableCellAt
import javafx.scene.control.TreeTableCell; //导入依赖的package包/类
public TreeTableCell<?, ?> getTreeTableCellAt(TreeTableView<?> treeTableView, Point2D point) {
point = treeTableView.localToScene(point);
Set<Node> lookupAll = getTreeTableCells(treeTableView);
TreeTableCell<?, ?> selected = null;
for (Node cellNode : lookupAll) {
Bounds boundsInScene = cellNode.localToScene(cellNode.getBoundsInLocal(), true);
if (boundsInScene.contains(point)) {
selected = (TreeTableCell<?, ?>) cellNode;
break;
}
}
return selected;
}
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:14,代码来源:JavaFXElementPropertyAccessor.java
示例16: getTreeTableColumnAt
import javafx.scene.control.TreeTableCell; //导入依赖的package包/类
protected int getTreeTableColumnAt(TreeTableView<?> treeTableView, Point2D point) {
TreeTableCell<?, ?> selected = getTreeTableCellAt(treeTableView, point);
if (selected == null) {
return -1;
}
return treeTableView.getColumns().indexOf(selected.getTableColumn());
}
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:8,代码来源:JavaFXElementPropertyAccessor.java
示例17: getTreeTableRowAt
import javafx.scene.control.TreeTableCell; //导入依赖的package包/类
protected int getTreeTableRowAt(TreeTableView<?> treeTableView, Point2D point) {
TreeTableCell<?, ?> selected = getTreeTableCellAt(treeTableView, point);
if (selected == null) {
return -1;
}
return selected.getTreeTableRow().getIndex();
}
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:8,代码来源:JavaFXElementPropertyAccessor.java
示例18: getVisibleCellAt
import javafx.scene.control.TreeTableCell; //导入依赖的package包/类
@SuppressWarnings("rawtypes") public TreeTableCell getVisibleCellAt(TreeTableView<?> treeTableView, int row, int column) {
Set<Node> lookupAll = getTreeTableCells(treeTableView);
TreeTableCell cell = null;
for (Node node : lookupAll) {
TreeTableCell<?, ?> cell1 = (TreeTableCell<?, ?>) node;
TreeTableRow<?> tableRow = cell1.getTreeTableRow();
TreeTableColumn<?, ?> tableColumn = cell1.getTableColumn();
if (tableRow.getIndex() == row && tableColumn == treeTableView.getColumns().get(column)) {
cell = cell1;
break;
}
}
return cell;
}
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:15,代码来源:JavaFXElementPropertyAccessor.java
示例19: getTreeTableCells
import javafx.scene.control.TreeTableCell; //导入依赖的package包/类
private Set<Node> getTreeTableCells(TreeTableView<?> treeTableView) {
Set<Node> l = treeTableView.lookupAll("*");
Set<Node> r = new HashSet<>();
for (Node node : l) {
if (node instanceof TreeTableCell<?, ?>) {
r.add(node);
}
}
return r;
}
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:11,代码来源:JavaFXElementPropertyAccessor.java
示例20: reset
import javafx.scene.control.TreeTableCell; //导入依赖的package包/类
public static void reset() {
add(Node.class, JavaFXElement.class);
add(TextInputControl.class, JavaFXTextInputControlElement.class);
add(HTMLEditor.class, JavaFXHTMLEditor.class);
add(CheckBox.class, JavaFXCheckBoxElement.class);
add(ToggleButton.class, JavaFXToggleButtonElement.class);
add(Slider.class, JavaFXSliderElement.class);
add(Spinner.class, JavaFXSpinnerElement.class);
add(SplitPane.class, JavaFXSplitPaneElement.class);
add(ProgressBar.class, JavaFXProgressBarElement.class);
add(ChoiceBox.class, JavaFXChoiceBoxElement.class);
add(ColorPicker.class, JavaFXColorPickerElement.class);
add(ComboBox.class, JavaFXComboBoxElement.class);
add(DatePicker.class, JavaFXDatePickerElement.class);
add(TabPane.class, JavaFXTabPaneElement.class);
add(ListView.class, JavaFXListViewElement.class);
add(TreeView.class, JavaFXTreeViewElement.class);
add(TableView.class, JavaFXTableViewElement.class);
add(TreeTableView.class, JavaFXTreeTableViewElement.class);
add(CheckBoxListCell.class, JavaFXCheckBoxListCellElement.class);
add(ChoiceBoxListCell.class, JavaFXChoiceBoxListCellElement.class);
add(ComboBoxListCell.class, JavaFXComboBoxListCellElemnt.class);
add(CheckBoxTreeCell.class, JavaFXCheckBoxTreeCellElement.class);
add(ChoiceBoxTreeCell.class, JavaFXChoiceBoxTreeCellElement.class);
add(ComboBoxTreeCell.class, JavaFXComboBoxTreeCellElement.class);
add(TableCell.class, JavaFXTableViewCellElement.class);
add(CheckBoxTableCell.class, JavaFXCheckBoxTableCellElement.class);
add(ChoiceBoxTableCell.class, JavaFXChoiceBoxTableCellElement.class);
add(ComboBoxTableCell.class, JavaFXComboBoxTableCellElemnt.class);
add(TreeTableCell.class, JavaFXTreeTableCellElement.class);
add(CheckBoxTreeTableCell.class, JavaFXCheckBoxTreeTableCell.class);
add(ChoiceBoxTreeTableCell.class, JavaFXChoiceBoxTreeTableCell.class);
add(ComboBoxTreeTableCell.class, JavaFXComboBoxTreeTableCell.class);
}
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:35,代码来源:JavaFXElementFactory.java
注:本文中的javafx.scene.control.TreeTableCell类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论