PL-8716 TokenList requestFocus is ignored

This commit is contained in:
Daniil Tsarev 2017-04-05 13:13:50 +04:00
parent fa7ae04040
commit ce3f4d6a27
2 changed files with 19 additions and 1 deletions

View File

@ -955,7 +955,7 @@ public class DesktopTokenList extends DesktopAbstractField<JPanel> implements To
}
}
}
public void refreshComponent() {
if (editor != null) {
remove(editor);
@ -1149,4 +1149,13 @@ public class DesktopTokenList extends DesktopAbstractField<JPanel> implements To
protected boolean isEmpty(Object value) {
return super.isEmpty(value) || (value instanceof Collection && ((Collection) value).isEmpty());
}
@Override
public void requestFocus() {
if (simple) {
addButton.requestFocus();
} else {
lookupPickerField.requestFocus();
}
}
}

View File

@ -904,4 +904,13 @@ public class WebTokenList extends WebAbstractField<WebTokenList.CubaTokenList> i
protected boolean isEmpty(Object value) {
return super.isEmpty(value) || (value instanceof Collection && ((Collection) value).isEmpty());
}
@Override
public void requestFocus() {
if (simple) {
addButton.requestFocus();
} else {
lookupPickerField.requestFocus();
}
}
}