package org.simantics.plant3d.scenegraph; import java.util.Objects; import org.simantics.g3d.property.annotations.GetPropertyValue; import org.simantics.g3d.property.annotations.SetPropertyValue; import org.simantics.g3d.scenegraph.G3DNode; import org.simantics.layer0.Layer0; import org.simantics.objmap.graph.annotations.RelatedGetValue; import org.simantics.objmap.graph.annotations.RelatedSetValue; public abstract class P3DNode extends G3DNode implements IP3DVisualNode { private String name; @RelatedGetValue(Layer0.URIs.HasName) @GetPropertyValue(value = Layer0.URIs.HasName, tabId = "Default", name = "Name") public String getName() { return name; } @RelatedSetValue(Layer0.URIs.HasName) @SetPropertyValue(Layer0.URIs.HasName) public void setName(String name) { if (name == null || Objects.equals(this.name, name)) return; this.name = name; firePropertyChanged(Layer0.URIs.HasName); } @Override public String toString() { return getName(); } }