Browse Source

bug fix

master
XiaXiang 7 years ago
parent
commit
1db52a5f2c
  1. 46
      designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java

46
designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java

@ -322,6 +322,7 @@ public class AlphaFineDialog extends UIDialog {
this.searchWorker = new SwingWorker() { this.searchWorker = new SwingWorker() {
@Override @Override
protected Object doInBackground() throws Exception { protected Object doInBackground() throws Exception {
resumeLeftPane();
splitLabel.setIcon(new ImageIcon(getClass().getResource("/com/fr/design/mainframe/alphafine/images/bigloading.gif"))); splitLabel.setIcon(new ImageIcon(getClass().getResource("/com/fr/design/mainframe/alphafine/images/bigloading.gif")));
rebuildList(searchTextField.getText().toLowerCase()); rebuildList(searchTextField.getText().toLowerCase());
return null; return null;
@ -339,24 +340,20 @@ public class AlphaFineDialog extends UIDialog {
} }
/** /**
* 停止加载状态 * 恢复左侧列表面板
*/ */
private void fireStopLoading() { private void resumeLeftPane() {
searchListModel.resetState(); if (searchResultPane != null && defaultPane != null) {
replaceLeftPane(); searchResultPane.remove(defaultPane);
defaultPane = null;
searchResultPane.add(leftSearchResultPane, BorderLayout.WEST);
rightSearchResultPane.removeAll();
refreshContainer();
} }
/**
* 刷新容器
*/
private void refreshContainer() {
validate();
repaint();
revalidate();
} }
/** /**
* 重置结果面板 * 移除左侧列表面板
*/ */
private void replaceLeftPane() { private void replaceLeftPane() {
if (searchResultPane != null) { if (searchResultPane != null) {
@ -369,6 +366,23 @@ public class AlphaFineDialog extends UIDialog {
} }
} }
/**
* 停止加载状态
*/
private void fireStopLoading() {
searchListModel.resetState();
replaceLeftPane();
}
/**
* 刷新容器
*/
private void refreshContainer() {
validate();
repaint();
revalidate();
}
/** /**
* 重新构建搜索结果列表 * 重新构建搜索结果列表
* 先根据输入判断是不是隐藏的搜索功能 * 先根据输入判断是不是隐藏的搜索功能
@ -968,12 +982,6 @@ public class AlphaFineDialog extends UIDialog {
*/ */
private void fireSelectedStateChanged(AlphaCellModel element, int index) { private void fireSelectedStateChanged(AlphaCellModel element, int index) {
if (element.hasAction() && !isValidSelected()) { if (element.hasAction() && !isValidSelected()) {
if (defaultPane != null) {
searchResultPane.remove(defaultPane);
defaultPane = null;
searchResultPane.add(leftSearchResultPane, BorderLayout.WEST);
refreshContainer();
}
searchResultList.setSelectedIndex(index); searchResultList.setSelectedIndex(index);
setValidSelected(true); setValidSelected(true);
} }

Loading…
Cancel
Save