| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | 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.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.api.ApproximateMatchingRule; |
| | | import org.opends.server.api.AttributeSyntax; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | |
| | | public class MatchingRulePanel extends SchemaElementPanel |
| | | { |
| | | private static final long serialVersionUID = 2440493955626646008L; |
| | | private TitlePanel titlePanel = new TitlePanel(Message.EMPTY, |
| | | Message.EMPTY); |
| | | private TitlePanel titlePanel = new TitlePanel(LocalizableMessage.EMPTY, |
| | | LocalizableMessage.EMPTY); |
| | | private JLabel name = Utilities.createDefaultLabel(); |
| | | private JLabel oid = Utilities.createDefaultLabel(); |
| | | private JLabel description = Utilities.createDefaultLabel(); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_MATCHING_RULE_PANEL_TITLE.get(); |
| | | } |
| | |
| | | |
| | | gbc.insets.bottom = 0; |
| | | gbc.insets.top = 8; |
| | | Message[] labels = { |
| | | LocalizableMessage[] labels = { |
| | | INFO_CTRL_PANEL_MATCHING_RULE_NAME.get(), |
| | | INFO_CTRL_PANEL_MATCHING_RULE_OID.get(), |
| | | INFO_CTRL_PANEL_MATCHING_RULE_DESCRIPTION.get(), |
| | |
| | | { |
| | | n = NOT_APPLICABLE.toString(); |
| | | } |
| | | titlePanel.setDetails(Message.raw(n)); |
| | | titlePanel.setDetails(LocalizableMessage.raw(n)); |
| | | name.setText(n); |
| | | oid.setText(matchingRule.getOID()); |
| | | AttributeSyntax<?> s = null; |
| | |
| | | * @param matchingRule the matching rule. |
| | | * @return the message for the type of the provided matching rule. |
| | | */ |
| | | static Message getTypeValue(MatchingRule matchingRule) |
| | | static LocalizableMessage getTypeValue(MatchingRule matchingRule) |
| | | { |
| | | Message text; |
| | | LocalizableMessage text; |
| | | if (matchingRule instanceof EqualityMatchingRule) |
| | | { |
| | | text = INFO_CTRL_PANEL_INDEX_EQUALITY.get(); |