本文整理汇总了Java中org.netbeans.api.visual.widget.Widget.removeFromParent方法的典型用法代码示例。如果您正苦于以下问题:Java Widget.removeFromParent方法的具体用法?Java Widget.removeFromParent怎么用?Java Widget.removeFromParent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.netbeans.api.visual.widget.Widget
的用法示例。
在下文中一共展示了Widget.removeFromParent方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: detachLoopMember
import org.netbeans.api.visual.widget.Widget; //导入方法依赖的package包/类
private boolean detachLoopMember(CfgNode node, NodeWidget nodeWidget) {
LoopClusterWidget rm = this.loopidx2clusterwidget.get(node.getLoopIndex());
if (rm == null) {
return false;//not added
}
if (rm.removeMember(nodeWidget)) {
if (rm.getMembers().isEmpty()) {
this.loopidx2clusterwidget.remove(rm.getLoopIndex());
List<Widget> childs = new ArrayList<>(rm.getChildren());
for (Widget w : childs) {//append stacked loopwidgets
w.removeFromParent();
rm.getParentWidget().addChild(w);
}
rm.removeFromParent();
}
return true;
}
return false;
}
示例2: detachNodeWidget
import org.netbeans.api.visual.widget.Widget; //导入方法依赖的package包/类
/**
* Called by the removeNode method to notify that a node is removed from the graph model.
* The default implementation removes the node widget from its parent widget.
* @param node the removed node
* @param widget the removed node widget; null if the node is non-visual
*/
protected void detachNodeWidget (N node, Widget widget) {
if (widget != null)
widget.removeFromParent ();
}
示例3: detachEdgeWidget
import org.netbeans.api.visual.widget.Widget; //导入方法依赖的package包/类
/**
* Called by the removeEdge method to notify that an edge is removed from the graph model.
* The default implementation removes the edge widget from its parent widget.
* @param edge the removed edge
* @param widget the removed edge widget; null if the edge is non-visual
*/
protected void detachEdgeWidget (E edge, Widget widget) {
if (widget != null)
widget.removeFromParent ();
}
示例4: detachPinWidget
import org.netbeans.api.visual.widget.Widget; //导入方法依赖的package包/类
/**
* Called by the removePin method to notify that a pin is removed from the graph model.
* The default implementation removes the pin widget from its parent widget.
* @param pin the removed pin
* @param widget the removed pin widget; null if the pin is non-visual
*/
protected void detachPinWidget (P pin, Widget widget) {
if (widget != null)
widget.removeFromParent ();
}