XiaXiang 7 years ago
parent
commit
7eee7ff2b0
  1. 9
      designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java

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

@ -224,7 +224,7 @@ public class AlphaFineDialog extends UIDialog {
*/ */
private void doSearch(String text) { private void doSearch(String text) {
if (StringUtils.isBlank(text) || isNeedSearch(text)) { if (isNeedSearch(text)) {
removeSearchResult(); removeSearchResult();
} else { } else {
showSearchResult(text); showSearchResult(text);
@ -232,7 +232,7 @@ public class AlphaFineDialog extends UIDialog {
} }
boolean isNeedSearch(String text) { boolean isNeedSearch(String text) {
return ComparatorUtils.equals(PLACE_HOLDER, text) || text.contains("'") || text.contains(StringUtils.BLANK); return ComparatorUtils.equals(PLACE_HOLDER, text) || text.contains("'") || StringUtils.isBlank(text);
} }
@Override @Override
@ -267,7 +267,7 @@ public class AlphaFineDialog extends UIDialog {
searchResultPane = null; searchResultPane = null;
} }
setSize(AlphaFineConstants.FIELD_SIZE); setSize(AlphaFineConstants.FIELD_SIZE);
repaint(); refreshContainer();
} }
/** /**
@ -664,8 +664,7 @@ public class AlphaFineDialog extends UIDialog {
} }
@Override @Override
public void keyReleased(KeyEvent e) { public void keyReleased(KeyEvent e) {int keyCode = e.getKeyCode();
int keyCode = e.getKeyCode();
if (keyCode == KeyEvent.VK_ESCAPE) { if (keyCode == KeyEvent.VK_ESCAPE) {
if (StringUtils.isBlank(searchTextField.getText()) || ComparatorUtils.equals(searchTextField.getText(), searchTextField.getPlaceHolder())) { if (StringUtils.isBlank(searchTextField.getText()) || ComparatorUtils.equals(searchTextField.getText(), searchTextField.getPlaceHolder())) {
AlphaFineDialog.this.setVisible(false); AlphaFineDialog.this.setVisible(false);

Loading…
Cancel
Save