Search in sources :

Example 1 with LoadTableDetailInfoTask

use of com.cubrid.common.ui.spi.progress.LoadTableDetailInfoTask in project cubrid-manager by CUBRID.

the class ColumnViewerSorter method refresh.

/**
	 * Refresh the data
	 *
	 * @param name
	 */
private void refresh(String name) {
    final LoadTableDetailInfoTask loadTableDetailInfoTask = new LoadTableDetailInfoTask(Messages.tablesDetailInfoLoadingDataTitle, database, name);
    CommonTaskExec taskExec = new CommonTaskExec(Messages.bind(Messages.tablesDetailInfoLoadingData, name));
    taskExec.addTask(loadTableDetailInfoTask);
    new ExecTaskWithProgress(taskExec).busyCursorWhile();
    if (taskExec.isSuccess()) {
        TableDetailInfo tableInfo = loadTableDetailInfoTask.getTableInfo();
        if (tableInfo != null) {
            TableDetailInfo oldTableInfo = findTableInfo(name);
            if (oldTableInfo != null) {
                TableDetailInfo.copyAllAttribute(tableInfo, oldTableInfo);
                tableListView.refresh();
            } else {
                tableList.add(tableInfo);
                tableListView.refresh();
            }
        }
    }
}
Also used : CommonTaskExec(com.cubrid.common.ui.spi.progress.CommonTaskExec) ExecTaskWithProgress(com.cubrid.common.ui.spi.progress.ExecTaskWithProgress) TableDetailInfo(com.cubrid.common.core.common.model.TableDetailInfo) LoadTableDetailInfoTask(com.cubrid.common.ui.spi.progress.LoadTableDetailInfoTask)

Aggregations

TableDetailInfo (com.cubrid.common.core.common.model.TableDetailInfo)1 CommonTaskExec (com.cubrid.common.ui.spi.progress.CommonTaskExec)1 ExecTaskWithProgress (com.cubrid.common.ui.spi.progress.ExecTaskWithProgress)1 LoadTableDetailInfoTask (com.cubrid.common.ui.spi.progress.LoadTableDetailInfoTask)1