javafx.beans.property.ObjectProperty Java Examples
The following examples show how to use
javafx.beans.property.ObjectProperty.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SunburstChart.java From tilesfx with Apache License 2.0 | 6 votes |
public ObjectProperty<Color> darkTextColorProperty() { if (null == darkTextColor) { darkTextColor = new ObjectPropertyBase<Color>(_darkTextColor) { @Override protected void invalidated() { if (isAutoTextColor()) { adjustTextColors(); redraw(); } } @Override public Object getBean() { return SunburstChart.this; } @Override public String getName() { return "darkTextColor"; } }; _darkTextColor = null; } return darkTextColor; }
Example #2
Source File: InternalWindow.java From desktoppanefx with Apache License 2.0 | 6 votes |
public final ObjectProperty<EventHandler<InternalWindowEvent>> onCloseRequestProperty() { if (onCloseRequest == null) { onCloseRequest = new ObjectPropertyBase<EventHandler<InternalWindowEvent>>() { @Override protected void invalidated() { setEventHandler(InternalWindowEvent.WINDOW_CLOSE_REQUEST, get()); } @Override public Object getBean() { return InternalWindow.this; } @Override public String getName() { return "onCloseRequest"; } }; } return onCloseRequest; }
Example #3
Source File: AlarmBuilder.java From tilesfx with Apache License 2.0 | 6 votes |
public final Alarm build() { final Alarm SECTION = new Alarm(); for (String key : properties.keySet()) { if ("repetition".equals(key)) { SECTION.setRepetition(((ObjectProperty<Repetition>) properties.get(key)).get()); } else if("time".equals(key)) { SECTION.setTime(((ObjectProperty<ZonedDateTime>) properties.get(key)).get()); } else if("armed".equals(key)) { SECTION.setArmed(((BooleanProperty) properties.get(key)).get()); } else if("text".equals(key)) { SECTION.setText(((StringProperty) properties.get(key)).get()); } else if ("command".equals(key)) { SECTION.setCommand(((ObjectProperty<Command>) properties.get(key)).get()); } else if ("color".equals(key)) { SECTION.setColor(((ObjectProperty<Color>) properties.get(key)).get()); } } return SECTION; }
Example #4
Source File: AbstractSilhouette.java From jsilhouette with Apache License 2.0 | 5 votes |
@Override public ObjectProperty<StrokeLineJoin> strokeLineJoinProperty() { if (strokeLineJoin == null) { strokeLineJoin = new SimpleObjectProperty<>(this, "strokeLineJoin", DEFAULT_STROKE_LINE_JOIN); strokeLineJoin.addListener((v, o, n) -> forwardShapeProperty(s -> setStrokeLineJoin(n))); } return strokeLineJoin; }
Example #5
Source File: SimpleLineChart.java From Enzo with Apache License 2.0 | 5 votes |
public final ObjectProperty<Paint> sectionFill0Property() { if (null == sectionFill0) { sectionFill0 = new StyleableObjectProperty<Paint>(DEFAULT_SECTION_FILL_0) { @Override public CssMetaData getCssMetaData() { return StyleableProperties.SECTION_FILL_0; } @Override public Object getBean() { return this; } @Override public String getName() { return "sectionFill0"; } }; } return sectionFill0; }
Example #6
Source File: SectionBuilder.java From Medusa with Apache License 2.0 | 5 votes |
public final Section build() { final Section SECTION = new Section(); for (String key : properties.keySet()) { if ("start".equals(key)) { SECTION.setStart(((DoubleProperty) properties.get(key)).get()); } else if("stop".equals(key)) { SECTION.setStop(((DoubleProperty) properties.get(key)).get()); } else if("text".equals(key)) { SECTION.setText(((StringProperty) properties.get(key)).get()); } else if("icon".equals(key)) { SECTION.setIcon(((ObjectProperty<Image>) properties.get(key)).get()); } else if ("color".equals(key)) { SECTION.setColor(((ObjectProperty<Color>) properties.get(key)).get()); } else if ("highlightColor".equals(key)) { SECTION.setHighlightColor(((ObjectProperty<Color>) properties.get(key)).get()); } else if ("textColor".equals(key)) { SECTION.setTextColor(((ObjectProperty<Color>) properties.get(key)).get()); } else if ("onSectionEntered".equals(key)) { SECTION.setOnSectionEntered(((ObjectProperty<EventHandler>) properties.get(key)).get()); } else if ("onSectionLeft".equals(key)) { SECTION.setOnSectionLeft(((ObjectProperty<EventHandler>) properties.get(key)).get()); } else if ("styleClass".equals(key)) { SECTION.setStyleClass(((StringProperty) properties.get(key)).get()); } } return SECTION; }
Example #7
Source File: MatrixChartItem.java From charts with Apache License 2.0 | 5 votes |
public ObjectProperty<Color> strokeProperty() { if (null == stroke) { stroke = new ObjectPropertyBase<Color>(_stroke) { @Override protected void invalidated() { fireItemEvent(ITEM_EVENT); } @Override public Object getBean() { return MatrixChartItem.this; } @Override public String getName() { return "stroke"; } }; _stroke = null; } return stroke; }
Example #8
Source File: Axis.java From charts with Apache License 2.0 | 5 votes |
public ObjectProperty<Color> axisBackgroundColorProperty() { if (null == axisBackgroundColor) { axisBackgroundColor = new ObjectPropertyBase<Color>(_axisBackgroundColor) { @Override protected void invalidated() { redraw(); } @Override public Object getBean() { return Axis.this; } @Override public String getName() { return "axisBackgroundColor"; } }; _axisBackgroundColor = null; } return axisBackgroundColor; }
Example #9
Source File: SettingsPresenter.java From gluon-samples with BSD 3-Clause "New" or "Revised" License | 5 votes |
public void initialize() { settings.setShowTransitionFactory(BounceInUpTransition::new); settings.showingProperty().addListener((obs, oldValue, newValue) -> { if (newValue) { AppBar appBar = getApp().getAppBar(); appBar.setNavIcon(MaterialDesignIcon.MENU.button(e -> getApp().getDrawer().open())); appBar.setTitleText("Settings"); appBar.getActionItems().add(MaterialDesignIcon.CLOSE.button(e -> getApp().goHome())); } }); config = new Settings(); updateSettings(service.settingsProperty().get()); service.settingsProperty().addListener((obs, ov, nv) -> updateSettings(nv)); config.showDateProperty().addListener((obs, ov, nv) -> updateService()); config.sortingProperty().addListener((obs, ov, nv) -> updateService()); config.ascendingProperty().addListener((obs, ov, nv) -> updateService()); config.fontSizeProperty().addListener((obs, ov, nv) -> updateService()); final Option<BooleanProperty> dateOption = new DefaultOption<>(MaterialDesignIcon.DATE_RANGE.graphic(), "Show Date", "Show the note's date", null, config.showDateProperty(), true); final DefaultOption<ObjectProperty<SORTING>> sortOption = new DefaultOption<>(MaterialDesignIcon.SORT_BY_ALPHA.graphic(), "Sort Notes", "Sort the notes by", null, config.sortingProperty(), true); final DefaultOption<BooleanProperty> ascendingOption = new DefaultOption<>(MaterialDesignIcon.SORT.graphic(), "Asc./Des.", "Sort in ascending or descending order", null, config.ascendingProperty(), true); final Option<Number> fontOption = new SliderOption(MaterialDesignIcon.NETWORK_CELL.graphic(), "Size of Text", "Set the text size", null, config.fontSizeProperty(), true, 8, 12); settingsPane.getOptions().addAll(dateOption, sortOption, ascendingOption, fontOption); settingsPane.setSearchBoxVisible(false); }
Example #10
Source File: Setting.java From PreferencesFX with Apache License 2.0 | 5 votes |
/** * Creates a custom color picker control. * * @param description the title of this setting * @param colorProperty the current selected color value * @return the constructed setting */ public static Setting of(String description, ObjectProperty<Color> colorProperty) { StringProperty stringProperty = new SimpleStringProperty(); stringProperty.bindBidirectional( colorProperty, new StringConverter<Color>() { @Override public String toString(Color color) { return color.toString(); } @Override public Color fromString(String value) { return Color.valueOf(value); } } ); return new Setting<>( description, Field.ofStringType(stringProperty) .label(description) .render(new SimpleColorPickerControl( Objects.isNull(colorProperty.get()) ? Color.BLACK : colorProperty.get()) ), stringProperty ); }
Example #11
Source File: DetailsPanel.java From phoenicis with GNU Lesser General Public License v3.0 | 5 votes |
/** * Constructor * * @param title The title of the details panel * @param content The content of the details panel * @param onClose Callback for close button clicks */ public DetailsPanel(StringProperty title, ObjectProperty<Node> content, ObjectProperty<Runnable> onClose) { super(); this.title = title; this.content = content; this.onClose = onClose; }
Example #12
Source File: RadarChart.java From OEE-Designer with MIT License | 5 votes |
public ObjectProperty<Color> chartBackgroundColorProperty() { if (null == chartBackgroundColor) { chartBackgroundColor = new ObjectPropertyBase<Color>(_chartBackgroundColor) { @Override protected void invalidated() { redraw(); } @Override public Object getBean() { return RadarChart.this; } @Override public String getName() { return "chartBackgroundColor"; } }; _chartBackgroundColor = null; } return chartBackgroundColor; }
Example #13
Source File: SankeyPlot.java From charts with Apache License 2.0 | 5 votes |
public ObjectProperty<Color> itemColorProperty() { if (null == itemColor) { itemColor = new ObjectPropertyBase<Color>(_itemColor) { @Override protected void invalidated() { redraw(); } @Override public Object getBean() { return SankeyPlot.this; } @Override public String getName() { return "itemColor"; } }; } return itemColor; }
Example #14
Source File: TimingLocation.java From pikatimer with GNU General Public License v3.0 | 5 votes |
public TimingLocationInput getInputByID(Integer id){ ObjectProperty<TimingLocationInput> tmp = new SimpleObjectProperty(); timingInputs.forEach(i -> { if (i.getID().equals(id)) tmp.set(i); }); return tmp.getValue(); }
Example #15
Source File: ParagraphText.java From RichTextFX with BSD 2-Clause "Simplified" License | 5 votes |
/** * Java Quirk! Using {@code t.get[border/underline]DashArray()} throws a ClassCastException * "Double cannot be cast to Number". However, using {@code t.getDashArrayProperty().get()} * works without issue */ LineAttributesBase(Paint color, Number width, ObjectProperty<Number[]> dashArrayProp) { this.color = color; if (color == null || width == null || width.doubleValue() <= 0) { // null value this.width = -1; dashArray = null; } else { // real value this.width = width.doubleValue(); // get the dash array - JavaFX CSS parser seems to return either a Number[] array // or a single value, depending on whether only one or more than one value has been // specified in the CSS Object dashArrayProperty = dashArrayProp.get(); if (dashArrayProperty != null) { if (dashArrayProperty.getClass().isArray()) { Number[] numberArray = (Number[]) dashArrayProperty; dashArray = new Double[numberArray.length]; int idx = 0; for (Number d : numberArray) { dashArray[idx++] = (Double) d; } } else { dashArray = new Double[1]; dashArray[0] = ((Double) dashArrayProperty).doubleValue(); } } else { dashArray = null; } } }
Example #16
Source File: SunburstChart.java From charts with Apache License 2.0 | 5 votes |
public ObjectProperty<VisibleData> visibleDataProperty() { if (null == visibleData) { visibleData = new ObjectPropertyBase<VisibleData>(_visibleData) { @Override protected void invalidated() { redraw(); } @Override public Object getBean() { return SunburstChart.this; } @Override public String getName() { return "visibleData"; } }; _visibleData = null; } return visibleData; }
Example #17
Source File: SectionBuilder.java From tilesfx with Apache License 2.0 | 5 votes |
public final Section build() { final Section SECTION = new Section(); for (String key : properties.keySet()) { if ("start".equals(key)) { SECTION.setStart(((DoubleProperty) properties.get(key)).get()); } else if("stop".equals(key)) { SECTION.setStop(((DoubleProperty) properties.get(key)).get()); } else if("text".equals(key)) { SECTION.setText(((StringProperty) properties.get(key)).get()); } else if("icon".equals(key)) { SECTION.setIcon(((ObjectProperty<Image>) properties.get(key)).get()); } else if ("color".equals(key)) { SECTION.setColor(((ObjectProperty<Color>) properties.get(key)).get()); } else if ("highlightColor".equals(key)) { SECTION.setHighlightColor(((ObjectProperty<Color>) properties.get(key)).get()); } else if ("textColor".equals(key)) { SECTION.setTextColor(((ObjectProperty<Color>) properties.get(key)).get()); } else if("active".equals(key)) { SECTION.setActive(((BooleanProperty) properties.get(key)).get()); } else if ("onSectionEntered".equals(key)) { SECTION.setOnSectionEntered(((ObjectProperty<EventHandler>) properties.get(key)).get()); } else if ("onSectionLeft".equals(key)) { SECTION.setOnSectionLeft(((ObjectProperty<EventHandler>) properties.get(key)).get()); } else if ("styleClass".equals(key)) { SECTION.setStyleClass(((StringProperty) properties.get(key)).get()); } } return SECTION; }
Example #18
Source File: Grid.java From charts with Apache License 2.0 | 5 votes |
public ObjectProperty<Paint> mediumVGridLinePaintProperty() { if (null == mediumVGridLinePaint) { mediumVGridLinePaint = new ObjectPropertyBase<Paint>(_mediumVGridLinePaint) { @Override protected void invalidated() { drawGrid(); } @Override public Object getBean() { return Grid.this; } @Override public String getName() { return "mediumVGridLinePaint"; } }; _mediumVGridLinePaint = null; } return mediumVGridLinePaint; }
Example #19
Source File: ParetoPanel.java From charts with Apache License 2.0 | 5 votes |
public ObjectProperty<Font> fontProperty(){ if(null == labelingFont){ labelingFont = new SimpleObjectProperty<>(_labelingFont); labelingFont.addListener(observable -> drawParetoChart()); } return labelingFont; }
Example #20
Source File: SimpleLineChart.java From Enzo with Apache License 2.0 | 5 votes |
public final ObjectProperty<Paint> sectionFill4Property() { if (null == sectionFill4) { sectionFill4 = new StyleableObjectProperty<Paint>(DEFAULT_SECTION_FILL_4) { @Override public CssMetaData getCssMetaData() { return StyleableProperties.SECTION_FILL_4; } @Override public Object getBean() { return this; } @Override public String getName() { return "sectionFill4"; } }; } return sectionFill4; }
Example #21
Source File: RadarChart.java From tilesfx with Apache License 2.0 | 5 votes |
public ObjectProperty<Color> thresholdColorProperty() { if (null == thresholdColor) { thresholdColor = new ObjectPropertyBase<Color>(_thresholdColor) { @Override protected void invalidated() { redraw(); } @Override public Object getBean() { return RadarChart.this; } @Override public String getName() { return "thresholdColor"; } }; _thresholdColor = null; } return thresholdColor; }
Example #22
Source File: TimeSection.java From OEE-Designer with MIT License | 4 votes |
public ObjectProperty<Color> colorProperty() { if (null == color) { color = new SimpleObjectProperty<>(TimeSection.this, "color", _color); } return color; }
Example #23
Source File: TimeSection.java From tilesfx with Apache License 2.0 | 4 votes |
public ObjectProperty<Color> colorProperty() { if (null == color) { color = new SimpleObjectProperty<>(TimeSection.this, "color", _color); } return color; }
Example #24
Source File: ConfigurationBase.java From AsciidocFX with Apache License 2.0 | 4 votes |
public ObjectProperty<Path> configRootLocationProperty() { return configRootLocation; }
Example #25
Source File: BreakingNewsDemoView.java From htm.java-examples with GNU Affero General Public License v3.0 | 4 votes |
public ObjectProperty<FlipState> flipStateProperty() { return flipStateProperty; }
Example #26
Source File: JFXAutoCompletePopup.java From JFoenix with Apache License 2.0 | 4 votes |
public final ObjectProperty<Callback<ListView<T>, ListCell<T>>> suggestionsCellFactoryProperty() { return this.suggestionsCellFactory; }
Example #27
Source File: MatrixItemSeriesBuilder.java From charts with Apache License 2.0 | 4 votes |
public final MatrixItemSeries build() { final MatrixItemSeries SERIES = new MatrixItemSeries(); if (properties.keySet().contains("itemsArray")) { SERIES.setItems(((ObjectProperty<MatrixItem[]>) properties.get("itemsArray")).get()); } if(properties.keySet().contains("itemsList")) { SERIES.setItems(((ObjectProperty<List<MatrixItem>>) properties.get("itemsList")).get()); } for (String key : properties.keySet()) { if ("name".equals(key)) { SERIES.setName(((StringProperty) properties.get(key)).get()); } else if ("fill".equals(key)) { SERIES.setFill(((ObjectProperty<Paint>) properties.get(key)).get()); } else if ("stroke".equals(key)) { SERIES.setStroke(((ObjectProperty<Paint>) properties.get(key)).get()); } else if ("textFill".equals(key)) { SERIES.setTextFill(((ObjectProperty<Color>) properties.get(key)).get()); } else if ("symbolFill".equals(key)) { SERIES.setSymbolFill(((ObjectProperty<Color>) properties.get(key)).get()); } else if ("symbolStroke".equals(key)) { SERIES.setSymbolStroke(((ObjectProperty<Color>) properties.get(key)).get()); } else if ("symbol".equals(key)) { SERIES.setSymbol(((ObjectProperty<Symbol>) properties.get(key)).get()); } else if ("chartType".equals(key)) { SERIES.setChartType(((ObjectProperty<ChartType>) properties.get(key)).get()); } else if ("symbolsVisible".equals(key)) { SERIES.setSymbolsVisible(((BooleanProperty) properties.get(key)).get()); } else if ("symbolSize".equals(key)) { SERIES.setSymbolSize(((DoubleProperty) properties.get(key)).get()); } else if ("strokeWidth".equals(key)) { SERIES.setStrokeWidth(((DoubleProperty) properties.get(key)).get()); } else if("animated".equals(key)) { SERIES.setAnimated(((BooleanProperty) properties.get(key)).get()); } else if("animationDuration".equals(key)) { SERIES.setAnimationDuration(((LongProperty) properties.get(key)).get()); } } return SERIES; }
Example #28
Source File: LibraryFeaturePanel.java From phoenicis with GNU Lesser General Public License v3.0 | 4 votes |
public ObjectProperty<OpenDetailsPanel> openedDetailsPanelProperty() { return this.openedDetailsPanel; }
Example #29
Source File: JFXBadge.java From JFoenix with Apache License 2.0 | 4 votes |
public ObjectProperty<Pos> positionProperty() { return this.position; }
Example #30
Source File: Symbol.java From Enzo with Apache License 2.0 | 4 votes |
public final ObjectProperty<SymbolType> symbolTypeProperty() { return symbolType; }