|
|
|
@ -12,12 +12,12 @@ 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; |
|
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
|
import com.fr.design.mainframe.DesignerContext; |
|
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
|
|
|
|
|
|
import javax.swing.Icon; |
|
|
|
|
import javax.swing.JOptionPane; |
|
|
|
|
import javax.swing.SwingWorker; |
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.Arrays; |
|
|
|
@ -81,7 +81,7 @@ public final class StoreProcedureDataWrapper implements TableDataWrapper {
|
|
|
|
|
getWorker().cancel(true); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
loadingBar = new AutoProgressBar(dialog, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Loading_Data"), "", 0, 100) { |
|
|
|
|
loadingBar = new AutoProgressBar(dialog, Toolkit.i18nText("Fine-Design_Basic_Loading_Data"), "", 0, 100) { |
|
|
|
|
public void doMonitorCanceled() { |
|
|
|
|
getDialog().setVisible(false); |
|
|
|
|
getWorker().cancel(true); |
|
|
|
@ -93,17 +93,17 @@ public final class StoreProcedureDataWrapper implements TableDataWrapper {
|
|
|
|
|
* 数据集执行结果返回的所有字段 |
|
|
|
|
* |
|
|
|
|
* @return 数据集执行结果返回的所有字段 |
|
|
|
|
* |
|
|
|
|
* |
|
|
|
|
* |
|
|
|
|
* @date 2014-12-3-下午7:43:17 |
|
|
|
|
* |
|
|
|
|
* |
|
|
|
|
*/ |
|
|
|
|
public List<String> calculateColumnNameList() { |
|
|
|
|
if (columnNameList != null) { |
|
|
|
|
return columnNameList; |
|
|
|
|
} |
|
|
|
|
if (!createStore(false)) { |
|
|
|
|
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Engine_No_TableData")); |
|
|
|
|
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Toolkit.i18nText("Fine-Design_Basic_Engine_No_TableData")); |
|
|
|
|
return new ArrayList<String>(); |
|
|
|
|
} |
|
|
|
|
columnNameList = Arrays.asList(procedureDataModel.getColumnName()); |
|
|
|
@ -114,10 +114,10 @@ public final class StoreProcedureDataWrapper implements TableDataWrapper {
|
|
|
|
|
* 生成子节点 |
|
|
|
|
* |
|
|
|
|
* @return 节点数组 |
|
|
|
|
* |
|
|
|
|
* |
|
|
|
|
* |
|
|
|
|
* @date 2014-12-3-下午7:06:47 |
|
|
|
|
* |
|
|
|
|
* |
|
|
|
|
*/ |
|
|
|
|
public ExpandMutableTreeNode[] load() { |
|
|
|
|
List<String> namelist; |
|
|
|
@ -160,12 +160,12 @@ public final class StoreProcedureDataWrapper implements TableDataWrapper {
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 预览数据 |
|
|
|
|
* |
|
|
|
|
* |
|
|
|
|
* @param previewModel 预览模式, 全部还是一个 |
|
|
|
|
* |
|
|
|
|
* |
|
|
|
|
* |
|
|
|
|
* @date 2014-12-3-下午7:05:50 |
|
|
|
|
* |
|
|
|
|
* |
|
|
|
|
*/ |
|
|
|
|
public void previewData(final int previewModel) { |
|
|
|
|
this.previewModel = previewModel; |
|
|
|
@ -174,11 +174,12 @@ public final class StoreProcedureDataWrapper implements TableDataWrapper {
|
|
|
|
|
protected Object doInBackground() throws Exception { |
|
|
|
|
loadingBar.close(); |
|
|
|
|
PreviewTablePane.resetPreviewTable(); |
|
|
|
|
dialog.setVisible(true); |
|
|
|
|
// REPORT-40822 这里的dialog是个空界面,这里设置成可见之后,后面又会设置成不可见,造成闪屏
|
|
|
|
|
//dialog.setVisible(true);
|
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
}.execute(); |
|
|
|
|
connectionBar = new AutoProgressBar(dialog, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Now_Create_Connection"), "", 0, 100) { |
|
|
|
|
connectionBar = new AutoProgressBar(dialog, Toolkit.i18nText("Fine-Design_Basic_Utils_Now_Create_Connection"), "", 0, 100) { |
|
|
|
|
public void doMonitorCanceled() { |
|
|
|
|
connectionBar.close(); |
|
|
|
|
worker.cancel(true); |
|
|
|
@ -196,7 +197,7 @@ public final class StoreProcedureDataWrapper implements TableDataWrapper {
|
|
|
|
|
connectionBar.close(); |
|
|
|
|
// bug 61345 预览失败时,关闭窗口
|
|
|
|
|
dialog.setVisible(false); |
|
|
|
|
throw new Exception(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Database_Connection_Failed")); |
|
|
|
|
throw new Exception(Toolkit.i18nText("Fine-Design_Basic_Database_Connection_Failed")); |
|
|
|
|
} |
|
|
|
|
connectionBar.close(); |
|
|
|
|
storeProcedure.resetDataModelList(); |
|
|
|
@ -240,10 +241,10 @@ public final class StoreProcedureDataWrapper implements TableDataWrapper {
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 预览返回的一个数据集 |
|
|
|
|
* |
|
|
|
|
* |
|
|
|
|
* |
|
|
|
|
* @date 2014-12-3-下午7:42:53 |
|
|
|
|
* |
|
|
|
|
* |
|
|
|
|
*/ |
|
|
|
|
public void previewData() { |
|
|
|
|
previewData(-1, -1); |
|
|
|
@ -253,13 +254,13 @@ public final class StoreProcedureDataWrapper implements TableDataWrapper {
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 预览返回的一个数据集,带有显示值和实际值的标记结果 |
|
|
|
|
* |
|
|
|
|
* |
|
|
|
|
* @param keyIndex 实际值 |
|
|
|
|
* @param valueIndex 显示值 |
|
|
|
|
* |
|
|
|
|
* |
|
|
|
|
* |
|
|
|
|
* @date 2014-12-3-下午7:42:27 |
|
|
|
|
* |
|
|
|
|
* |
|
|
|
|
*/ |
|
|
|
|
public void previewData(final int keyIndex, final int valueIndex) { |
|
|
|
|
PreviewTablePane.previewStoreData(procedureDataModel, keyIndex, valueIndex); |
|
|
|
|