当前位置: 首页>>代码示例>>Java>>正文


Java Widget.removeFromParent方法代码示例

本文整理汇总了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;
}
 
开发者ID:arodchen,项目名称:MaxSim,代码行数:20,代码来源:CfgScene.java

示例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 ();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:11,代码来源:GraphScene.java

示例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 ();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:11,代码来源:GraphScene.java

示例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 ();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:11,代码来源:GraphPinScene.java


注:本文中的org.netbeans.api.visual.widget.Widget.removeFromParent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。