@Override
public void addGeometry(Geometry geom) {
super.addGeometry(geom);
if (fxAttachmentNode == null) {
fxAttachmentNode = new Group();
}
if (knownParts == null) {
knownParts = new ArrayList<>();
}
// If the geometry is not recognized, add it
if (!knownParts.contains(geom)) {
// Register to listen for changes from the geometry or its children
// INodes
geom.eAdapters().add(new EContentAdapter() {
@Override
public void notifyChanged(Notification notification) {
handleUpdate(geom, notification);
}
});
// Add the geometry to the list of known parts
knownParts.add(geom);
// Have the geometry refreshed when it is added
handleUpdate(geom, null);
}
}
FXAttachment.java 文件源码
java
阅读 19
收藏 0
点赞 0
评论 0
项目:eavp
作者:
评论列表
文章目录