本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}