當前位置: 首頁>>代碼示例>>Java>>正文


Java EditPart.SELECTED_PRIMARY屬性代碼示例

本文整理匯總了Java中org.eclipse.gef.EditPart.SELECTED_PRIMARY屬性的典型用法代碼示例。如果您正苦於以下問題:Java EditPart.SELECTED_PRIMARY屬性的具體用法?Java EditPart.SELECTED_PRIMARY怎麽用?Java EditPart.SELECTED_PRIMARY使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在org.eclipse.gef.EditPart的用法示例。


在下文中一共展示了EditPart.SELECTED_PRIMARY屬性的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_PRIMARY屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。