public SVGGlyph(@NamedArg("svgPathContent") String svgPathContent) { this(-1, "UNNAMED", svgPathContent, Color.BLACK); }
@DefaultProperty(value = "icon") public class DoubleValidator extends ValidatorBase {
public HighLightRectangle(Text text) { listener = observable -> clear(text); text.textProperty().addListener(new WeakInvalidationListener(listener)); text.localToSceneTransformProperty().addListener(new WeakInvalidationListener(listener)); }
public JFXTreeCell() { selectedPane.getStyleClass().add("selection-bar"); selectedPane.setBackground(new Background(new BackgroundFill(Color.RED, CornerRadii.EMPTY, Insets.EMPTY))); selectedPane.setPrefWidth(3); selectedPane.setMouseTransparent(true); selectedProperty().addListener((o, oldVal, newVal) -> selectedPane.setVisible(newVal ? true : false)); final InvalidationListener treeItemInvalidationListener = observable -> { TreeItem<T> oldTreeItem = treeItemRef == null ? null : treeItemRef.get(); if (oldTreeItem != null) { oldTreeItem.graphicProperty().removeListener(weakTreeItemGraphicListener); } TreeItem<T> newTreeItem = getTreeItem(); if (newTreeItem != null) { newTreeItem.graphicProperty().addListener(weakTreeItemGraphicListener); treeItemRef = new WeakReference<>(newTreeItem); } }; final WeakInvalidationListener weakTreeItemListener = new WeakInvalidationListener(treeItemInvalidationListener); treeItemProperty().addListener(weakTreeItemListener); if (getTreeItem() != null) { getTreeItem().graphicProperty().addListener(weakTreeItemGraphicListener); } }
public void show() { dialog.setOpacity(0); // pickerDecorator.setOpacity(0); if (dialog.getOwner() != null) { dialog.widthProperty().addListener(positionAdjuster); dialog.heightProperty().addListener(positionAdjuster); positionAdjuster.invalidated(null); } if (dialog.getScene() == null) { dialog.setScene(customScene); } curvedColorPicker.preAnimate(); dialog.show(); if (initOnce) { initRun.run(); initOnce = false; } Timeline timeline = new Timeline(new KeyFrame(Duration.millis(120), new KeyValue(dialog.opacityProperty(), 1, Interpolator.EASE_BOTH))); timeline.setOnFinished((finish) -> curvedColorPicker.animate()); timeline.play(); }
@Test public void listeners() { ObservableAtomicReference<String> victim = new ObservableAtomicReference<>("Initial"); ChangeListener<String> listener = mock(ChangeListener.class); InvalidationListener invalidationListener = mock(InvalidationListener.class); victim.addListener(listener); victim.addListener(invalidationListener); victim.set("newVal"); assertEquals("newVal", victim.getValue()); verify(listener).changed(any(), eq("Initial"), eq("newVal")); verify(invalidationListener).invalidated(victim); } }
@DefaultProperty(value = "icon") public class IntegerValidator extends ValidatorBase {
@DefaultProperty(value = "icon") public class RequiredFieldValidator extends ValidatorBase {
/** * Builds a new code area with the given enum type as layer id provider. * Constants of the enum will identify layers of the code area. * * @param idEnum Enum type */ // the annotation lets the value be passed from FXML public HighlightLayerCodeArea(@NamedArg("idEnum") Class<K> idEnum) { super(); this.layersById = EnumSet.allOf(idEnum) .stream() .collect(Collectors.toConcurrentMap(id -> id, id -> new StyleLayer())); }
@DefaultProperty(value = "icon") public class RegexValidator extends ValidatorBase {
@DefaultProperty(value = "animation") public class JFXHamburger extends VBox {
@DefaultProperty(value = "icon") public class NumberValidator extends ValidatorBase {
@DefaultProperty(value = "control") public class JFXBadge extends StackPane {
@DefaultProperty(value = "popupContent") public class JFXPopup extends PopupControl {
@DefaultProperty(value = "content") public class JFXDrawersStack extends Region {
@DefaultProperty(value = "content") public class JFXScrollPane extends StackPane {
@DefaultProperty(value = "graphic") public class JFXToggleNode extends ToggleButton {
@DefaultProperty(value = "content") public class JFXDialog extends StackPane {
@DefaultProperty(value = "control") public class JFXRippler extends StackPane { public enum RipplerPos {