|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.blackberry.api.stringpattern.PatternRepository
public final class PatternRepository
Use this class to register ApplicationMenuItems with a Perl-style regular expression or specific String. When a String matching the provided pattern is found, the provided ApplicationMenuItems will appear in the current application menu.
| Field Summary | ||
|---|---|---|
static int |
PATTERN_TYPE_EXACT_MATCH
If this pattern type is used, the pattern will match a string if and only if it is an exact match |
|
static int |
PATTERN_TYPE_REGULAR_EXPRESSION
If this pattern type is used, the pattern will be treated as a Perl-style regular expression |
|
| Method Summary | ||
|---|---|---|
static void |
addPattern(ApplicationDescriptor application,
String pattern,
int patternType,
ApplicationMenuItem[] menuItems)
Adds a pattern to the repository |
|
static void |
removePatterns(ApplicationDescriptor application)
Removes all patterns in the repository for the current application |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int PATTERN_TYPE_EXACT_MATCH
public static final int PATTERN_TYPE_REGULAR_EXPRESSION
| Method Detail |
|---|
public static void addPattern(ApplicationDescriptor application,
String pattern,
int patternType,
ApplicationMenuItem[] menuItems)
application - An ApplicationDescriptor that describes the application registering the patternpattern - The pattern being registeredpatternType - The type of pattern. Specify one of the PatternRepository.PATTERN_TYPE_ constantsmenuItems - An array of ApplicationMenuItems to appear when the pattern appears in an ActiveTextField
IllegalArgumentException - If pattern is null, zero-length or malformed; or if application is null or does not describe the application calling this method;
or if menuItems is null, zero-length or contains objects that are null, or whose toString() methods throw exceptions or return null or return
zero-length Strings.public static void removePatterns(ApplicationDescriptor application)
application - ApplicationDescriptor describing the application calling this method
IllegalArgumentException - If application does not describe the application calling this method or if application is null
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal