Back to index

im-sdk  12.3.91
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | Private Attributes
com.sun.iiim.IIIMPreeditEvent Class Reference

This class represents InputMethod's preedit event. More...

Inheritance diagram for com.sun.iiim.IIIMPreeditEvent:
Inheritance graph
[legend]
Collaboration diagram for com.sun.iiim.IIIMPreeditEvent:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 IIIMPreeditEvent (int type)
 Constructor for START/DONE event.
 IIIMPreeditEvent (int type, AttributedCharacterIterator iterator, int caret)
 Constructor for DRAW event.
 IIIMPreeditEvent (int type, String string, int caret)
 Constructor for DRAW event.
AttributedCharacterIterator getIterator ()
 Get preedit string.
String getString ()
int getCaret ()
 Get caret position.
 IIIMPreeditEvent (int type)
 Constructor for START/DONE event.
 IIIMPreeditEvent (int type, AttributedCharacterIterator iterator, int caret)
 Constructor for DRAW event.
 IIIMPreeditEvent (int type, String string, int caret)
 Constructor for DRAW event.
AttributedCharacterIterator getIterator ()
 Get preedit string.
String getString ()
int getCaret ()
 Get caret position.
int getID ()
int getID ()
int getType ()
int getType ()
AWTEvent getAWTEvent ()
AWTEvent getAWTEvent ()
void processedBy (IIIMListener listener)
void processedBy (IIIMListener listener)
boolean isProcessedBy (IIIMListener listener)
boolean isProcessedBy (IIIMListener listener)
void consume ()
void consume ()
boolean isConsumed ()
boolean isConsumed ()

Static Public Member Functions

static String iteratorToString (CharacterIterator iterator)
 convinience method
static String iteratorToString (CharacterIterator iterator)
 convinience method

Static Public Attributes

static final int START = 0
static final int DRAW = 1
static final int DONE = 2
static final int AWT = 0
static final int ACTION = 1
static final int PREEDIT = 2
static final int COMMITTED = 3
static final int LOOKUP = 4
static final int STATUS = 5
static final int AUX = 6
static final int KEY = 7

Protected Attributes

boolean consumed = false
int id = AWT
int type

Private Attributes

AttributedCharacterIterator iterator
String string
int caret

Detailed Description

This class represents InputMethod's preedit event.

Definition at line 52 of file IIIMPreeditEvent.java.


Constructor & Destructor Documentation

Constructor for START/DONE event.

Parameters:
typeIIIMPreeditEvent.START or IIIMPreeditEvent.DRAW

Definition at line 67 of file IIIMPreeditEvent.java.

                                      {
       super(PREEDIT);
       if (type != START && type != DONE) {
           throw new IllegalArgumentException();
       }
       this.type = type;
    }
com.sun.iiim.IIIMPreeditEvent.IIIMPreeditEvent ( int  type,
AttributedCharacterIterator  iterator,
int  caret 
) [inline]

Constructor for DRAW event.

Parameters:
typeIIIMPreeditEvent.DRAW
iteratorAttributedCharacterIterator which represents preedit string
caretcaret position

Definition at line 82 of file IIIMPreeditEvent.java.

                                    {
       super(PREEDIT);
       if (type != DRAW) {
           throw new IllegalArgumentException();
       }
       this.type = DRAW;
       this.iterator = iterator;
       this.caret = caret;
    }
com.sun.iiim.IIIMPreeditEvent.IIIMPreeditEvent ( int  type,
String  string,
int  caret 
) [inline]

Constructor for DRAW event.

Parameters:
typeIIIMPreeditEvent.DRAW
stringString which represents preedity string
caretcaret position

Definition at line 100 of file IIIMPreeditEvent.java.

                                                                {
       super(PREEDIT);
       if (type != DRAW) {
           throw new IllegalArgumentException();
       }
       this.type = DRAW;
       this.string = string;
       this.caret = caret;
    }

Constructor for START/DONE event.

Parameters:
typeIIIMPreeditEvent.START or IIIMPreeditEvent.DRAW

Definition at line 67 of file IIIMPreeditEvent.java.

                                      {
       super(PREEDIT);
       if (type != START && type != DONE) {
           throw new IllegalArgumentException();
       }
       this.type = type;
    }
com.sun.iiim.IIIMPreeditEvent.IIIMPreeditEvent ( int  type,
AttributedCharacterIterator  iterator,
int  caret 
) [inline]

Constructor for DRAW event.

Parameters:
typeIIIMPreeditEvent.DRAW
iteratorAttributedCharacterIterator which represents preedit string
caretcaret position

Definition at line 82 of file IIIMPreeditEvent.java.

                                    {
       super(PREEDIT);
       if (type != DRAW) {
           throw new IllegalArgumentException();
       }
       this.type = DRAW;
       this.iterator = iterator;
       this.caret = caret;
    }
com.sun.iiim.IIIMPreeditEvent.IIIMPreeditEvent ( int  type,
String  string,
int  caret 
) [inline]

Constructor for DRAW event.

Parameters:
typeIIIMPreeditEvent.DRAW
stringString which represents preedity string
caretcaret position

Definition at line 100 of file IIIMPreeditEvent.java.

                                                                {
       super(PREEDIT);
       if (type != DRAW) {
           throw new IllegalArgumentException();
       }
       this.type = DRAW;
       this.string = string;
       this.caret = caret;
    }

Member Function Documentation

void com.sun.iiim.IIIMEvent.consume ( ) [inline, inherited]

Definition at line 109 of file IIIMEvent.java.

                          {
       consumed = true;
       if (awtEvent != null && awtEvent instanceof InputEvent) {
           ((InputEvent)awtEvent).consume();
       }
    } 

Here is the caller graph for this function:

void com.sun.iiim.IIIMEvent.consume ( ) [inline, inherited]

Definition at line 109 of file IIIMEvent.java.

                          {
       consumed = true;
       if (awtEvent != null && awtEvent instanceof InputEvent) {
           ((InputEvent)awtEvent).consume();
       }
    } 
AWTEvent com.sun.iiim.IIIMEvent.getAWTEvent ( ) [inline, inherited]

Definition at line 97 of file IIIMEvent.java.

                                  {
       return awtEvent;
    }

Here is the caller graph for this function:

AWTEvent com.sun.iiim.IIIMEvent.getAWTEvent ( ) [inline, inherited]

Definition at line 97 of file IIIMEvent.java.

                                  {
       return awtEvent;
    }

Get caret position.

Returns:
caret position

Definition at line 138 of file IIIMPreeditEvent.java.

                          {
       return caret;
    }

Get caret position.

Returns:
caret position

Definition at line 138 of file IIIMPreeditEvent.java.

                          {
       return caret;
    }
int com.sun.iiim.IIIMEvent.getID ( ) [inline, inherited]

Definition at line 57 of file IIIMEvent.java.

                       {
       return id;
    }
int com.sun.iiim.IIIMEvent.getID ( ) [inline, inherited]

Definition at line 57 of file IIIMEvent.java.

                       {
       return id;
    }
AttributedCharacterIterator com.sun.iiim.IIIMPreeditEvent.getIterator ( ) [inline]

Get preedit string.

Returns:
preedit string AttributedCharacterIterator

Definition at line 115 of file IIIMPreeditEvent.java.

                                                     {
       if (iterator == null) {
           iterator = new AttributedString(string).getIterator();
       }
       return iterator;
    }
AttributedCharacterIterator com.sun.iiim.IIIMPreeditEvent.getIterator ( ) [inline]

Get preedit string.

Returns:
preedit string AttributedCharacterIterator

Definition at line 115 of file IIIMPreeditEvent.java.

                                                     {
       if (iterator == null) {
           iterator = new AttributedString(string).getIterator();
       }
       return iterator;
    }
Returns:
preedit string String

Definition at line 126 of file IIIMPreeditEvent.java.

                              {
       if (string == null) {
           string = iteratorToString(iterator);
       }
       return string;
    }

Here is the call graph for this function:

Returns:
preedit string String

Definition at line 126 of file IIIMPreeditEvent.java.

                              {
       if (string == null) {
           string = iteratorToString(iterator);
       }
       return string;
    }

Here is the call graph for this function:

int com.sun.iiim.IIIMEvent.getType ( ) [inline, inherited]

Definition at line 66 of file IIIMEvent.java.

                         {
       return type;
    }
int com.sun.iiim.IIIMEvent.getType ( ) [inline, inherited]

Definition at line 66 of file IIIMEvent.java.

                         {
       return type;
    }
boolean com.sun.iiim.IIIMEvent.isConsumed ( ) [inline, inherited]

Definition at line 116 of file IIIMEvent.java.

                                {
       return consumed;
    }
boolean com.sun.iiim.IIIMEvent.isConsumed ( ) [inline, inherited]

Definition at line 116 of file IIIMEvent.java.

                                {
       return consumed;
    }
boolean com.sun.iiim.IIIMEvent.isProcessedBy ( IIIMListener  listener) [inline, inherited]

Definition at line 105 of file IIIMEvent.java.

                                                        {
       return listeners.contains(listener);
    }
boolean com.sun.iiim.IIIMEvent.isProcessedBy ( IIIMListener  listener) [inline, inherited]

Definition at line 105 of file IIIMEvent.java.

                                                        {
       return listeners.contains(listener);
    }
static String com.sun.iiim.IIIMEvent.iteratorToString ( CharacterIterator  iterator) [inline, static, inherited]

convinience method

Definition at line 123 of file IIIMEvent.java.

                                                                      {
       StringBuffer sb = new StringBuffer();
       for (char c = iterator.first(); c != CharacterIterator.DONE;
            c = iterator.next()) {
           sb.append(c);
       }
       return sb.toString();
    }
static String com.sun.iiim.IIIMEvent.iteratorToString ( CharacterIterator  iterator) [inline, static, inherited]

convinience method

Definition at line 123 of file IIIMEvent.java.

                                                                      {
       StringBuffer sb = new StringBuffer();
       for (char c = iterator.first(); c != CharacterIterator.DONE;
            c = iterator.next()) {
           sb.append(c);
       }
       return sb.toString();
    }

Here is the caller graph for this function:

void com.sun.iiim.IIIMEvent.processedBy ( IIIMListener  listener) [inline, inherited]

Definition at line 101 of file IIIMEvent.java.

                                                   {
       listeners.add(listener);
    }
void com.sun.iiim.IIIMEvent.processedBy ( IIIMListener  listener) [inline, inherited]

Definition at line 101 of file IIIMEvent.java.

                                                   {
       listeners.add(listener);
    }

Member Data Documentation

static final int com.sun.iiim.IIIMEvent.ACTION = 1 [static, inherited]

Definition at line 75 of file IIIMEvent.java.

static final int com.sun.iiim.IIIMEvent.AUX = 6 [static, inherited]

Definition at line 80 of file IIIMEvent.java.

static final int com.sun.iiim.IIIMEvent.AWT = 0 [static, inherited]

Definition at line 74 of file IIIMEvent.java.

Definition at line 56 of file IIIMPreeditEvent.java.

static final int com.sun.iiim.IIIMEvent.COMMITTED = 3 [static, inherited]

Definition at line 77 of file IIIMEvent.java.

boolean com.sun.iiim.IIIMEvent.consumed = false [protected, inherited]

Definition at line 53 of file IIIMEvent.java.

static final int com.sun.iiim.IIIMPreeditEvent.DONE = 2 [static]

Definition at line 60 of file IIIMPreeditEvent.java.

static final int com.sun.iiim.IIIMPreeditEvent.DRAW = 1 [static]

Definition at line 59 of file IIIMPreeditEvent.java.

int com.sun.iiim.IIIMEvent.id = AWT [protected, inherited]

Definition at line 55 of file IIIMEvent.java.

AttributedCharacterIterator com.sun.iiim.IIIMPreeditEvent.iterator [private]

Definition at line 54 of file IIIMPreeditEvent.java.

static final int com.sun.iiim.IIIMEvent.KEY = 7 [static, inherited]

Definition at line 81 of file IIIMEvent.java.

static final int com.sun.iiim.IIIMEvent.LOOKUP = 4 [static, inherited]

Definition at line 78 of file IIIMEvent.java.

static final int com.sun.iiim.IIIMEvent.PREEDIT = 2 [static, inherited]

Definition at line 76 of file IIIMEvent.java.

static final int com.sun.iiim.IIIMPreeditEvent.START = 0 [static]

Definition at line 58 of file IIIMPreeditEvent.java.

static final int com.sun.iiim.IIIMEvent.STATUS = 5 [static, inherited]

Definition at line 79 of file IIIMEvent.java.

Definition at line 55 of file IIIMPreeditEvent.java.

int com.sun.iiim.IIIMEvent.type [protected, inherited]

Definition at line 64 of file IIIMEvent.java.


The documentation for this class was generated from the following files: