javafx.beans.property.ReadOnlyProperty Java Examples

The following examples show how to use javafx.beans.property.ReadOnlyProperty. 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: ContentBehavior.java    From gef with Eclipse Public License 2.0 6 votes vote down vote up
@SuppressWarnings("unchecked")
@Override
public void onChanged(
		final SetMultimapChangeListener.Change<? extends Object, ? extends String> change) {
	// System.out.println("Content anchorages changed " + change);
	// XXX: An atomic operation (including replaceAll()) on the
	// ObservableSetMultimap will lead to an atomic change here; we do
	// not have to iterate through the individual changes but may simply
	// synchronize with the list as it emerges after the changes have
	// been applied.
	// TODO: detach or attach directly
	IContentPart<? extends Node> anchored = (IContentPart<? extends Node>) ((ReadOnlyProperty<?>) change
			.getSetMultimap()).getBean();
	synchronizeContentPartAnchorages(anchored,
			HashMultimap.create(change.getSetMultimap()));
}
 
Example #2
Source File: BaseGraphApp.java    From diirt with MIT License 5 votes vote down vote up
public MessagePanel( ReadOnlyProperty< Exception > lastException ) {
    this.setCenter( lblMessage );
    this.lastException = lastException;
    this.lastException.addListener( new ChangeListener< Exception >() {

        @Override
        public void changed(ObservableValue<? extends Exception> observable, Exception oldValue, Exception newValue) {
            setMessage( newValue == null? "" : newValue.getMessage() );
        }

    });
}
 
Example #3
Source File: CustomBidirectionalBinding.java    From JFoenix with Apache License 2.0 5 votes vote down vote up
public CustomBidirectionalBinding(ReadOnlyProperty<A> a, Consumer<A> propertyRef1Setter,
                                  ReadOnlyProperty<B> b, Consumer<B> propertyRef2Setter,
                                  IPropertyConverter<A, B> converter) {
    this.propertyRef1 = new WeakReference<>(a);
    this.propertyRef2 = new WeakReference<>(b);
    this.propertyRef1Setter = propertyRef1Setter;
    this.propertyRef2Setter = propertyRef2Setter;
    this.converter = converter;
}
 
Example #4
Source File: ContentBehavior.java    From gef with Eclipse Public License 2.0 5 votes vote down vote up
@SuppressWarnings("unchecked")
@Override
public void onChanged(
		final ListChangeListener.Change<? extends Object> change) {
	// System.out.println("Content children changed " + change);
	// XXX: An atomic operation (including setAll()) on the
	// ObservableList will lead to an atomic change here; we do not have
	// to iterate through the individual changes but may simply
	// synchronize with the list as it emerges after the changes have
	// been applied.
	IContentPart<? extends Node> parent = (IContentPart<? extends Node>) ((ReadOnlyProperty<?>) change
			.getList()).getBean();
	// while (change.next()) {
	// if (change.wasRemoved()) {
	// removeContentPartChildren(parent,
	// ImmutableList.copyOf(change.getRemoved()));
	// } else if (change.wasAdded()) {
	// addContentPartChildren(parent,
	// ImmutableList.copyOf(change.getAddedSubList()),
	// change.getFrom());
	// } else if (change.wasPermutated()) {
	// throw new UnsupportedOperationException(
	// "Reorder not yet implemented");
	// }
	// }
	synchronizeContentPartChildren(parent, change.getList());
}
 
Example #5
Source File: FooterController.java    From TerasologyLauncher with Apache License 2.0 4 votes vote down vote up
void bind(ReadOnlyProperty<Optional<Warning>> property) {
    this.warningProperty.bind(property);
}
 
Example #6
Source File: TopicInfoPublicationSubscription.java    From helloiot with GNU General Public License v3.0 4 votes vote down vote up
@Override
public ReadOnlyProperty<String> getLabel() {
    return name;
}
 
Example #7
Source File: BaseGraphView.java    From diirt with MIT License 4 votes vote down vote up
public ReadOnlyProperty< Exception > lastExceptionProperty() {
    return this.lastException;
}
 
Example #8
Source File: FxDockTabPane.java    From FxDock with Apache License 2.0 4 votes vote down vote up
public final ReadOnlyProperty<Node> dockParentProperty()
{
	return parent.getReadOnlyProperty();
}
 
Example #9
Source File: FxDockBorderPane.java    From FxDock with Apache License 2.0 4 votes vote down vote up
public final ReadOnlyProperty<Node> dockParentProperty()
{
	return parent.getReadOnlyProperty();
}
 
Example #10
Source File: FxDockSplitPane.java    From FxDock with Apache License 2.0 4 votes vote down vote up
public final ReadOnlyProperty<Node> dockParentProperty()
{
	return parent.getReadOnlyProperty();
}
 
Example #11
Source File: FxDockEmptyPane.java    From FxDock with Apache License 2.0 4 votes vote down vote up
public final ReadOnlyProperty<Node> dockParentProperty()
{
	return parent.getReadOnlyProperty();
}
 
Example #12
Source File: TopicInfoMessagesSubscribe.java    From helloiot with GNU General Public License v3.0 4 votes vote down vote up
@Override
public ReadOnlyProperty<String> getLabel() {
    return topic;
}
 
Example #13
Source File: TopicInfoMessagesPublish.java    From helloiot with GNU General Public License v3.0 4 votes vote down vote up
@Override
public ReadOnlyProperty<String> getLabel() {
    return label;
}
 
Example #14
Source File: TopicInfoCode.java    From helloiot with GNU General Public License v3.0 4 votes vote down vote up
@Override
public ReadOnlyProperty<String> getLabel() {
    return name;
}
 
Example #15
Source File: TopicInfoSwitch.java    From helloiot with GNU General Public License v3.0 4 votes vote down vote up
@Override
public ReadOnlyProperty<String> getLabel() {
    return name;
}
 
Example #16
Source File: TopicInfoGauge.java    From helloiot with GNU General Public License v3.0 4 votes vote down vote up
@Override
public ReadOnlyProperty<String> getLabel() {
    return name;
}
 
Example #17
Source File: TopicInfo.java    From helloiot with GNU General Public License v3.0 votes vote down vote up
public ReadOnlyProperty<String> getLabel();