Java Doc for InputMethodEvent.java in  » 6.0-JDK-Modules » j2me » java » awt » event » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » j2me » java.awt.event 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.awt.AWTEvent
   java.awt.event.InputMethodEvent

InputMethodEvent
public class InputMethodEvent extends AWTEvent (Code)
Input method events contain information about text that is being composed using an input method. Whenever the text changes, the input method sends an event. If the text component that's currently using the input method is an active client, the event is dispatched to that component. Otherwise, it is dispatched to a separate composition window.

The text included with the input method event consists of two parts: committed text and composed text. Either part may be empty. The two parts together replace any uncommitted composed text sent in previous events, or the currently selected committed text. Committed text should be integrated into the text component's persistent data, it will not be sent again. Composed text may be sent repeatedly, with changes to reflect the user's editing operations. Committed text always precedes composed text.
author:
   JavaSoft Asia/Pacific
version:
   1.23 06/14/04
since:
   1.2



Field Summary
final public static  intCARET_POSITION_CHANGED
     The event type indicating a changed insertion point in input method text.
final public static  intINPUT_METHOD_FIRST
     Marks the first integer id for the range of input method event ids.
final public static  intINPUT_METHOD_LAST
     Marks the last integer id for the range of input method event ids.
final public static  intINPUT_METHOD_TEXT_CHANGED
     The event type indicating changed input method text.
 longwhen
     The time stamp that indicates when the event was created.

Constructor Summary
public  InputMethodEvent(Component source, int id, long when, AttributedCharacterIterator text, int committedCharacterCount, TextHitInfo caret, TextHitInfo visiblePosition)
     Constructs an InputMethodEvent with the specified source component, type, time, text, caret, and visiblePosition.

The offsets of caret and visiblePosition are relative to the current composed text; that is, the composed text within text if this is an INPUT_METHOD_TEXT_CHANGED event, the composed text within the text of the preceding INPUT_METHOD_TEXT_CHANGED event otherwise.
Parameters:
  source - the object where the event originated
Parameters:
  id - the event type
Parameters:
  when - a long integer that specifies the time the event occurred
Parameters:
  text - the combined committed and composed text,committed text first; must be nullwhen the event type is CARET_POSITION_CHANGED;may be null forINPUT_METHOD_TEXT_CHANGED if there's nocommitted or composed text
Parameters:
  committedCharacterCount - the number of committedcharacters in the text
Parameters:
  caret - the caret (a.k.a.

public  InputMethodEvent(Component source, int id, AttributedCharacterIterator text, int committedCharacterCount, TextHitInfo caret, TextHitInfo visiblePosition)
     Constructs an InputMethodEvent with the specified source component, type, text, caret, and visiblePosition.

The offsets of caret and visiblePosition are relative to the current composed text; that is, the composed text within text if this is an INPUT_METHOD_TEXT_CHANGED event, the composed text within the text of the preceding INPUT_METHOD_TEXT_CHANGED event otherwise. The time stamp for this event is initialized by invoking java.awt.EventQueue.getMostRecentEventTime .
Parameters:
  source - the object where the event originated
Parameters:
  id - the event type
Parameters:
  text - the combined committed and composed text,committed text first; must be nullwhen the event type is CARET_POSITION_CHANGED;may be null forINPUT_METHOD_TEXT_CHANGED if there's nocommitted or composed text
Parameters:
  committedCharacterCount - the number of committedcharacters in the text
Parameters:
  caret - the caret (a.k.a.

public  InputMethodEvent(Component source, int id, TextHitInfo caret, TextHitInfo visiblePosition)
     Constructs an InputMethodEvent with the specified source component, type, caret, and visiblePosition. The text is set to null, committedCharacterCount to 0.

The offsets of caret and visiblePosition are relative to the current composed text; that is, the composed text within the text of the preceding INPUT_METHOD_TEXT_CHANGED event if the event being constructed as a CARET_POSITION_CHANGED event. For an INPUT_METHOD_TEXT_CHANGED event without text, caret and visiblePosition must be null. The time stamp for this event is initialized by invoking java.awt.EventQueue.getMostRecentEventTime .
Parameters:
  source - the object where the event originated
Parameters:
  id - the event type
Parameters:
  caret - the caret (a.k.a.


Method Summary
public  voidconsume()
     Consumes this event so that it will not be processed in the default manner by the source which originated it.
public  TextHitInfogetCaret()
     Gets the caret.

The offset of the caret is relative to the current composed text; that is, the composed text within getText() if this is an INPUT_METHOD_TEXT_CHANGED event, the composed text within getText() of the preceding INPUT_METHOD_TEXT_CHANGED event otherwise. the caret (a.k.a.

public  intgetCommittedCharacterCount()
     Gets the number of committed characters in the text.
public  AttributedCharacterIteratorgetText()
     Gets the combined committed and composed text.
public  TextHitInfogetVisiblePosition()
     Gets the position that's most important to be visible.
public  longgetWhen()
     Returns the time stamp of when this event occurred.
public  booleanisConsumed()
     Returns whether or not this event has been consumed.
public  StringparamString()
     Returns a parameter string identifying this event.

Field Detail
CARET_POSITION_CHANGED
final public static int CARET_POSITION_CHANGED(Code)
The event type indicating a changed insertion point in input method text. This event is generated by input methods while processing input if only the caret changed.



INPUT_METHOD_FIRST
final public static int INPUT_METHOD_FIRST(Code)
Marks the first integer id for the range of input method event ids.



INPUT_METHOD_LAST
final public static int INPUT_METHOD_LAST(Code)
Marks the last integer id for the range of input method event ids.



INPUT_METHOD_TEXT_CHANGED
final public static int INPUT_METHOD_TEXT_CHANGED(Code)
The event type indicating changed input method text. This event is generated by input methods while processing input.



when
long when(Code)
The time stamp that indicates when the event was created.
See Also:   InputMethodEvent.getWhen
since:
   1.4




Constructor Detail
InputMethodEvent
public InputMethodEvent(Component source, int id, long when, AttributedCharacterIterator text, int committedCharacterCount, TextHitInfo caret, TextHitInfo visiblePosition)(Code)
Constructs an InputMethodEvent with the specified source component, type, time, text, caret, and visiblePosition.

The offsets of caret and visiblePosition are relative to the current composed text; that is, the composed text within text if this is an INPUT_METHOD_TEXT_CHANGED event, the composed text within the text of the preceding INPUT_METHOD_TEXT_CHANGED event otherwise.
Parameters:
  source - the object where the event originated
Parameters:
  id - the event type
Parameters:
  when - a long integer that specifies the time the event occurred
Parameters:
  text - the combined committed and composed text,committed text first; must be nullwhen the event type is CARET_POSITION_CHANGED;may be null forINPUT_METHOD_TEXT_CHANGED if there's nocommitted or composed text
Parameters:
  committedCharacterCount - the number of committedcharacters in the text
Parameters:
  caret - the caret (a.k.a. insertion point);null if there's no caret within currentcomposed text
Parameters:
  visiblePosition - the position that's most importantto be visible; null if there's norecommendation for a visible position within currentcomposed text
exception:
  IllegalArgumentException - if id is notin the rangeINPUT_METHOD_FIRST..INPUT_METHOD_LAST;or if id is CARET_POSITION_CHANGED andtext is not null;or if committedCharacterCount is not in the range0..(text.getEndIndex() - text.getBeginIndex())
since:
   1.4




InputMethodEvent
public InputMethodEvent(Component source, int id, AttributedCharacterIterator text, int committedCharacterCount, TextHitInfo caret, TextHitInfo visiblePosition)(Code)
Constructs an InputMethodEvent with the specified source component, type, text, caret, and visiblePosition.

The offsets of caret and visiblePosition are relative to the current composed text; that is, the composed text within text if this is an INPUT_METHOD_TEXT_CHANGED event, the composed text within the text of the preceding INPUT_METHOD_TEXT_CHANGED event otherwise. The time stamp for this event is initialized by invoking java.awt.EventQueue.getMostRecentEventTime .
Parameters:
  source - the object where the event originated
Parameters:
  id - the event type
Parameters:
  text - the combined committed and composed text,committed text first; must be nullwhen the event type is CARET_POSITION_CHANGED;may be null forINPUT_METHOD_TEXT_CHANGED if there's nocommitted or composed text
Parameters:
  committedCharacterCount - the number of committedcharacters in the text
Parameters:
  caret - the caret (a.k.a. insertion point);null if there's no caret within currentcomposed text
Parameters:
  visiblePosition - the position that's most importantto be visible; null if there's norecommendation for a visible position within currentcomposed text
exception:
  IllegalArgumentException - if id is notin the rangeINPUT_METHOD_FIRST..INPUT_METHOD_LAST;or if id is CARET_POSITION_CHANGED andtext is not null;or if committedCharacterCount is not in the range0..(text.getEndIndex() - text.getBeginIndex())




InputMethodEvent
public InputMethodEvent(Component source, int id, TextHitInfo caret, TextHitInfo visiblePosition)(Code)
Constructs an InputMethodEvent with the specified source component, type, caret, and visiblePosition. The text is set to null, committedCharacterCount to 0.

The offsets of caret and visiblePosition are relative to the current composed text; that is, the composed text within the text of the preceding INPUT_METHOD_TEXT_CHANGED event if the event being constructed as a CARET_POSITION_CHANGED event. For an INPUT_METHOD_TEXT_CHANGED event without text, caret and visiblePosition must be null. The time stamp for this event is initialized by invoking java.awt.EventQueue.getMostRecentEventTime .
Parameters:
  source - the object where the event originated
Parameters:
  id - the event type
Parameters:
  caret - the caret (a.k.a. insertion point);null if there's no caret within currentcomposed text
Parameters:
  visiblePosition - the position that's most importantto be visible; null if there's norecommendation for a visible position within currentcomposed text
exception:
  IllegalArgumentException - if id is notin the rangeINPUT_METHOD_FIRST..INPUT_METHOD_LAST





Method Detail
consume
public void consume()(Code)
Consumes this event so that it will not be processed in the default manner by the source which originated it.



getCaret
public TextHitInfo getCaret()(Code)
Gets the caret.

The offset of the caret is relative to the current composed text; that is, the composed text within getText() if this is an INPUT_METHOD_TEXT_CHANGED event, the composed text within getText() of the preceding INPUT_METHOD_TEXT_CHANGED event otherwise. the caret (a.k.a. insertion point).Null if there's no caret within current composed text.




getCommittedCharacterCount
public int getCommittedCharacterCount()(Code)
Gets the number of committed characters in the text.



getText
public AttributedCharacterIterator getText()(Code)
Gets the combined committed and composed text. Characters from index 0 to index getCommittedCharacterCount() - 1 are committed text, the remaining characters are composed text. the text.Always null for CARET_POSITION_CHANGED;may be null for INPUT_METHOD_TEXT_CHANGED if there's no composed or committed text.



getVisiblePosition
public TextHitInfo getVisiblePosition()(Code)
Gets the position that's most important to be visible.

The offset of the visible position is relative to the current composed text; that is, the composed text within getText() if this is an INPUT_METHOD_TEXT_CHANGED event, the composed text within getText() of the preceding INPUT_METHOD_TEXT_CHANGED event otherwise. the position that's most important to be visible.Null if there's no recommendation for a visible position within current composed text.




getWhen
public long getWhen()(Code)
Returns the time stamp of when this event occurred. this event's timestamp
since:
   1.4



isConsumed
public boolean isConsumed()(Code)
Returns whether or not this event has been consumed.
See Also:   InputMethodEvent.consume



paramString
public String paramString()(Code)
Returns a parameter string identifying this event. This method is useful for event-logging and for debugging. It contains the event ID in text form, the characters of the committed and composed text separated by "+", the number of committed characters, the caret, and the visible position. a string identifying the event and its attributes



Fields inherited from java.awt.AWTEvent
final public static long ACTION_EVENT_MASK(Code)(Java Doc)
final public static long ADJUSTMENT_EVENT_MASK(Code)(Java Doc)
final public static long COMPONENT_EVENT_MASK(Code)(Java Doc)
final public static long CONTAINER_EVENT_MASK(Code)(Java Doc)
final public static long FOCUS_EVENT_MASK(Code)(Java Doc)
final public static long INPUT_METHOD_EVENT_MASK(Code)(Java Doc)
final public static long INVOCATION_EVENT_MASK(Code)(Java Doc)
final public static long ITEM_EVENT_MASK(Code)(Java Doc)
final public static long KEY_EVENT_MASK(Code)(Java Doc)
final public static long MOUSE_EVENT_MASK(Code)(Java Doc)
final public static long MOUSE_MOTION_EVENT_MASK(Code)(Java Doc)
final public static long MOUSE_WHEEL_EVENT_MASK(Code)(Java Doc)
final public static long PAINT_EVENT_MASK(Code)(Java Doc)
final public static int RESERVED_ID_MAX(Code)(Java Doc)
final public static long TEXT_EVENT_MASK(Code)(Java Doc)
final public static long WINDOW_EVENT_MASK(Code)(Java Doc)
final public static long WINDOW_FOCUS_EVENT_MASK(Code)(Java Doc)
protected boolean consumed(Code)(Java Doc)
protected int id(Code)(Java Doc)

Methods inherited from java.awt.AWTEvent
protected void consume()(Code)(Java Doc)
public int getID()(Code)(Java Doc)
protected boolean isConsumed()(Code)(Java Doc)
public String paramString()(Code)(Java Doc)
public String toString()(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.