本文整理匯總了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;
}