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() {
@Override
protected Object doInBackground() throws Exception {
resumeLeftPane();
splitLabel.setIcon(new ImageIcon(getClass().getResource("/com/fr/design/mainframe/alphafine/images/bigloading.gif")));
rebuildList(searchTextField.getText().toLowerCase());
return null;
@ -339,24 +340,20 @@ public class AlphaFineDialog extends UIDialog {
}
/**
* 停止加载状态
* 恢复左侧列表面板
*/
private void fireStopLoading() {
searchListModel.resetState();
replaceLeftPane();
private void resumeLeftPane() {
if (searchResultPane != null && defaultPane != null) {
searchResultPane.remove(defaultPane);
defaultPane = null;
searchResultPane.add(leftSearchResultPane, BorderLayout.WEST);
rightSearchResultPane.removeAll();
refreshContainer();
}
/**
* 刷新容器
*/
private void refreshContainer() {
validate();
repaint();
revalidate();
}
/**
* 重置结果面板
* 移除左侧列表面板
*/
private void replaceLeftPane() {
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) {
if (element.hasAction() && !isValidSelected()) {
if (defaultPane != null) {
searchResultPane.remove(defaultPane);
defaultPane = null;
searchResultPane.add(leftSearchResultPane, BorderLayout.WEST);
refreshContainer();
}
searchResultList.setSelectedIndex(index);
setValidSelected(true);
}

Loading…
Cancel
Save