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) {
if (StringUtils.isBlank(text) || isNeedSearch(text)) {
if (isNeedSearch(text)) {
removeSearchResult();
} else {
showSearchResult(text);
@ -232,7 +232,7 @@ public class AlphaFineDialog extends UIDialog {
}
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
@ -267,7 +267,7 @@ public class AlphaFineDialog extends UIDialog {
searchResultPane = null;
}
setSize(AlphaFineConstants.FIELD_SIZE);
repaint();
refreshContainer();
}
/**
@ -664,8 +664,7 @@ public class AlphaFineDialog extends UIDialog {
}
@Override
public void keyReleased(KeyEvent e) {
int keyCode = e.getKeyCode();
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);

Loading…
Cancel
Save