@Override public void setFocusColor(Paint color) { this.focusColor.set(color); }
public Number getRipplerRadius() { return ripplerRadius == null ? Region.USE_COMPUTED_SIZE : ripplerRadius.get(); }
@Override public boolean isSettable(JFXPasswordField control) { return control.unFocusColor == null || !control.unFocusColor.isBound(); }
private void initialize() { this.setVisible(false); this.getStyleClass().add(DEFAULT_STYLE_CLASS); this.transitionType.addListener((o, oldVal, newVal) -> { animation = getShowAnimation(transitionType.get()); }); contentHolder = new StackPane(); contentHolder.setBackground(new Background(new BackgroundFill(Color.WHITE, new CornerRadii(2), null))); JFXDepthManager.setDepth(contentHolder, 4); contentHolder.setPickOnBounds(false); // ensure stackpane is never resized beyond it's preferred size contentHolder.setMaxSize(Region.USE_PREF_SIZE, Region.USE_PREF_SIZE); this.getChildren().add(contentHolder); this.getStyleClass().add("jfx-dialog-overlay-pane"); StackPane.setAlignment(contentHolder, Pos.CENTER); this.setBackground(new Background(new BackgroundFill(Color.rgb(0, 0, 0, 0.1), null, null))); // close the dialog if clicked on the overlay pane if (overlayClose.get()) { this.addEventHandler(MouseEvent.MOUSE_PRESSED, closeHandler); } // prevent propagating the events to overlay pane contentHolder.addEventHandler(MouseEvent.ANY, e -> e.consume()); }
button.buttonTypeProperty().addListener((o, oldVal, newVal) -> updateButtonType(newVal));
updateColor(); final JFXRippler rippler = new JFXRippler(colorBox, JFXRippler.RipplerMask.FIT); rippler.ripplerFillProperty().bind(displayNode.textFillProperty()); getChildren().setAll(rippler); JFXDepthManager.setDepth(getSkinnable(), 1);
@Override public void applyStyle(StyleOrigin newOrigin, Font value) { try { this.settingFontViaCSS = true; super.applyStyle(newOrigin, value); } finally { this.settingFontViaCSS = false; } }
private void initialize() { this.setVisible(false); this.getStyleClass().add(DEFAULT_STYLE_CLASS); this.transitionType.addListener((o, oldVal, newVal) -> { animation = getShowAnimation(transitionType.get()); }); contentHolder = new StackPane(); contentHolder.setBackground(new Background(new BackgroundFill(Color.WHITE, new CornerRadii(2), null))); JFXDepthManager.setDepth(contentHolder, 4); contentHolder.setPickOnBounds(false); // ensure stackpane is never resized beyond it's preferred size contentHolder.setMaxSize(Region.USE_PREF_SIZE, Region.USE_PREF_SIZE); this.getChildren().add(contentHolder); this.getStyleClass().add("jfx-dialog-overlay-pane"); StackPane.setAlignment(contentHolder, Pos.CENTER); this.setBackground(new Background(new BackgroundFill(Color.rgb(0, 0, 0, 0.1), null, null))); // close the dialog if clicked on the overlay pane if (overlayClose.get()) { this.addEventHandler(MouseEvent.MOUSE_PRESSED, closeHandler); } // prevent propagating the events to overlay pane contentHolder.addEventHandler(MouseEvent.ANY, e -> e.consume()); }
public DisplayMessageOverlayLabelSkin(DisplayMessageOverlayLabel control, TextSizingUtility sizing) { super(control); textLength.set(sizing.calculate(control.getText(), control.getFont()).getWidth()); control.fontProperty().addListener((observable, oldFont, newFont) -> textLength.set(sizing.calculate(control.getText(), newFont).getWidth())); control.textProperty().addListener((observable, oldText, newText) ->
rgbField.focusColorProperty().bind(Bindings.createObjectBinding(() -> { return pane.getBackground().getFills().get(0).getFill(); }, pane.backgroundProperty())); hsbField.focusColorProperty().bind(Bindings.createObjectBinding(() -> { return pane.getBackground().getFills().get(0).getFill(); }, pane.backgroundProperty())); hexField.focusColorProperty().bind(Bindings.createObjectBinding(() -> { return pane.getBackground().getFills().get(0).getFill(); }, pane.backgroundProperty()));
@Override public void applyStyle(StyleOrigin newOrigin, Font value) { try { this.cssFont = true; super.applyStyle(newOrigin, value); } catch (Exception e) { throw e; } finally { this.cssFont = false; } }
@Override public void setFocusColor(Paint color) { this.focusColor.set(color); }
public RipplerMask getMaskType() { return maskType == null ? RipplerMask.RECT : maskType.get(); }
@Override public boolean isSettable(JFXDialog control) { return control.transitionType == null || !control.transitionType.isBound(); }
public OpenPatricianDialogInputSkin(OpenPatricianDialogInput input) { super(input); textField = new TextField(input.getText()); calculateDimensions(input); input.fontProperty().addListener((observable, oldValue, newValue) -> calculateDimensions(input)); textField.textProperty().bindBidirectional(input.textProperty()); textField.getStyleClass().add("openPatricianDialogInput"); Rectangle background = new Rectangle(); background.setHeight(height.doubleValue()); background.setWidth(width.doubleValue()); background.setFill(Color.rgb(150, 150, 150)); background.heightProperty().bind(height); background.widthProperty().bind(width); StackPane stack = new StackPane(); stack.getChildren().addAll(background, textField); Group group = new Group(stack); group.setManaged(false); getChildren().add(group); }
@Override public void setUnFocusColor(Paint color) { this.unFocusColor.set(color); }
public DialogTransition getTransitionType() { return transitionType == null ? DialogTransition.CENTER : transitionType.get(); }
@Override public boolean isSettable(JFXTextArea control) { return control.focusColor == null || !control.focusColor.isBound(); }
public OpenPatricianStoneButtonSkin(final OpenPatricianStoneButton button) { super(button); this.button = button; Dimension2D dim = calculateButtonDimensions(button); ImageFactory imageFactory = new ImageFactory(); Image img = imageFactory.getSlabImage(dim); imageView = new ImageView(img); button.fontProperty().addListener((observable, oldvalue, newValue) -> calculateNewDimensions()); final Label label = new Label(button.getText()); label.onMouseClickedProperty().bind(button.onActionProperty()); imageView.onMouseReleasedProperty().bind(button.onActionProperty()); button.textProperty().addListener((observable, oldValue, newValue) -> calculateNewDimensions()); StackPane stack = new StackPane(); stack.getChildren().addAll(imageView, label); Group group = new Group(stack); group.setManaged(false); getChildren().add(group); }