@Override protected double computePrefWidth(double height) { double width = 0.0F; for (Node child : getChildren()) { if (child instanceof TabHeaderContainer && child.isVisible() && (measureClosingTabs || !((TabHeaderContainer) child).isClosing)) { width += child.prefWidth(height); } } return snapSize(width) + snappedLeftInset() + snappedRightInset(); }
Text text = ((Text) node); final int beginIndex = text.getText().toLowerCase().indexOf(query.toLowerCase()); if (beginIndex > -1 && node.isVisible()) { ArrayList<Bounds> boundingBoxes = getMatchingBounds(query, text); ArrayList<Rectangle> rectangles = new ArrayList<>();
@Override protected void layoutChildren(double x, double y, double w, double h) { updateDisclosureNode(); double disclosureWidth = 0; Node disclosureNode = ((JFXTreeTableCell<S, T>) getSkinnable()).getDisclosureNode(); if (disclosureNode.isVisible()) { Pos alignment = getSkinnable().getAlignment(); alignment = alignment == null ? Pos.CENTER_LEFT : alignment; layoutInArea(disclosureNode, x + 8, y, w, h, 0, Insets.EMPTY, false, false, HPos.LEFT, VPos.CENTER); disclosureWidth = disclosureNode.getLayoutBounds().getWidth() + 18; } super.layoutChildren(x + disclosureWidth, y, w - disclosureWidth, h); } }
public static boolean isNotVisible(Node node) { return !node.isVisible(); }
@SuppressWarnings("deprecated") public static boolean isNotVisible(Node node) { return !node.isVisible() || !node.impl_isTreeVisible(); }
/** * Determine if a node is effectively visible. * This means that if the node or any of its parents are not visible, the node is effectively not visible. * Otherwise it is visible. * * @param n * @return */ static public boolean isEffectivelyVisible(Node n) { while (n != null) { if (!n.isVisible()) { return false; } n = n.getParent(); } return true; }
public C getVisibleCell(int itemIndex) { C cell = cellManager.getPresentCell(itemIndex); if(cell.getNode().isVisible()) { return cell; } else { throw new NoSuchElementException( "Cell " + itemIndex + " is not visible"); } }
public Optional<C> getCellIfVisible(int itemIndex) { return cellManager.getCellIfPresent(itemIndex) .filter(c -> c.getNode().isVisible()); }
protected void assertNotVisible(String string) { Node lNode = find(string); if (lNode.isVisible()) { Assert.fail("Should not have found '" + string + "', but did anyway"); } }
@SuppressWarnings("deprecation") public static boolean isNodeVisible(Node node) { if(!node.isVisible() || !node.impl_isTreeVisible()) return false; return isNodeWithinSceneBounds(node); }
/** * */ @Override public void validate() { if(getDisplay().isVisible()){ editInputComponent.validate(); } }
/** * */ @Override public boolean isNotValid() { if(getDisplay().isVisible()){ return editInputComponent.isNotValid(); } else { return false; } }
for( Node node: parent.getChildrenUnmodifiable()) { if( node.isVisible() && !node.isDisabled() && node.isFocusTraversable()) return node; } return null;
/** * */ @Override public void displayError() { if(getDisplay().isVisible()) { editInputComponent().displayError(); } }
public OptionalInt lastVisibleBefore(int position) { MemoizationList<C> cells = cellManager.getLazyCellList(); int presentBefore = cells.getMemoizedCountBefore(position); for(int i = presentBefore - 1; i >= 0; --i) { C cell = cells.memoizedItems().get(i); if(cell.getNode().isVisible()) { return OptionalInt.of(cells.indexOfMemoizedItem(i)); } } return OptionalInt.empty(); }
public OptionalInt firstVisibleAfter(int position) { MemoizationList<C> cells = cellManager.getLazyCellList(); int presentBefore = cells.getMemoizedCountBefore(position); int present = cells.getMemoizedCount(); for(int i = presentBefore; i < present; ++i) { C cell = cells.memoizedItems().get(i); if(cell.getNode().isVisible()) { return OptionalInt.of(cells.indexOfMemoizedItem(i)); } } return OptionalInt.empty(); }
@Override protected double computePrefWidth(double height) { double width = 0.0F; for (Node child : getChildren()) { if (child instanceof TabHeaderContainer && child.isVisible() && (measureClosingTabs || !((TabHeaderContainer) child).isClosing)) { width += child.prefWidth(height); } } return snapSize(width) + snappedLeftInset() + snappedRightInset(); }
private void updateConstraints() { AnchorPane.clearConstraints(anchorCenteredPane); AnchorPane.setLeftAnchor(anchorCenteredPane, 0.); AnchorPane.setRightAnchor(anchorCenteredPane, 0.); AnchorPane.setTopAnchor(anchorCenteredPane, 0.); if (bottomNode.isVisible()) { AnchorPane.setBottomAnchor(anchorCenteredPane, 72.0); } else { AnchorPane.setBottomAnchor(anchorCenteredPane, 0.0); } }
@Override protected void layoutChildren(double x, double y, double w, double h) { updateDisclosureNode(); double disclosureWidth = 0; Node disclosureNode = ((JFXTreeTableCell<S, T>) getSkinnable()).getDisclosureNode(); if (disclosureNode.isVisible()) { Pos alignment = getSkinnable().getAlignment(); alignment = alignment == null ? Pos.CENTER_LEFT : alignment; layoutInArea(disclosureNode, x + 8, y, w, h, 0, Insets.EMPTY, false, false, HPos.LEFT, VPos.CENTER); disclosureWidth = disclosureNode.getLayoutBounds().getWidth() + 18; } super.layoutChildren(x + disclosureWidth, y, w - disclosureWidth, h); } }
private static void updateManagedProperty(Node n, DeviceType type) { // first time we've set this invisible => store the preset if (!n.getProperties().containsKey(PROP_MANAGED_STATE)) { n.getProperties().put(PROP_MANAGED_STATE, n.isManaged()); } // don't track changes through this n.managedProperty().removeListener(MANAGED_LISTENER); // If it's visible we use the stored value for "managed" property n.setManaged(n.isVisible() ? (Boolean) n.getProperties().get(PROP_MANAGED_STATE) : false); // need to track changes through API n.managedProperty().addListener(MANAGED_LISTENER); }