本文整理汇总了Java中org.netbeans.api.visual.anchor.AnchorFactory.createRectangularAnchor方法的典型用法代码示例。如果您正苦于以下问题:Java AnchorFactory.createRectangularAnchor方法的具体用法?Java AnchorFactory.createRectangularAnchor怎么用?Java AnchorFactory.createRectangularAnchor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.netbeans.api.visual.anchor.AnchorFactory
的用法示例。
在下文中一共展示了AnchorFactory.createRectangularAnchor方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: attachEdgeSourceAnchor
import org.netbeans.api.visual.anchor.AnchorFactory; //导入方法依赖的package包/类
@Override
protected void attachEdgeSourceAnchor(CfgEdge edge, CfgNode oldSourceNode, CfgNode sourceNode) {
Anchor sourceAnchor;
EdgeWidget edgeWidget = (EdgeWidget) findWidget(edge);
Widget sourceWidget = findWidget(sourceNode);
if (edge.isSymmetric()) {
sourceAnchor = new SymmetricAnchor(sourceWidget, true, true);
} else {
sourceAnchor = AnchorFactory.createRectangularAnchor(sourceWidget);
}
edgeWidget.setSourceAnchor(sourceAnchor);
}
示例2: attachEdgeTargetAnchor
import org.netbeans.api.visual.anchor.AnchorFactory; //导入方法依赖的package包/类
@Override
protected void attachEdgeTargetAnchor(CfgEdge edge, CfgNode oldtarget, CfgNode targetNode) {
Anchor targetAnchor;
ConnectionWidget edgeWidget = (ConnectionWidget) findWidget(edge);
Widget targetWidget = findWidget(targetNode);
if (edge.isSymmetric()) {
targetAnchor = new SymmetricAnchor(targetWidget, true, false);
} else {
targetAnchor = AnchorFactory.createRectangularAnchor(targetWidget);
}
edgeWidget.setTargetAnchor(targetAnchor);
}
示例3: attachEdgeSourceAnchor
import org.netbeans.api.visual.anchor.AnchorFactory; //导入方法依赖的package包/类
/**
*
* @param edge
* @param oldPin
* @param pin
*/
@Override
protected void attachEdgeSourceAnchor(String edge, String oldPin, String pin) {
ConnectionWidget c = (ConnectionWidget) findWidget(edge);
Widget widget = findWidget(pin);
Anchor a = AnchorFactory.createRectangularAnchor(widget);
c.setSourceAnchor(a);
}
示例4: attachEdgeTargetAnchor
import org.netbeans.api.visual.anchor.AnchorFactory; //导入方法依赖的package包/类
/**
*
* @param edge
* @param oldPin
* @param pin
*/
@Override
protected void attachEdgeTargetAnchor(String edge, String oldPin, String pin) {
ConnectionWidget c = (ConnectionWidget) findWidget(edge);
Widget widget = findWidget(pin);
Anchor a = AnchorFactory.createRectangularAnchor(widget);
c.setTargetAnchor(a);
}
示例5: attachEdgeSourceAnchor
import org.netbeans.api.visual.anchor.AnchorFactory; //导入方法依赖的package包/类
protected void attachEdgeSourceAnchor(String edge,
String oldSourceNode, String sourceNode) {
ConnectionWidget edgeWidget = (ConnectionWidget) findWidget(edge);
Widget sourceNodeWidget = findWidget(sourceNode);
Anchor sourceAnchor = AnchorFactory
.createRectangularAnchor(sourceNodeWidget);
edgeWidget.setSourceAnchor(sourceAnchor);
}
示例6: attachEdgeTargetAnchor
import org.netbeans.api.visual.anchor.AnchorFactory; //导入方法依赖的package包/类
protected void attachEdgeTargetAnchor(String edge,
String oldTargetNode, String targetNode) {
ConnectionWidget edgeWidget = (ConnectionWidget) findWidget(edge);
Widget targetNodeWidget = findWidget(targetNode);
Anchor targetAnchor = AnchorFactory
.createRectangularAnchor(targetNodeWidget);
edgeWidget.setTargetAnchor(targetAnchor);
}
示例7: attachEdgeSourceAnchor
import org.netbeans.api.visual.anchor.AnchorFactory; //导入方法依赖的package包/类
@Override
protected void attachEdgeSourceAnchor(SchemaRelationship relationship, SchemaClass oldClass, SchemaClass newClass)
{
Widget sourceClassWidget = findWidget(newClass);
Anchor sourceAnchor = AnchorFactory.createRectangularAnchor(sourceClassWidget);
ConnectionWidget connectionWidget = (ConnectionWidget) findWidget(relationship);
connectionWidget.setSourceAnchor(sourceAnchor);
}
示例8: attachEdgeTargetAnchor
import org.netbeans.api.visual.anchor.AnchorFactory; //导入方法依赖的package包/类
@Override
protected void attachEdgeTargetAnchor(SchemaRelationship relationship, SchemaClass oldClass, SchemaClass newClass)
{
Widget targetClassWidget = findWidget(newClass);
Anchor targetAnchor = AnchorFactory.createRectangularAnchor(targetClassWidget);
ConnectionWidget connectionWidget = (ConnectionWidget) findWidget(relationship);
connectionWidget.setTargetAnchor(targetAnchor);
}