|
|
@ -1,5 +1,6 @@ |
|
|
|
package com.fr.design.remote.ui; |
|
|
|
package com.fr.design.remote.ui; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.fr.base.BaseUtils; |
|
|
|
import com.fr.design.border.UITitledBorder; |
|
|
|
import com.fr.design.border.UITitledBorder; |
|
|
|
import com.fr.design.constants.LayoutConstants; |
|
|
|
import com.fr.design.constants.LayoutConstants; |
|
|
|
import com.fr.design.dialog.BasicPane; |
|
|
|
import com.fr.design.dialog.BasicPane; |
|
|
@ -240,13 +241,14 @@ public class UserManagerPane extends BasicPane { |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
// 搜索
|
|
|
|
// 搜索
|
|
|
|
JPanel searchPanel = new JPanel(new FlowLayout(FlowLayout.LEFT)); |
|
|
|
JPanel searchPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 5)); |
|
|
|
searchPanel.setBorder(BorderFactory.createEmptyBorder()); |
|
|
|
searchPanel.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5)); |
|
|
|
keyField.setPreferredSize(new Dimension(250, 20)); |
|
|
|
keyField.setPreferredSize(new Dimension(270, 20)); |
|
|
|
keyField.requestFocus(); |
|
|
|
keyField.requestFocus(); |
|
|
|
keyField.addKeyListener(keyFieldKeyListener); |
|
|
|
keyField.addKeyListener(keyFieldKeyListener); |
|
|
|
keyField.getDocument().addDocumentListener(documentListener); |
|
|
|
keyField.getDocument().addDocumentListener(documentListener); |
|
|
|
keyButton.setText(Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Search")); |
|
|
|
keyButton.setIcon(BaseUtils.readIcon("com/fr/design/images/buttonicon/user_search_normal.png")); |
|
|
|
|
|
|
|
keyButton.setToolTipText(Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Search")); |
|
|
|
keyButton.addActionListener(keyButtonActionListener); |
|
|
|
keyButton.addActionListener(keyButtonActionListener); |
|
|
|
searchPanel.add(keyField); |
|
|
|
searchPanel.add(keyField); |
|
|
|
searchPanel.add(keyButton); |
|
|
|
searchPanel.add(keyButton); |
|
|
@ -367,9 +369,9 @@ public class UserManagerPane extends BasicPane { |
|
|
|
final SwingWorker getMemberWorker = new SwingWorker<List<RemoteDesignMember>, Void>() { |
|
|
|
final SwingWorker getMemberWorker = new SwingWorker<List<RemoteDesignMember>, Void>() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected List<RemoteDesignMember> doInBackground() { |
|
|
|
protected List<RemoteDesignMember> doInBackground() { |
|
|
|
addingMembers.clear(); |
|
|
|
|
|
|
|
String username = WorkContext.getCurrent().getConnection().getUserName(); |
|
|
|
String username = WorkContext.getCurrent().getConnection().getUserName(); |
|
|
|
synchronized (addingMembers) { |
|
|
|
synchronized (addingMembers) { |
|
|
|
|
|
|
|
addingMembers.clear(); |
|
|
|
Collection<RemoteDesignMember> more = WorkContext.getCurrent().get(DecisionOperator.class).getMembers(username, keyword); |
|
|
|
Collection<RemoteDesignMember> more = WorkContext.getCurrent().get(DecisionOperator.class).getMembers(username, keyword); |
|
|
|
pageNum = 1; |
|
|
|
pageNum = 1; |
|
|
|
if (!more.isEmpty()) { |
|
|
|
if (!more.isEmpty()) { |
|
|
@ -395,7 +397,7 @@ public class UserManagerPane extends BasicPane { |
|
|
|
final SwingWorker loadMoreWorker = new SwingWorker<List<RemoteDesignMember>, Void>() { |
|
|
|
final SwingWorker loadMoreWorker = new SwingWorker<List<RemoteDesignMember>, Void>() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected List<RemoteDesignMember> doInBackground() { |
|
|
|
protected List<RemoteDesignMember> doInBackground() { |
|
|
|
|
|
|
|
|
|
|
|
String username = WorkContext.getCurrent().getConnection().getUserName(); |
|
|
|
String username = WorkContext.getCurrent().getConnection().getUserName(); |
|
|
|
synchronized (addingMembers) { |
|
|
|
synchronized (addingMembers) { |
|
|
|
addingMembers.remove(RemoteDesignMember.DEFAULT_MEMBER); |
|
|
|
addingMembers.remove(RemoteDesignMember.DEFAULT_MEMBER); |
|
|
|