|
|
|
@ -7,8 +7,6 @@ import com.fr.data.impl.storeproc.StoreProcedure;
|
|
|
|
|
import com.fr.data.operator.DataOperator; |
|
|
|
|
import com.fr.design.data.DesignTableDataManager; |
|
|
|
|
import com.fr.design.data.datapane.preview.PreviewTablePane; |
|
|
|
|
import com.fr.design.dialog.BasicDialog; |
|
|
|
|
import com.fr.design.dialog.DialogActionAdapter; |
|
|
|
|
import com.fr.design.dialog.FineJOptionPane; |
|
|
|
|
import com.fr.design.gui.iprogressbar.AutoProgressBar; |
|
|
|
|
import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; |
|
|
|
@ -18,6 +16,7 @@ import com.fr.general.ComparatorUtils;
|
|
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
|
|
|
|
|
|
import javax.swing.Icon; |
|
|
|
|
import javax.swing.JFrame; |
|
|
|
|
import javax.swing.SwingWorker; |
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.Arrays; |
|
|
|
@ -50,7 +49,6 @@ public final class StoreProcedureDataWrapper implements TableDataWrapper {
|
|
|
|
|
private AutoProgressBar connectionBar; |
|
|
|
|
private ProcedureDataModel[] dataModels; |
|
|
|
|
private SwingWorker worker; |
|
|
|
|
private BasicDialog dialog; |
|
|
|
|
private int previewModel; |
|
|
|
|
|
|
|
|
|
public StoreProcedureDataWrapper(StoreProcedure storeProcedure, String storeprocedureName, String dsName) { |
|
|
|
@ -71,19 +69,8 @@ public final class StoreProcedureDataWrapper implements TableDataWrapper {
|
|
|
|
|
if (needLoad) { |
|
|
|
|
setWorker(); |
|
|
|
|
} |
|
|
|
|
dialog = PreviewTablePane.getInstance().getDialog(); |
|
|
|
|
dialog.addDialogActionListener(new DialogActionAdapter() { |
|
|
|
|
public void doOk() { |
|
|
|
|
getWorker().cancel(true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void doCancel() { |
|
|
|
|
getWorker().cancel(true); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
loadingBar = new AutoProgressBar(dialog, Toolkit.i18nText("Fine-Design_Basic_Loading_Data"), "", 0, 100) { |
|
|
|
|
loadingBar = new AutoProgressBar(new JFrame(), Toolkit.i18nText("Fine-Design_Basic_Loading_Data"), "", 0, 100) { |
|
|
|
|
public void doMonitorCanceled() { |
|
|
|
|
getDialog().setVisible(false); |
|
|
|
|
getWorker().cancel(true); |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
@ -169,7 +156,7 @@ public final class StoreProcedureDataWrapper implements TableDataWrapper {
|
|
|
|
|
*/ |
|
|
|
|
public void previewData(final int previewModel) { |
|
|
|
|
this.previewModel = previewModel; |
|
|
|
|
connectionBar = new AutoProgressBar(dialog, Toolkit.i18nText("Fine-Design_Basic_Utils_Now_Create_Connection"), "", 0, 100) { |
|
|
|
|
connectionBar = new AutoProgressBar(new JFrame(), Toolkit.i18nText("Fine-Design_Basic_Utils_Now_Create_Connection"), "", 0, 100) { |
|
|
|
|
public void doMonitorCanceled() { |
|
|
|
|
connectionBar.close(); |
|
|
|
|
worker.cancel(true); |
|
|
|
@ -218,10 +205,6 @@ public final class StoreProcedureDataWrapper implements TableDataWrapper {
|
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private BasicDialog getDialog() { |
|
|
|
|
return this.dialog; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private SwingWorker getWorker() { |
|
|
|
|
return this.worker; |
|
|
|
|
} |
|
|
|
|