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


Java ConnectionLayer.getChildren方法代码示例

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


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

示例1: getIncomingConnections

import org.eclipse.draw2d.ConnectionLayer; //导入方法依赖的package包/类
/**
 * Returns incoming connection figures of the figure parameter.
 * 
 * @param connectionLayer
 * @param figure
 * @return
 */
public static List<Connection> getIncomingConnections(
		ConnectionLayer connectionLayer, IFigure figure) {

	final List<Connection> incomingConnectionList = new ArrayList<Connection>();

	for (final Object object : connectionLayer.getChildren()) {
		if (object instanceof Connection) {
			final Connection connection = (Connection) object;
			if (connection.getTargetAnchor().getOwner() == figure) {
				incomingConnectionList.add(connection);
			}
		}
	}
	return incomingConnectionList;
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:23,代码来源:TreeLayoutUtil.java

示例2: getOutgoingConnections

import org.eclipse.draw2d.ConnectionLayer; //导入方法依赖的package包/类
/**
 * Returns outgoing connection figures of the figure parameter.
 * 
 * @param connectionLayer
 * @param figure
 * @return
 */
public static List<Connection> getOutgoingConnections(
		ConnectionLayer connectionLayer, IFigure figure) {

	final List<Connection> outgoingConnectionList = new ArrayList<Connection>();

	for (final Object object : connectionLayer.getChildren()) {
		if (object instanceof Connection) {
			final Connection connection = (Connection) object;
			if (connection.getSourceAnchor().getOwner() == figure) {
				outgoingConnectionList.add(connection);
			}
		}
	}
	return outgoingConnectionList;
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:23,代码来源:TreeLayoutUtil.java


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