use of com.cubrid.common.ui.er.part.SchemaDiagramPart in project cubrid-manager by CUBRID.
the class ERSchemaEditor method setLocateTable.
/**
* Set the ERD focus location onto the gave table
*
* @param tableName
*/
public void setLocateTable(String tableName) {
SchemaDiagramPart schemaRootPart = getERSchemaRootPart();
List allParts = schemaRootPart.getChildren();
Iterator it = allParts.iterator();
while (it.hasNext()) {
Object obj = it.next();
if (!(obj instanceof TablePart)) {
continue;
}
TablePart tablePart = (TablePart) obj;
ERTable erTable = tablePart.getTable();
if (erTable.getName().equals(tableName)) {
setLocatePoint(erTable.getBounds().x, erTable.getBounds().y);
}
}
}
Aggregations