|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.device.api.util.StringProviderMutator
public final class StringProviderMutator
Provides a String that can change.
A StringProviderMutator is identical to StringProvider, except it
provides access to the mutator methods. This is useful when an application
wants unrestricted access to a context-sensitive String but wants to provide
restricted access to other applications.
| Constructor Summary | ||
|---|---|---|
StringProviderMutator(String string)
Constructs a new StringProviderMutator instance with initial text from a specified string. |
||
StringProviderMutator(String family,
int id)
Constructs a new StringProviderMutator instance with initial text from a resource bundle. |
||
StringProviderMutator(StringProviderMutator provider)
Constructs a new StringProviderMutator instance with initial text from an existing StringProviderMutator. |
||
| Method Summary | ||
|---|---|---|
boolean |
equals(Object o)
Checks to see if another object is equal to this StringProviderMutator. |
|
int |
getResourceBundleId()
Retrieves the resource bundle ID set in this provider. |
|
String |
getResourceBundleName()
Retrieves the resource bundle name set in this provider. |
|
StringProvider |
getStringProvider()
Retrieves the underlying StringProvider. |
|
void |
setRemoveHotkeyFromString(boolean isRemoveHotkey)
Indicates whether this provider should remove hotkey underscores in the text, e.g. for application titles. |
|
void |
setString(String string)
Sets the string containing the text for this provider. |
|
void |
setString(String family,
int id)
Sets the resource bundle containing the text for this provider. |
|
void |
setString(StringProviderMutator provider)
Sets the string containing the text for this provider. |
|
String |
toString()
Returns the string of this provider. |
|
| Methods inherited from class java.lang.Object |
|---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public StringProviderMutator(String family,
int id)
family - Name of resource bundle containing inital text.id - ID in resource bundle containing initial text.public StringProviderMutator(String string)
string - String containing inital text.public StringProviderMutator(StringProviderMutator provider)
provider - StringProviderMutator to copy.| Method Detail |
|---|
public boolean equals(Object o)
getResourceBundleID and getResourceBundleName are
equivalent. If the bundle ID or name are null,checks to see
if the result of toString is equivalent.
Two StringProviderMutators which have identical resource information but different strings due to absence or presence of hotkeys are considered unequal.
equals in class Objecto - Object to compare to
True if object is the same as this, false
otherwise.Boolean.hashCode(),
Hashtablepublic int getResourceBundleId()
public String getResourceBundleName()
null if not set.public StringProvider getStringProvider()
StringProvider. A StringProvider
does not have any modifier (@link setString} methods and cannot directly
modify this object.
The returned StringProvider can still be updated through this StringProviderMutator.
StringProvider.public void setRemoveHotkeyFromString(boolean isRemoveHotkey)
True - to remove hotkey underscores, false otherwise.
public void setString(String family,
int id)
family - Name of resource bundle containing text.id - ID in resource bundle containing text.public void setString(String string)
string - String containing text.public void setString(StringProviderMutator provider)
provider - StringProviderMutator containing text.public String toString()
toString in class Objectnull if
text not set or if resource bundle does not exist.
|
|||||||||
| 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