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


Java EditPart.SELECTED属性代码示例

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


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

示例1: getSelectedForeignKeyColulmnList

private List<NormalColumn> getSelectedForeignKeyColulmnList() {
    final List<NormalColumn> foreignKeyColulmnList = new ArrayList<NormalColumn>();

    final TableViewEditPart parent = (TableViewEditPart) getParent();

    for (final Object object : parent.getTargetConnections()) {
        final ConnectionEditPart connectionEditPart = (ConnectionEditPart) object;

        final int selected = connectionEditPart.getSelected();

        if (selected == EditPart.SELECTED || selected == EditPart.SELECTED_PRIMARY) {
            final ConnectionElement connectionElement = (ConnectionElement) connectionEditPart.getModel();

            if (connectionElement instanceof Relation) {
                final Relation relation = (Relation) connectionElement;

                foreignKeyColulmnList.addAll(relation.getForeignKeyColumns());
            }
        }
    }

    return foreignKeyColulmnList;
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:23,代码来源:NormalColumnEditPart.java

示例2: getSelectedForeignKeyColulmnList

private List<NormalColumn> getSelectedForeignKeyColulmnList() {
	List<NormalColumn> foreignKeyColulmnList = new ArrayList<NormalColumn>();

	TableViewEditPart parent = (TableViewEditPart) this.getParent();

	for (Object object : parent.getTargetConnections()) {
		ConnectionEditPart connectionEditPart = (ConnectionEditPart) object;

		int selected = connectionEditPart.getSelected();

		if (selected == EditPart.SELECTED
				|| selected == EditPart.SELECTED_PRIMARY) {
			ConnectionElement connectionElement = (ConnectionElement) connectionEditPart
					.getModel();

			if (connectionElement instanceof Relation) {
				Relation relation = (Relation) connectionElement;

				foreignKeyColulmnList.addAll(relation
						.getForeignKeyColumns());
			}
		}
	}

	return foreignKeyColulmnList;
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:26,代码来源:NormalColumnEditPart.java

示例3: getSelectedReferencedColulmnList

private List<NormalColumn> getSelectedReferencedColulmnList() {
    final List<NormalColumn> referencedColulmnList = new ArrayList<NormalColumn>();

    final TableViewEditPart parent = (TableViewEditPart) getParent();
    final TableView tableView = (TableView) parent.getModel();

    for (final Object object : parent.getSourceConnections()) {
        final ConnectionEditPart connectionEditPart = (ConnectionEditPart) object;

        final int selected = connectionEditPart.getSelected();

        if (selected == EditPart.SELECTED || selected == EditPart.SELECTED_PRIMARY) {
            final ConnectionElement connectionElement = (ConnectionElement) connectionEditPart.getModel();

            if (connectionElement instanceof Relation) {
                final Relation relation = (Relation) connectionElement;

                if (relation.isReferenceForPK()) {
                    referencedColulmnList.addAll(((ERTable) tableView).getPrimaryKeys());

                } else if (relation.getReferencedComplexUniqueKey() != null) {
                    referencedColulmnList.addAll(relation.getReferencedComplexUniqueKey().getColumnList());

                } else {
                    referencedColulmnList.add(relation.getReferencedColumn());
                }
            }
        }

    }
    return referencedColulmnList;
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:32,代码来源:NormalColumnEditPart.java

示例4: getSelectedReferencedColulmnList

private List<NormalColumn> getSelectedReferencedColulmnList() {
	List<NormalColumn> referencedColulmnList = new ArrayList<NormalColumn>();

	TableViewEditPart parent = (TableViewEditPart) this.getParent();
	TableView tableView = (TableView) parent.getModel();

	for (Object object : parent.getSourceConnections()) {
		ConnectionEditPart connectionEditPart = (ConnectionEditPart) object;

		int selected = connectionEditPart.getSelected();

		if (selected == EditPart.SELECTED
				|| selected == EditPart.SELECTED_PRIMARY) {
			ConnectionElement connectionElement = (ConnectionElement) connectionEditPart
					.getModel();

			if (connectionElement instanceof Relation) {
				Relation relation = (Relation) connectionElement;

				if (relation.isReferenceForPK()) {
					referencedColulmnList.addAll(((ERTable) tableView)
							.getPrimaryKeys());

				} else if (relation.getReferencedComplexUniqueKey() != null) {
					referencedColulmnList.addAll(relation
							.getReferencedComplexUniqueKey()
							.getColumnList());

				} else {
					referencedColulmnList.add(relation
							.getReferencedColumn());
				}
			}
		}

	}
	return referencedColulmnList;
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:38,代码来源:NormalColumnEditPart.java


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