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


Java AnchorFactory.createCenterAnchor方法代码示例

本文整理汇总了Java中org.netbeans.api.visual.anchor.AnchorFactory.createCenterAnchor方法的典型用法代码示例。如果您正苦于以下问题:Java AnchorFactory.createCenterAnchor方法的具体用法?Java AnchorFactory.createCenterAnchor怎么用?Java AnchorFactory.createCenterAnchor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.netbeans.api.visual.anchor.AnchorFactory的用法示例。


在下文中一共展示了AnchorFactory.createCenterAnchor方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: attachEdgeSourceAnchor

import org.netbeans.api.visual.anchor.AnchorFactory; //导入方法依赖的package包/类
@Override
protected void attachEdgeSourceAnchor(E edge, N oldSourceNode, N sourceNode) {
    Widget w = findWidget(edge);
    // Not the case by default, but could be overridden
    if (w instanceof ConnectionWidget) {
        Widget sourceNodeWidget = findWidget(sourceNode);
        Anchor sourceAnchor = AnchorFactory.createCenterAnchor(sourceNodeWidget);
        ConnectionWidget edgeWidget = (ConnectionWidget) w;
        edgeWidget.setSourceAnchor(sourceAnchor);
    }
}
 
开发者ID:timboudreau,项目名称:vl-jung,代码行数:12,代码来源:BaseJungScene.java

示例2: attachEdgeTargetAnchor

import org.netbeans.api.visual.anchor.AnchorFactory; //导入方法依赖的package包/类
@Override
protected void attachEdgeTargetAnchor(E edge, N oldTargetNode, N targetNode) {
    Widget w = findWidget(edge);
    // Not the case by default, but could be overridden
    if (w instanceof ConnectionWidget) {
        Widget targetNodeWidget = findWidget(targetNode);
        Anchor targetAnchor = AnchorFactory.createCenterAnchor(targetNodeWidget);
        ConnectionWidget edgeWidget = (ConnectionWidget) findWidget(edge);
        edgeWidget.setTargetAnchor(targetAnchor);
    }
}
 
开发者ID:timboudreau,项目名称:vl-jung,代码行数:12,代码来源:BaseJungScene.java

示例3: createSourceAnchor

import org.netbeans.api.visual.anchor.AnchorFactory; //导入方法依赖的package包/类
public Anchor createSourceAnchor (Widget sourceWidget) {
    return AnchorFactory.createCenterAnchor (sourceWidget);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:ActionFactory.java

示例4: createTargetAnchor

import org.netbeans.api.visual.anchor.AnchorFactory; //导入方法依赖的package包/类
public Anchor createTargetAnchor (Widget targetWidget) {
    return AnchorFactory.createCenterAnchor (targetWidget);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:ActionFactory.java

示例5: createReplacementWidgetAnchor

import org.netbeans.api.visual.anchor.AnchorFactory; //导入方法依赖的package包/类
public Anchor createReplacementWidgetAnchor (Widget replacementWidget) {
    return AnchorFactory.createCenterAnchor (replacementWidget);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:ActionFactory.java


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