org.jhotdraw8.draw.model.DrawingModelFigureProperty Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of org.jhotdraw8.draw Show documentation
Show all versions of org.jhotdraw8.draw Show documentation
JHotDraw8 Drawing Framework
The newest version!
/*
* @(#)DrawingModelFigureProperty.java
* Copyright © 2023 The authors and contributors of JHotDraw. MIT License.
*/
package org.jhotdraw8.draw.model;
import javafx.beans.property.ReadOnlyObjectWrapper;
import org.jspecify.annotations.Nullable;
import org.jhotdraw8.base.event.Listener;
import org.jhotdraw8.draw.figure.Figure;
import org.jhotdraw8.fxbase.event.SimpleWeakListener;
import org.jhotdraw8.fxcollection.typesafekey.Key;
import java.lang.ref.WeakReference;
/**
* This property is weakly bound to a property of a figure in the DrawingModel.
*
* If the key is not declared by the figure, then the value will always be null.
*
* @param the value type of the property
* @author Werner Randelshofer
*/
public class DrawingModelFigureProperty extends ReadOnlyObjectWrapper {
private final DrawingModel model;
protected final @Nullable WeakReference