@Deprecated void addSublist(JFXListView<?> subList, int index) { if (!sublistsProperty.get().contains(subList)) { sublistsProperty.get().add(subList); sublistsIndices.put(index, subList); subList.getSelectionModel().selectedIndexProperty().addListener((o, oldVal, newVal) -> { if (newVal.intValue() != -1) { updateOverAllSelectedIndex(); } }); } }
/** * @return true if the column is grouped else false */ public boolean isGrouped() { return getTreeTableView() instanceof JFXTreeTableView && ((JFXTreeTableView<?>) getTreeTableView()).getGroupOrder() .contains( this); }
if (groupOrder.contains(treeTableColumn)) { continue;
@Override protected void layoutChildren() { super.layoutChildren(); if (!getChildren().contains(selectedPane)) { getChildren().add(0, cellRippler); cellRippler.rippler.clear(); getChildren().add(0, selectedPane); } cellRippler.resizeRelocate(0, 0, getWidth(), getHeight()); cellRippler.releaseRipple(); selectedPane.resizeRelocate(0, 0, selectedPane.prefWidth(-1), getHeight()); selectedPane.setVisible(isSelected() ? true : false); }
@Override protected Node createUndecoratedEditor() { final ChoiceBox<T> box = new ChoiceBox<>(alternatives); final T val = currentValue.getValue(); if (alternatives.contains(val)) { box.setValue(val); } else { box.setValue(alternatives.get(0)); } currentValue.bindBidirectional(box.valueProperty()); return box; } }
/** * validates the value of the tree item, * this method also hides the column value for the grouped nodes * * @param param tree item * @return true if the value is valid else false */ public final boolean validateValue(CellDataFeatures<S, T> param) { Object rowObject = param.getValue().getValue(); return !((rowObject instanceof RecursiveTreeObject && rowObject.getClass() == RecursiveTreeObject.class) || (param.getTreeTableView() instanceof JFXTreeTableView && ((JFXTreeTableView<?>) param.getTreeTableView()).getGroupOrder().contains(this) // make sure the node is a direct child to a group node && param.getValue().getParent() != null && param.getValue().getParent().getValue() != null && param.getValue().getParent().getValue().getClass() == RecursiveTreeObject.class )); }
/** * this method will update the source control after evaluating the validation condition */ protected void onEval() { Node control = getSrcControl(); if (hasErrors.get()) { control.pseudoClassStateChanged(PSEUDO_CLASS_ERROR, true); if (control instanceof Control) { Tooltip controlTooltip = ((Control) control).getTooltip(); if (controlTooltip != null && !controlTooltip.getStyleClass().contains("error-tooltip")) { tooltip = ((Control) control).getTooltip(); } errorTooltip.setText(getMessage()); ((Control) control).setTooltip(errorTooltip); } } else { if (control instanceof Control) { Tooltip controlTooltip = ((Control) control).getTooltip(); if ((controlTooltip != null && controlTooltip.getStyleClass().contains("error-tooltip")) || (controlTooltip == null && tooltip != null)) { ((Control) control).setTooltip(tooltip); } tooltip = null; } control.pseudoClassStateChanged(PSEUDO_CLASS_ERROR, false); } }
OverLayRipple() { super(); setOverLayBounds(this); this.getStyleClass().add("jfx-rippler-overlay"); // update initial position if(JFXRippler.this.getChildrenUnmodifiable().contains(control)) { double diffMinX = Math.abs(control.getBoundsInLocal().getMinX() - control.getLayoutBounds().getMinX()); double diffMinY = Math.abs(control.getBoundsInLocal().getMinY() - control.getLayoutBounds().getMinY()); Bounds bounds = control.getBoundsInParent(); this.setX(bounds.getMinX() + diffMinX - snappedLeftInset()); this.setY(bounds.getMinY() + diffMinY - snappedTopInset()); } // set initial attributes setOpacity(0); setCache(true); setCacheHint(CacheHint.SPEED); setCacheShape(true); setManaged(false); } }
protected void initControlListeners() { // if the control got resized the overlay rect must be rest control.layoutBoundsProperty().addListener(observable -> resetRippler()); if (getChildren().contains(control)) { control.boundsInParentProperty().addListener(observable -> resetRippler()); } control.addEventHandler(MouseEvent.MOUSE_PRESSED, (event) -> createRipple(event.getX() + padding, event.getY() + padding)); // create fade out transition for the ripple control.addEventHandler(MouseEvent.MOUSE_RELEASED, e -> releaseRipple()); }
/** * init mouse listeners on the control */ protected void initControlListeners() { // if the control got resized the overlay rect must be rest control.layoutBoundsProperty().addListener(observable -> resetRippler()); if(getChildren().contains(control)) control.boundsInParentProperty().addListener(observable -> resetRippler()); control.addEventHandler(MouseEvent.MOUSE_PRESSED, (event) -> createRipple(event.getX(), event.getY())); // create fade out transition for the ripple control.addEventHandler(MouseEvent.MOUSE_RELEASED, e -> releaseRipple()); }
if (!dayCell.getStyleClass().contains("selected")) { dayCell.setBackground(new Background(new BackgroundFill(Color.valueOf("#EDEDED"), new CornerRadii(40), if (!dayCell.getStyleClass().contains("selected")) { dayCell.setBackground(new Background(new BackgroundFill(Color.TRANSPARENT, CornerRadii.EMPTY,
void hasUnseenErrors(boolean value) { if (value) { if (!(anim.getStatus() == Status.RUNNING)) { anim.play(); } if (!getStyleClass().contains(HAS_ERRORS_CSS_CLASS)) { getStyleClass().add(HAS_ERRORS_CSS_CLASS); } } else { getStyleClass().remove(HAS_ERRORS_CSS_CLASS); anim.stop(); setRotate(0); setScaleY(1); } } }
private void updateStyleClass(Tab tab, boolean modified) { if (modified) { if (!tab.getStyleClass().contains(DOCKABLE_MODIFIED_STYLE_CLASS)) { tab.getStyleClass().add(DOCKABLE_MODIFIED_STYLE_CLASS); } } else { if (tab.getStyleClass().contains(DOCKABLE_MODIFIED_STYLE_CLASS)) { tab.getStyleClass().remove(DOCKABLE_MODIFIED_STYLE_CLASS); } } } }
/** * Create the expanded content node that should represent the current table row. * * If the expanded content node is not currently in the children list of the TableRow it is automatically added. * * @return The expanded content Node */ private Node getContent() { Node node = expander.getOrCreateExpandedNode(tableRow); if (!getChildren().contains(node)) getChildren().add(node); return node; }
/** * @return true if the column is grouped else false */ public boolean isGrouped() { return getTreeTableView() instanceof JFXTreeTableView && ((JFXTreeTableView<?>) getTreeTableView()).getGroupOrder() .contains( this); }
@Override protected void updateChildren() { super.updateChildren(); getChildren().removeIf(node -> node.getStyleClass().contains("box")); if (rippler != null) { getChildren().add(rippler); } }
public void doAddPart(final ModelObject<PartConfig<?, ?>> model, final Wave wave) { if (!object().panes().contains(model.object())) { doInsertPart(-1, model, wave); } view().addItem(-1, model.node()); }
public void setLabelVisible(boolean b) { if (!b) { getChildren().remove(label); barGroup.translateXProperty().unbind(); barGroup.translateYProperty().unbind(); barGroup.setTranslateX(0); barGroup.setTranslateY(0); } else if (!getChildren().contains(label)) { getChildren().add(label); setLabelPosition(labelPosition); } }
public void setLabelVisible(boolean b) { if (!b) { getChildren().remove(label); barGroup.translateXProperty().unbind(); barGroup.translateYProperty().unbind(); barGroup.setTranslateX(0); barGroup.setTranslateY(0); } else if (!getChildren().contains(label)) { getChildren().add(label); setLabelPosition(labelPosition); } }