| | |
| | | import java.awt.GridBagConstraints; |
| | | import java.awt.event.MouseAdapter; |
| | | import java.awt.event.MouseEvent; |
| | | import java.util.Comparator; |
| | | import java.util.TreeSet; |
| | | |
| | | import javax.swing.DefaultListModel; |
| | |
| | | |
| | | import org.opends.guitools.controlpanel.event.ConfigurationChangeEvent; |
| | | import org.opends.guitools.controlpanel.ui.components.TitlePanel; |
| | | import org.opends.guitools.controlpanel.util.LowerCaseComparator; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.opends.server.api.ApproximateMatchingRule; |
| | |
| | | |
| | | type.setText(getTypeValue(matchingRule).toString()); |
| | | |
| | | TreeSet<String> attributes = new TreeSet<String>(); |
| | | Comparator<String> lowerCaseComparator = new LowerCaseComparator(); |
| | | TreeSet<String> attributes = new TreeSet<String>(lowerCaseComparator); |
| | | for (AttributeType attr : schema.getAttributeTypes().values()) |
| | | { |
| | | attributes.add(attr.getNameOrOID()); |
| | | if (matchingRule.equals(attr.getApproximateMatchingRule()) || |
| | | matchingRule.equals(attr.getEqualityMatchingRule()) || |
| | | matchingRule.equals(attr.getSubstringMatchingRule()) || |
| | | matchingRule.equals(attr.getOrderingMatchingRule())) |
| | | { |
| | | attributes.add(attr.getNameOrOID()); |
| | | } |
| | | } |
| | | DefaultListModel model = (DefaultListModel)usedByAttributes.getModel(); |
| | | model.clear(); |