|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.swt.widgets.Widget org.eclipse.swt.widgets.Control org.eclipse.swt.widgets.Scrollable org.eclipse.swt.widgets.Text org.eclipse.ercp.swt.mobile.TextExtension
This class contains methods for extending the functionality of the Text control. The functionality is specific to non-full keyboard devices. Applications can request certain text input modes when a TextExtension control gets focused. The effective input mode takes into account two style aspects. One aspect is based on the content semantics. The other is based on the content character set.
The editing behavior and appearance are otherwise identical to the
Text
control. The differences in TextExtension are to ease the
possible switch of initial input modes, such as to enable/disable predictive
input, changing initial casing styles and particular input modes of some
languages. The initial input mode does not persist if changed by the end-user
during editing. Whether the mode will be persist during the application
life-cycle is implementation-dependent.
These are different semantic styles but basically all characters are allowed in each style. The implementation may use the content style to implement a device-dependent UI for assisting user input, for example, providing a UI to access the device's PIM or browser bookmarks, if available.
IMPORTANT: This class is not intended to be subclassed.
Field Summary | |
static int |
EMAILADDRESS
E-mail address. |
static int |
LATIN_INPUT_ONLY
Force that locale specific input modes should not be available. |
static int |
LOWERCASE
The lower case letters of a typeface. |
static int |
NON_PREDICTIVE
Hint for turning off predictive text input. |
static int |
TEXTCASE
The first word of each sentence is capitalized. |
static int |
TITLECASE
Every word is capitalized. |
static int |
UPPERCASE
The capital letters of a typeface. |
static int |
URL
Uniform Resource Locator. |
Fields inherited from class org.eclipse.swt.widgets.Text |
DELIMITER, LIMIT |
Constructor Summary | |
TextExtension(Composite parent,
int style)
Constructs a new instance of Text class when specific
styles are not used. |
|
TextExtension(Composite parent,
int style,
int extensionStyle)
Constructs a new instance of this class given its parent, a style value describing behaviour and appearance, and an additional style specifying the text types defined above. |
Method Summary | |
void |
setInitialInputMode(int casingModifier,
java.lang.String mode)
Hints to the implementation as to the input mode that should be used when the user initiates editing of this control. |
Methods inherited from class org.eclipse.swt.widgets.Scrollable |
computeTrim, getClientArea, getHorizontalBar, getVerticalBar |
Methods inherited from class org.eclipse.swt.widgets.Widget |
addDisposeListener, addListener, checkSubclass, checkWidget, dispose, getData, getData, getDisplay, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int EMAILADDRESS
public static final int URL
public static final int NON_PREDICTIVE
public static final int LATIN_INPUT_ONLY
public static final int UPPERCASE
public static final int LOWERCASE
public static final int TEXTCASE
public static final int TITLECASE
Constructor Detail |
public TextExtension(Composite parent, int style)
Text
class when specific
styles are not used.
The style
value is either one of the style constants defined in class
SWT
which is applicable to instances of this class, or
must be built by bitwise OR 'ing together (that is, using the
int
"|" operator) two or more of those SWT
style constants. Style bits are also inherited from superclasses.
parent
- a composite control which will be the parent of the new
instance (cannot be null)style
- the style of control to construct
java.lang.IllegalArgumentException
- SWTException
- SWT.SINGLE
,
SWT.MULTI
,
SWT.READ_ONLY
,
SWT.WRAP
,
Text.Text(Composite, int)
public TextExtension(Composite parent, int style, int extensionStyle)
The style
value is either one of the style constants defined
in class SWT
which is applicable to instances of this class, or
must be built by bitwise OR 'ing together (that is, using the
int
"|" operator) two or more of those SWT
style constants. Style bits are also inherited from superclasses.
The extensionStyle
value is a bitwise OR 'ing of
EMAILADDRESS, URL, NON_PREDICTIVE, and LATIN_INPUT_ONLY. EMAILADDRESS and
URL may not be both specified. The extensionStyle
value is ignored
when SWT.READ_ONLY
is specified in the style
value.
parent
- a composite control which is the parent of the new instance
(cannot be null)style
- the style of control to constructextensionStyle
- the TextExtension specific style.
java.lang.IllegalArgumentException
- SWTException
- SWT.SINGLE
,
SWT.MULTI
,
SWT.READ_ONLY
,
SWT.WRAP
,
Text.Text(Composite, int)
Method Detail |
public void setInitialInputMode(int casingModifier, java.lang.String mode)
The initial input mode is specified as a string and can be null. A
"Unicode character block" may be specified by adding the prefix "UCB_" to
the names of Unicode character blocks as defined in the J2SE class
java.lang.Character.UnicodeBlock
. Any Unicode character
block can be named in this fashion. For convenience, the most common
Unicode character blocks are listed below.
UCB_BASIC_LATIN
UCB_GREEK
UCB_CYRILLIC
UCB_ARMENIAN
UCB_HEBREW
UCB_ARABIC
UCB_DEVANAGARI
UCB_BENGALI
UCB_THAI
UCB_HIRAGANA
UCB_KATAKANA
UCB_HANGUL_SYLLABLES
An "Input subset" may be specified by adding the prefix "IS_" to the name
of input subsets as defined by the J2SE class
java.awt.im.InputSubset
. Any defined input subset can be
used. For convenience, the names of the currently defined input subsets
are listed below.
IS_FULLWIDTH_DIGITS
IS_FULLWIDTH_LATIN
IS_HALFWIDTH_KATAKANA
IS_HANJA
IS_KANJI
IS_LATIN
IS_LATIN_DIGITS
IS_SIMPLIFIED_HANZI
IS_TRADITIONAL_HANZI
Note: Implementations need not compile in support for all the strings listed above. Instead, they need only to compile in the strings that name Unicode character subsets that they support. If the subset name passed by the application is not known by the implementation, the request is gracefully ignored, and a default input mode based on current locale configuration is used.
mode
- a string naming a Unicode character block, input subset, or
nullcasingModifier
- an int value. Must be one of UPPERCASE, LOWERCASE, TEXTCASE or
TITLECASE.
java.lang.IllegalArgumentException
- SWTException
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |