|
|
@ -367,7 +367,6 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
* 停止加载状态 |
|
|
|
* 停止加载状态 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private void fireStopLoading() { |
|
|
|
private void fireStopLoading() { |
|
|
|
searchListModel.resetState(); |
|
|
|
|
|
|
|
if (searchResultPane != null) { |
|
|
|
if (searchResultPane != null) { |
|
|
|
removeLeftPane(); |
|
|
|
removeLeftPane(); |
|
|
|
} |
|
|
|
} |
|
|
@ -665,25 +664,18 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
searchTextField.addKeyListener(new KeyAdapter() { |
|
|
|
searchTextField.addKeyListener(new KeyAdapter() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void keyPressed(KeyEvent e) { |
|
|
|
public void keyPressed(KeyEvent e) { |
|
|
|
if (e.getKeyCode() == KeyEvent.VK_DOWN) { |
|
|
|
if (e.getKeyCode() == KeyEvent.VK_ENTER) { |
|
|
|
searchResultList.requestFocus(); |
|
|
|
if (searchResultList.getModel().getSize() > 1) { |
|
|
|
searchResultList.setSelectedIndex(searchResultList.getSelectedIndex() + 1); |
|
|
|
dealWithSearchResult(searchResultList.getSelectedValue()); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void keyReleased(KeyEvent e) { |
|
|
|
|
|
|
|
int keyCode = e.getKeyCode(); |
|
|
|
|
|
|
|
if (keyCode == KeyEvent.VK_ESCAPE) { |
|
|
|
|
|
|
|
if (StringUtils.isBlank(searchTextField.getText()) || ComparatorUtils.equals(searchTextField.getText(), searchTextField.getPlaceHolder())) { |
|
|
|
|
|
|
|
AlphaFineDialog.this.setVisible(false); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
searchTextField.setText(null); |
|
|
|
|
|
|
|
removeSearchResult(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} else if (e.getKeyCode() == KeyEvent.VK_ENTER) { |
|
|
|
} else if (e.getKeyCode() == KeyEvent.VK_DOWN) { |
|
|
|
dealWithSearchResult(searchResultList.getSelectedValue()); |
|
|
|
if (searchResultList.getSelectedIndex() == searchResultList.getModel().getSize() - 1) { |
|
|
|
} |
|
|
|
searchResultList.setSelectedIndex(0); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
searchResultList.setSelectedIndex(searchResultList.getSelectedIndex() + 1); |
|
|
|
|
|
|
|
} else if (e.getKeyCode() == KeyEvent.VK_UP) { |
|
|
|
|
|
|
|
searchResultList.setSelectedIndex(searchResultList.getSelectedIndex() - 1); |
|
|
|
|
|
|
|
} else escAlphaFine(e); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
@ -754,7 +746,9 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
private void doNavigate() { |
|
|
|
private void doNavigate() { |
|
|
|
AlphaFineDialog.this.dispose(); |
|
|
|
AlphaFineDialog.this.dispose(); |
|
|
|
final AlphaCellModel model = searchResultList.getSelectedValue(); |
|
|
|
final AlphaCellModel model = searchResultList.getSelectedValue(); |
|
|
|
model.doAction(); |
|
|
|
if (model != null) { |
|
|
|
|
|
|
|
model.doAction(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -888,6 +882,21 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
this.splitLabel = splitLabel; |
|
|
|
this.splitLabel = splitLabel; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 键盘退出AlphaFine |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param e |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private void escAlphaFine(KeyEvent e) { |
|
|
|
|
|
|
|
if (e.getKeyCode() == KeyEvent.VK_ESCAPE) { |
|
|
|
|
|
|
|
if (StringUtils.isBlank(searchTextField.getText()) || ComparatorUtils.equals(searchTextField.getText(), searchTextField.getPlaceHolder())) { |
|
|
|
|
|
|
|
AlphaFineDialog.this.setVisible(false); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
searchTextField.setText(null); |
|
|
|
|
|
|
|
removeSearchResult(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* +-------------------------------------+ |
|
|
|
* +-------------------------------------+ |
|
|
@ -907,7 +916,9 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void setSelectedIndex(int index) { |
|
|
|
public void setSelectedIndex(int index) { |
|
|
|
if (index > 0 && checkSelectedIndex(index)) { |
|
|
|
if (index == 0 && getModel().getSize() > 1) { |
|
|
|
|
|
|
|
super.setSelectedIndex(1); |
|
|
|
|
|
|
|
} else if (index > 0 && checkSelectedIndex(index)) { |
|
|
|
int previousIndex = getSelectedIndex(); |
|
|
|
int previousIndex = getSelectedIndex(); |
|
|
|
super.setSelectedIndex(index); |
|
|
|
super.setSelectedIndex(index); |
|
|
|
AlphaCellModel cellModel = getSelectedValue(); |
|
|
|
AlphaCellModel cellModel = getSelectedValue(); |
|
|
@ -930,21 +941,6 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void initListListener() { |
|
|
|
private void initListListener() { |
|
|
|
addKeyListener(new KeyAdapter() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void keyPressed(KeyEvent e) { |
|
|
|
|
|
|
|
if (e.getKeyCode() == KeyEvent.VK_ENTER) { |
|
|
|
|
|
|
|
dealWithSearchResult(getSelectedValue()); |
|
|
|
|
|
|
|
} else if (e.getKeyCode() == KeyEvent.VK_UP) { |
|
|
|
|
|
|
|
if (getSelectedIndex() == 1) { |
|
|
|
|
|
|
|
searchTextField.requestFocus(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else if (e.getKeyCode() == KeyEvent.VK_ESCAPE) { |
|
|
|
|
|
|
|
searchTextField.requestFocus(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
addMouseListener(new MouseAdapter() { |
|
|
|
addMouseListener(new MouseAdapter() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void mouseClicked(MouseEvent e) { |
|
|
|
public void mouseClicked(MouseEvent e) { |
|
|
@ -968,6 +964,14 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
addKeyListener(new KeyAdapter() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void keyPressed(KeyEvent e) { |
|
|
|
|
|
|
|
escAlphaFine(e); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|