Remote Systems
v6.4.1

com.ibm.etools.systems.logging.internal
Class LabelUtil

java.lang.Object
  extended bycom.ibm.etools.systems.logging.internal.LabelUtil

public class LabelUtil
extends Object

Provides a set of utility routines for processing mnemonics for labels that are to be used in dialogs and menus.


Constructor Summary
LabelUtil()
           
 
Method Summary
static String assignMnemonic(String label, Set used)
          Assigns a mnemonic to a label and adds it to the set of used mnemonic characters.
static Set usedFromString(String s)
          This is a convenience method for constucting a "used set" by taking the individual characters of a string in both lower and upper cases and adding them to the set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LabelUtil

public LabelUtil()
Method Detail

assignMnemonic

public static String assignMnemonic(String label,
                                    Set used)
Assigns a mnemonic to a label and adds it to the set of used mnemonic characters. Used mnemonics are ignored in the search for a valid mnemonic. If there are no characters in the label that can be used as mnemonics then a valid mnemonic is appended to the label in parentheses. If the label already has a mnemonic, its mnemonic is added to the set of used mnemonics, but the label itself is unchanged.

Parameters:
label - the label in which the mnemonic is to be discovered
used - the set of Characters that cannot be used as mnemonics. This set is modified by the operation if a mnemonic could be found.
Returns:
the label with the mnemonic identified or the original label if a mnemonic could not be found.

usedFromString

public static Set usedFromString(String s)
This is a convenience method for constucting a "used set" by taking the individual characters of a string in both lower and upper cases and adding them to the set. Mnemonics are not case sensitive.

Parameters:
s - the String from which to construct the set.
Returns:
the set.

Remote Systems
v6.4.1

Copyright © 2005 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.