Back to index

im-sdk  12.3.91
Public Member Functions | Static Public Member Functions | Static Public Attributes | Package Functions | Static Package Functions | Package Attributes | Static Package Attributes | Private Member Functions | Private Attributes | Static Private Attributes
sun.awt.im.iiimp.ProtocolDriver Class Reference
Inheritance diagram for sun.awt.im.iiimp.ProtocolDriver:
Inheritance graph
[legend]
Collaboration diagram for sun.awt.im.iiimp.ProtocolDriver:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void dispatchEvent (IIIMEvent e)
void activate ()
void deactivate (boolean isTemporary)
void removeNotify ()
void endComposition ()
void dispose ()
void actionPerformed (IIIMActionEvent e)
String getName ()
String[] getEngineScript ()
IIIMEvent[] getTriggerEvent ()
IIIMEvent[] getTriggerOffEvent ()
void setTriggerEvent ()
void setTriggerOffEvent ()
Locale[] getSupportLocales ()
void dispatchEvent (IIIMEvent e)
void activate ()
void deactivate (boolean isTemporary)
void removeNotify ()
void endComposition ()
void dispose ()
void actionPerformed (IIIMActionEvent e)
String getName ()
String[] getEngineScript ()
IIIMEvent[] getTriggerEvent ()
IIIMEvent[] getTriggerOffEvent ()
void setTriggerEvent ()
void setTriggerOffEvent ()
Locale[] getSupportLocales ()

Static Public Member Functions

static void main (String[] args)
static void main (String[] args)

Static Public Attributes

static final int VERSION = 1
static final int FOURBYTES_PACKET = 0
static final int EIGHTBYTES_PACKET = 1
static final int IM_NO_PROTOCOL = 0
static final int IM_CONNECT = 1
static final int IM_CONNECT_REPLY = 2
static final int IM_DISCONNECT = 3
static final int IM_DISCONNECT_REPLY = 4
static final int IM_REGISTER_TRIGGER_KEYS = 5
static final int IM_TRIGGER_NOTIFY = 6
static final int IM_TRIGGER_NOTIFY_REPLY = 7
static final int IM_SETIMVALUES = 8
static final int IM_SETIMVALUES_REPLY = 9
static final int IM_GETIMVALUES = 10
static final int IM_GETIMVALUES_REPLY = 11
static final int IM_FORWARD_EVENT = 12
static final int IM_FORWARD_EVENT_REPLY = 13
static final int IM_COMMIT_STRING = 14
static final int IM_FORWARD_EVENT_WITH_OPERATIONS = 15
static final int IM_FORWARD_EVENT_WITH_OPERATIONS_REPLY = 16
static final int IM_CREATEIC = 20
static final int IM_CREATEIC_REPLY = 21
static final int IM_DESTROYIC = 22
static final int IM_DESTROYIC_REPLY = 23
static final int IM_SETICVALUES = 24
static final int IM_SETICVALUES_REPLY = 25
static final int IM_GETICVALUES = 26
static final int IM_GETICVALUES_REPLY = 27
static final int IM_SETICFOCUS = 28
static final int IM_SETICFOCUS_REPLY = 29
static final int IM_UNSETICFOCUS = 30
static final int IM_UNSETICFOCUS_REPLY = 31
static final int IM_RESETIC = 32
static final int IM_RESETIC_REPLY = 33
static final int IM_PREEDIT_START = 40
static final int IM_PREEDIT_START_REPLY = 41
static final int IM_PREEDIT_DRAW = 42
static final int IM_PREEDIT_DRAW_REPLY = 43
static final int IM_PREEDIT_DONE = 46
static final int IM_PREEDIT_DONE_REPLY = 47
static final int IM_STATUS_START = 50
static final int IM_STATUS_START_REPLY = 51
static final int IM_STATUS_DRAW = 52
static final int IM_STATUS_DRAW_REPLY = 53
static final int IM_STATUS_DONE = 54
static final int IM_STATUS_DONE_REPLY = 55
static final int IM_LOOKUP_CHOICE_START = 70
static final int IM_LOOKUP_CHOICE_START_REPLY = 71
static final int IM_LOOKUP_CHOICE_DRAW = 72
static final int IM_LOOKUP_CHOICE_DRAW_REPLY = 73
static final int IM_LOOKUP_CHOICE_DONE = 74
static final int IM_LOOKUP_CHOICE_DONE_REPLY = 75
static final int IM_LOOKUP_CHOICE_PROCESS = 76
static final int IM_LOOKUP_CHOICE_PROCESS_REPLY = 77
static final int IM_AUX_START = 90
static final int IM_AUX_START_REPLY = 91
static final int IM_AUX_DRAW = 92
static final int IM_AUX_DRAW_REPLY = 93
static final int IM_AUX_DONE = 94
static final int IM_AUX_DONE_REPLY = 95
static final int IM_AUX_SETVALUES = 96
static final int IM_AUX_SETVALUES_REPLY = 97
static final int BIGENDIAN = 0x42
static final int LITTLEENDIAN = 0x6c
static final int LOOKUP_MAX_NUMBER = 1
static final int LOOKUP_STYLE = 2
static final int QUERY_LOOKUP_STYLE = 3
static final int INPUT_LANGUAGE = 4
static final int PRIMARY_LANGUAGE = 5
static final int STRING = 0
static final int TEXT = 1
static final int KEYEVENT = 2
static final int INPUTMETHOD_LIST = 0x1001
static final int OBJECT_DESCRIPTER_LIST = 0x1010
static final int CLIENT_DESCRIPTER = 0x1011
static final int CCDEF = 0x1030
static final int GUI_OBJECT = 0x1031
static final int LWE_OBJECT = 0x1032
static final int IC_INPUT_LANGUAGE = 1
static final int IC_CHARACTER_SUBSETS = 2
static final int IC_INPUT_METHOD = 3
static final int NOID = -1
static final int GUI_CATEGORY = 0
static final int LWE_CATEGORY = 1
static final int SYNTAX_RULE_CATEGORY = 2
static final int MANAGE_RULE_CATEGORY = 3
static final int DECORATION_FEEDBACK = 0
static final int FOREGROUND_RGB_FEEDBACK = 1
static final int BACKGROUND_RGB_FEEDBACK = 2
static final int UNDERLINE_RGB_FEEDBACK = 3
static final int INPUT_STRING = 0
static final int READING = 1
static final int PART_OF_SPEECH = 2
static final int CLAUSE = 3
static final int IM_OPEN_NS = 80
static final int IM_OPEN_NS_REPLY = 81

Package Functions

 ProtocolDriver ()
boolean isConnected ()
boolean connect ()
synchronized void lostConnect ()
synchronized void send (Protocol protocol) throws IOException
synchronized void regularReply (int imID, int icID, int opCode)
void getReply (int protocolID) throws IOException
void getReply (int proto1, int proto2) throws IOException
void driveProtocol (Protocol protocol1, Protocol protocol2) throws IOException
void driveProtocol (Protocol protocol) throws IOException
synchronized void connectIM () throws IOException
boolean connectIMImpl (URL url)
synchronized void openIM () throws IOException
void closeIM (int imID) throws IOException
void createIC (int imID, Locale locale) throws IOException
void destroyIC (int imID, int icID) throws IOException
void setFocus (int imID, int icID, boolean mode) throws IOException
void resetIC (int imID, int icID) throws IOException
void notifyTrigger (int imID, int icID, boolean mode) throws IOException
void sendAuxData (IIIMAuxEvent ev) throws IOException
void sendAuxData (int imID, int icID, int index, String name, int[] idata, String[] sdata) throws IOException
void setClientType ()
 This will receive object donwloading candidate before get IM_SETVALUES_REPLY.
void downloadObject ()
 Download object.
void processKeyEvent (int imID, int icID, KeyEvent e) throws IOException
void forwardEventWithOperation (int imID, int icID, String action, String content) throws IOException
void debug (String string)
 ProtocolDriver ()
boolean isConnected ()
boolean connect ()
synchronized void lostConnect ()
synchronized void send (Protocol protocol) throws IOException
synchronized void regularReply (int imID, int icID, int opCode)
void getReply (int protocolID) throws IOException
void getReply (int proto1, int proto2) throws IOException
void driveProtocol (Protocol protocol) throws IOException
synchronized void connectIM () throws IOException
boolean connectIMImpl (URL url)
synchronized void openIM () throws IOException
void closeIM (int imID) throws IOException
void createIC (int imID, Locale locale) throws IOException
void destroyIC (int imID, int icID) throws IOException
void setFocus (int imID, int icID, boolean mode) throws IOException
void resetIC (int imID, int icID) throws IOException
void notifyTrigger (int imID, int icID, boolean mode) throws IOException
void sendAuxData (IIIMAuxEvent ev) throws IOException
void sendAuxData (int imID, int icID, int index, String name, int[] idata, String[] sdata) throws IOException
void setClientType ()
 This will receive object donwloading candidate before get IM_SETVALUES_REPLY.
void downloadObject ()
 Download object.
void processKeyEvent (int imID, int icID, KeyEvent e) throws IOException
void forwardEventWithOperation (int imID, int icID, String action, String content) throws IOException
void debug (String string)

Static Package Functions

static ProtocolDriver getInstance ()
static ProtocolData getCreateICData (int imID) throws IOException
 [static initializer]
static Locale toLocale (String str)
static String toLocaleString (Locale locale)
static ProtocolDriver getInstance ()
static ProtocolData getCreateICData (int imID) throws IOException
 [static initializer]
static Locale toLocale (String str)
static String toLocaleString (Locale locale)

Package Attributes

int nestLevel = 0
boolean catchedInNest = false
boolean outSideNestExit = false
Vector nestVector = new Vector()
int catchedProtocolInNest = IM_NO_PROTOCOL

Static Package Attributes

static byte[] aa

Private Member Functions

String getHostName ()
String getPasswd ()
String createPasswdFile (File f)
byte[] genPasswd ()
void done ()
String getHostName ()
String getPasswd ()
String createPasswdFile (File f)
byte[] genPasswd ()
void done ()

Private Attributes

IMServer imServer = null
InputContext inputContext = null
boolean connected = false
String userName = null
URL url = null
IIIMPURLConnection uc
IIIMPInputStream in
IIIMPOutputStream out
ODClassLoader odLoader = null
int auxIMID = 0
int auxICID = 0
HashMap auxMap
HashSet doSet
HashSet classNameSet
boolean download = true
HashSet aliveIC
int ccdefID = NOID
int manageRuleID = NOID
Locale prevLocale = null

Static Private Attributes

static ProtocolDriver pd = null
static final String CHMOD_CMD = "/usr/bin/chmod"
static final String IIIMP_PGK_PREFIX = "sun.awt.im"
static final String JAVA_PROTOCOL_HANDLER_PKGS = "java.protocol.handler.pkgs"

Detailed Description

Definition at line 59 of file ProtocolDriver.java.


Constructor & Destructor Documentation

Definition at line 107 of file ProtocolDriver.java.

                     {
        imServer = new IMServer();
       doSet = new HashSet();
       classNameSet = new HashSet();
       aliveIC = new HashSet();
       if (System.getSecurityManager() == null) {
           download = false;
       }
       String dl = Manager.getProperty("iiimf.object.download");
       if (dl != null && dl.equals("true")) {
           download = true;
       }
       if (download) {
           odLoader = new ODClassLoader();
           Manager.setLoader(odLoader);
       }
       Manager.setPD(this);
       auxMap = new HashMap();
       
        // First try to connect with iiim server
        try {
            connectIM();
        } catch(IOException e) {
           if (Manager.DEBUG) {
              e.printStackTrace();
           }
        }
        pd = this;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 108 of file ProtocolDriver.java.

                     {
        imServer = new IMServer();
       doSet = new HashSet();
       classNameSet = new HashSet();
       aliveIC = new HashSet();
       if (System.getSecurityManager() == null) {
           download = false;
       }
       String dl = Manager.getProperty("iiimf.object.download");
       if (dl != null && dl.equals("true")) {
           download = true;
       }
       if (download) {
           odLoader = new ODClassLoader();
           Manager.setLoader(odLoader);
       }
       Manager.setPD(this);
       auxMap = new HashMap();
       
        // First try to connect with iiim server
        try {
            connectIM();
        } catch(IOException e) {
           if (Manager.DEBUG) {
              e.printStackTrace();
           }
        }
        pd = this;
    }

Here is the call graph for this function:


Member Function Documentation

sun.awt.im.iiimp.ProtocolDriver.[static initializer] ( ) [inline, static, package]
sun.awt.im.iiimp.ProtocolDriver.[static initializer] ( ) [inline, static, package]
void sun.awt.im.iiimp.ProtocolDriver.actionPerformed ( IIIMActionEvent  e) [inline]

Definition at line 1587 of file ProtocolDriver.java.

                                                   {
       if (e.getType() == IIIMActionEvent.FORWARD_STRING) {
           String[] args = (String[])e.getArg();
           if (args.length != 2) {
              return;
           }

           String action = args[0];
           String content = args[1];

           try {
              inputContext.deliverStringEvent(action, content);
           } catch(Exception ex) {
              if (Manager.DEBUG) {
                  ex.printStackTrace();
              }
           }
       }
    }

Here is the call graph for this function:

void sun.awt.im.iiimp.ProtocolDriver.actionPerformed ( IIIMActionEvent  e) [inline]

Definition at line 1597 of file ProtocolDriver.java.

                                                   {
       if (e.getType() == IIIMActionEvent.FORWARD_STRING) {
           String[] args = (String[])e.getArg();
           if (args.length != 2) {
              return;
           }

           String action = args[0];
           String content = args[1];

           try {
              inputContext.deliverStringEvent(action, content);
           } catch(Exception ex) {
              if (Manager.DEBUG) {
                  ex.printStackTrace();
              }
           }
       }
    }

Here is the call graph for this function:

Definition at line 1522 of file ProtocolDriver.java.

                           {
        debug("Enter activate");
        try {
            if(connected == false) connectIM();
            if(connected == false) return;
            
            java.awt.im.InputContext tmp = getInputContext();

            if(tmp == null) return;
            
            int icID = imServer.getInputContextID(tmp);
            if( icID == -1) {
                inputContext = new InputContext(tmp, this);
                imServer.addInputContextHandler(inputContext);
              Manager manager = Manager.getInstance();
                inputContext.create(imServer, manager.getCurrentLocale());
              inputContext.setPreeditListener(manager.getIIIMPreeditListener());
              inputContext.setCommittedListener(manager.getIIIMCommittedListener());
            }
            else inputContext = imServer.getInputContext(icID);
            
            if(inputContext != null)
                inputContext.activate();
        } catch(IOException e) {
           if (Manager.DEBUG) {
              e.printStackTrace();
           }
        }
        
    }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1522 of file ProtocolDriver.java.

                           {
        debug("Enter activate");
        try {
            if(connected == false) connectIM();
            if(connected == false) return;
            
            java.awt.im.InputContext tmp = getInputContext();

            if(tmp == null) return;
            
            int icID = imServer.getInputContextID(tmp);
            Manager manager = Manager.getInstance();

            if(icID == -1) {
                inputContext = new InputContext(tmp, this);
                imServer.addInputContextHandler(inputContext);
                prevLocale = manager.getCurrentLocale();
                inputContext.create(imServer, manager.getCurrentLocale());
              inputContext.setPreeditListener(manager.getIIIMPreeditListener());
              inputContext.setCommittedListener(manager.getIIIMCommittedListener());
            } else {
               if (prevLocale.equals(manager.getCurrentLocale())){
                 debug("prevLocale and CurrentLocale are the same");
               } else {
                 prevLocale = manager.getCurrentLocale();
                 inputContext.create(imServer, manager.getCurrentLocale());
                inputContext.setPreeditListener(manager.getIIIMPreeditListener());
                inputContext.setCommittedListener(manager.getIIIMCommittedListener());
               }
            }
            if (inputContext != null) {
              inputContext.activate();
            }
        } catch(IOException e) {
           if (Manager.DEBUG) {
              e.printStackTrace();
           }
        }
        
    }

Here is the call graph for this function:

void sun.awt.im.iiimp.ProtocolDriver.closeIM ( int  imID) throws IOException [inline, package]

Definition at line 1186 of file ProtocolDriver.java.

                                              {
       if (connected == false) {
           return;
       }
       
       ProtocolData data = new ProtocolData();
       data.write2(imID); // input method id
       data.write2(0); //padding
       
       Protocol protocol = new Protocol(IM_DISCONNECT, data);
       
       send(protocol);
       
       getReply(IM_DISCONNECT_REPLY);
    }                         

Here is the call graph for this function:

void sun.awt.im.iiimp.ProtocolDriver.closeIM ( int  imID) throws IOException [inline, package]

Definition at line 1187 of file ProtocolDriver.java.

                                              {
       if (connected == false) {
           return;
       }
       
       ProtocolData data = new ProtocolData();
       data.write2(imID); // input method id
       data.write2(0); //padding
       
       Protocol protocol = new Protocol(IM_DISCONNECT, data);
       
       send(protocol);
       
       getReply(IM_DISCONNECT_REPLY);
    }                         

Here is the call graph for this function:

boolean sun.awt.im.iiimp.ProtocolDriver.connect ( ) [inline, package]

Definition at line 141 of file ProtocolDriver.java.

                      {
        try {
            uc = (IIIMPURLConnection) url.openConnection();
            
            if(uc.isConnected() == false) {
              try {
                  AccessController.doPrivileged
                     (new PrivilegedExceptionAction() {
                         public Object run() throws IOException {
                            uc.connect();
                            return null;
                         }
                     });
              } catch (PrivilegedActionException pe) {
                  throw (IOException)pe.getException();
              }

                if(uc.isConnected() == false) {
                    throw new IOException();
                }
            }
            in = new IIIMPInputStream(this, uc.getInputStream());
            out = new IIIMPOutputStream(uc.getOutputStream());
       } catch(IOException e) {
           if (Manager.DEBUG) {
              e.printStackTrace();
           }
            return false;
        }
        return true;
    }

Here is the call graph for this function:

boolean sun.awt.im.iiimp.ProtocolDriver.connect ( ) [inline, package]

Definition at line 142 of file ProtocolDriver.java.

                      {
        try {
            uc = (IIIMPURLConnection) url.openConnection();
            
            if(uc.isConnected() == false) {
              try {
                  AccessController.doPrivileged
                     (new PrivilegedExceptionAction() {
                         public Object run() throws IOException {
                            uc.connect();
                            return null;
                         }
                     });
              } catch (PrivilegedActionException pe) {
                  throw (IOException)pe.getException();
              }

                if(uc.isConnected() == false) {
                    throw new IOException();
                }
            }
            in = new IIIMPInputStream(this, uc.getInputStream());
            out = new IIIMPOutputStream(uc.getOutputStream());
       } catch(IOException e) {
           if (Manager.DEBUG) {
              e.printStackTrace();
           }
            return false;
        }
        return true;
    }

Here is the call graph for this function:

synchronized void sun.awt.im.iiimp.ProtocolDriver.connectIM ( ) throws IOException [inline, package]

Definition at line 1110 of file ProtocolDriver.java.

                                                     {
       // for reconnection...
       if (url != null) {
           connected = connectIMImpl(url);
       }

       String urlAddr = Manager.getProperty("iiimp.server");
       if (urlAddr == null) {
           throw new IOException("No IIIMP server specified");
       }
       URL tmp = new URL(urlAddr);
        url = tmp;
       connected = connectIMImpl(tmp);
       
       if (download) {
           // Object Downloading setup
           setClientType();
           download = false;

           // Object Downloading
           downloadObject();
           download = false;
       }
    }

Here is the call graph for this function:

Here is the caller graph for this function:

synchronized void sun.awt.im.iiimp.ProtocolDriver.connectIM ( ) throws IOException [inline, package]

Definition at line 1111 of file ProtocolDriver.java.

                                                     {
       // for reconnection...
       if (url != null) {
           connected = connectIMImpl(url);
       }

       String urlAddr = Manager.getProperty("iiimp.server");
       if (urlAddr == null) {
              urlAddr = "iiimp://localhost:9010";
       }
       URL tmp = new URL(urlAddr);
        url = tmp;
       connected = connectIMImpl(tmp);
       
       if (download) {
           // Object Downloading setup
           setClientType();
           download = false;

           // Object Downloading
           downloadObject();
           download = false;
       }
    }

Here is the call graph for this function:

boolean sun.awt.im.iiimp.ProtocolDriver.connectIMImpl ( URL  url) [inline, package]

Definition at line 1135 of file ProtocolDriver.java.

                                   {
       try {
           uc = (IIIMPURLConnection) url.openConnection();

           if (uc.isConnected() == false) {
              uc.connect();
              
              if (uc.isConnected() == false) {
                  throw new IOException();
              }
           }
           
           in = new IIIMPInputStream(this, uc.getInputStream());
           out = new IIIMPOutputStream(uc.getOutputStream());
           openIM();
           return true;
       } catch (IOException e) {
           debug("IOException = " + e);
           return false;
       }
    }

Here is the call graph for this function:

Here is the caller graph for this function:

boolean sun.awt.im.iiimp.ProtocolDriver.connectIMImpl ( URL  url) [inline, package]

Definition at line 1136 of file ProtocolDriver.java.

                                   {
       try {
           uc = (IIIMPURLConnection) url.openConnection();

           if (uc.isConnected() == false) {
              uc.connect();
              
              if (uc.isConnected() == false) {
                  throw new IOException();
              }
           }
           
           in = new IIIMPInputStream(this, uc.getInputStream());
           out = new IIIMPOutputStream(uc.getOutputStream());
           openIM();
           return true;
       } catch (IOException e) {
           debug("IOException = " + e);
           return false;
       }
    }

Here is the call graph for this function:

void sun.awt.im.iiimp.ProtocolDriver.createIC ( int  imID,
Locale  locale 
) throws IOException [inline, package]

Definition at line 1202 of file ProtocolDriver.java.

                                                              {
       if (connected == false) {
           return ;
       }

       // send IM_SETIMVALUES

       ProtocolData data = new ProtocolData();
        data.write2(imID);
        IIIMPICValues val = new IIIMPICValues(locale);
        byte[] buf = val.getListOfICAttr();
        
        data.write2(buf.length);
        data.writeBytes(buf);    
        data.write2(0);
        
        send(new Protocol(IM_CREATEIC, data));
        
        getReply(IM_CREATEIC_REPLY);
    }

Here is the call graph for this function:

Here is the caller graph for this function:

void sun.awt.im.iiimp.ProtocolDriver.createIC ( int  imID,
Locale  locale 
) throws IOException [inline, package]

Definition at line 1203 of file ProtocolDriver.java.

                                                              {
       if (connected == false) {
           return ;
       }

       // send IM_SETIMVALUES

       ProtocolData data = new ProtocolData();
        data.write2(imID);
        IIIMPICValues val = new IIIMPICValues(locale);
        byte[] buf = val.getListOfICAttr();
        
        data.write2(buf.length);
        data.writeBytes(buf);    
        data.write2(0);
        
        send(new Protocol(IM_CREATEIC, data));
        
        getReply(IM_CREATEIC_REPLY);
    }

Here is the call graph for this function:

String sun.awt.im.iiimp.ProtocolDriver.createPasswdFile ( File  f) [inline, private]

Definition at line 1453 of file ProtocolDriver.java.

                                            {
       try {
           // generate random string and passwd file
           File fdir = f.getParentFile();
           fdir.mkdirs();
            DataOutputStream dos =
              new DataOutputStream(new FileOutputStream(f.getPath()));
           byte[] ba = genPasswd();
           dos.write(ba, 0, 32);
           dos.flush();
           dos.close();
           // protect file so that only owner of passwd file can read
           // (Solaris only solution)
           String osName = System.getProperty("os.name");
           if (osName.startsWith("SunOS")) {
             Runtime rt = Runtime.getRuntime();
             // $HOME/.iiim/auth
             rt.exec(CHMOD_CMD + " 700 " + fdir.getPath());
             // $HOME/.iiim/auth/passwd
             rt.exec(CHMOD_CMD + " 600 " + f.getPath());
           }
           return new String(ba);
       } catch(Exception e) {      
           return null;
       }  
    }

Here is the call graph for this function:

Here is the caller graph for this function:

String sun.awt.im.iiimp.ProtocolDriver.createPasswdFile ( File  f) [inline, private]

Definition at line 1454 of file ProtocolDriver.java.

                                            {
       try {
           // generate random string and passwd file
           File fdir = f.getParentFile();
           fdir.mkdirs();
            DataOutputStream dos =
              new DataOutputStream(new FileOutputStream(f.getPath()));
           byte[] ba = genPasswd();
           dos.write(ba, 0, 32);
           dos.flush();
           dos.close();
           // protect file so that only owner of passwd file can read
           // (Solaris only solution)
           String osName = System.getProperty("os.name");
           if (osName.startsWith("SunOS")) {
             Runtime rt = Runtime.getRuntime();
             // $HOME/.iiim/auth
             rt.exec(CHMOD_CMD + " 700 " + fdir.getPath());
             // $HOME/.iiim/auth/passwd
             rt.exec(CHMOD_CMD + " 600 " + f.getPath());
           }
           return new String(ba);
       } catch(Exception e) {      
           return null;
       }  
    }

Here is the call graph for this function:

void sun.awt.im.iiimp.ProtocolDriver.deactivate ( boolean  isTemporary) [inline]

Definition at line 1553 of file ProtocolDriver.java.

                                                {
        debug("Enter deactivate");
        
        if(inputContext != null)
            inputContext.deactivate();
    }

Here is the call graph for this function:

void sun.awt.im.iiimp.ProtocolDriver.deactivate ( boolean  isTemporary) [inline]

Definition at line 1563 of file ProtocolDriver.java.

                                                {
        debug("Enter deactivate");
        
        if(inputContext != null)
            inputContext.deactivate();
    }

Here is the call graph for this function:

void sun.awt.im.iiimp.ProtocolDriver.debug ( String  string) [inline, package]

Definition at line 1673 of file ProtocolDriver.java.

                              {
        if (Manager.DEBUG) {
           System.err.println(string);
       }
    }

Here is the caller graph for this function:

void sun.awt.im.iiimp.ProtocolDriver.debug ( String  string) [inline, package]

Definition at line 1683 of file ProtocolDriver.java.

                              {
        if (Manager.DEBUG) {
           System.err.println(string);
       }
    }
void sun.awt.im.iiimp.ProtocolDriver.destroyIC ( int  imID,
int  icID 
) throws IOException [inline, package]

Definition at line 1236 of file ProtocolDriver.java.

                                                          {
       if (connected == false) {
           return;
       }

       Object[] intArray = aliveIC.toArray();
       for (int i = 0; i < intArray.length; i++) {
           if (icID == ((Integer)intArray[i]).intValue()) {
              ProtocolData data = new ProtocolData();
              data.write2(imID);
              data.write2(icID);
        
              send(new Protocol(IM_DESTROYIC, data));
              getReply(IM_DESTROYIC_REPLY);

              aliveIC.remove(intArray[i]);
              break;
           }
       }
    }

Here is the call graph for this function:

Here is the caller graph for this function:

void sun.awt.im.iiimp.ProtocolDriver.destroyIC ( int  imID,
int  icID 
) throws IOException [inline, package]

Definition at line 1237 of file ProtocolDriver.java.

                                                          {
       if (connected == false) {
           return;
       }

       Object[] intArray = aliveIC.toArray();
       for (int i = 0; i < intArray.length; i++) {
           if (icID == ((Integer)intArray[i]).intValue()) {
              ProtocolData data = new ProtocolData();
              data.write2(imID);
              data.write2(icID);
        
              send(new Protocol(IM_DESTROYIC, data));
              getReply(IM_DESTROYIC_REPLY);

              aliveIC.remove(intArray[i]);
              break;
           }
       }
    }

Here is the call graph for this function:

void sun.awt.im.iiimp.ProtocolDriver.dispatchEvent ( IIIMEvent  e) [inline]

Definition at line 197 of file ProtocolDriver.java.

                                           {
        AWTEvent event = e.getAWTEvent();

        if(event instanceof KeyEvent && inputContext != null) {
            inputContext.dispatchKeyEvent((KeyEvent)event);      
       }
    }

Here is the call graph for this function:

void sun.awt.im.iiimp.ProtocolDriver.dispatchEvent ( IIIMEvent  e) [inline]

Definition at line 198 of file ProtocolDriver.java.

                                           {
        AWTEvent event = e.getAWTEvent();

        if(event instanceof KeyEvent && inputContext != null) {
            inputContext.dispatchKeyEvent((KeyEvent)event);      
       }
    }

Here is the call graph for this function:

Definition at line 1573 of file ProtocolDriver.java.

                          {
        debug("Enter dispose");
        if(inputContext != null) 
            inputContext.dispose();
        done();
    }

Here is the call graph for this function:

Definition at line 1583 of file ProtocolDriver.java.

                          {
        debug("Enter dispose");
        if(inputContext != null) 
            inputContext.dispose();
        done();
    }

Here is the call graph for this function:

void sun.awt.im.iiimp.ProtocolDriver.done ( ) [inline, private]

Definition at line 1580 of file ProtocolDriver.java.

                        {
        dispatchPreeditEvent(new IIIMPreeditEvent(IIIMPreeditEvent.DONE));
        dispatchCommittedEvent(new IIIMCommittedEvent(""));
        dispatchStatusEvent(new IIIMStatusEvent(IIIMStatusEvent.DONE));
        dispatchLookupEvent(new IIIMLookupEvent(IIIMLookupEvent.DONE));
    }

Here is the caller graph for this function:

void sun.awt.im.iiimp.ProtocolDriver.done ( ) [inline, private]

Definition at line 1590 of file ProtocolDriver.java.

                        {
        dispatchPreeditEvent(new IIIMPreeditEvent(IIIMPreeditEvent.DONE));
        dispatchCommittedEvent(new IIIMCommittedEvent(""));
        dispatchStatusEvent(new IIIMStatusEvent(IIIMStatusEvent.DONE));
        dispatchLookupEvent(new IIIMLookupEvent(IIIMLookupEvent.DONE));
    }

Download object.

Definition at line 1371 of file ProtocolDriver.java.

                          {
       if (doSet.size() == 0) {
           return;
       }
       try {
           ProtocolData data = new ProtocolData();
           int imID = imServer.getID();
           data.write2(imID);
           data.write2(0); // pad
           data.write4(doSet.size() * 2);

           Iterator it = doSet.iterator();
           while (it.hasNext()) { 
              IIIMPObjectDescripter desc =
                  (IIIMPObjectDescripter)it.next();
              data.write2(desc.getDAttribID());
              debug(desc.toString());
           }
              
           data.pad();
           send(new Protocol(IM_GETIMVALUES, data));
           getReply(IM_GETIMVALUES_REPLY);
       } catch(Exception e) {
           if (Manager.DEBUG) {
              e.printStackTrace();
           }
       }
    }

Here is the call graph for this function:

Here is the caller graph for this function:

Download object.

Definition at line 1372 of file ProtocolDriver.java.

                          {
       if (doSet.size() == 0) {
           return;
       }
       try {
           ProtocolData data = new ProtocolData();
           int imID = imServer.getID();
           data.write2(imID);
           data.write2(0); // pad
           data.write4(doSet.size() * 2);

           Iterator it = doSet.iterator();
           while (it.hasNext()) { 
              IIIMPObjectDescripter desc =
                  (IIIMPObjectDescripter)it.next();
              data.write2(desc.getDAttribID());
              debug(desc.toString());
           }
              
           data.pad();
           send(new Protocol(IM_GETIMVALUES, data));
           getReply(IM_GETIMVALUES_REPLY);
       } catch(Exception e) {
           if (Manager.DEBUG) {
              e.printStackTrace();
           }
       }
    }

Here is the call graph for this function:

void sun.awt.im.iiimp.ProtocolDriver.driveProtocol ( Protocol  protocol1,
Protocol  protocol2 
) throws IOException [inline, package]

Definition at line 294 of file ProtocolDriver.java.

                                                                                   {
        int op1 = protocol1.getOpCode();
        int op2 = protocol2.getOpCode();
        int imServerID = 0;

        ProtocolData data1 = protocol1.getData();
        ProtocolData data2 = protocol2.getData();
        
        if(op1 == IM_REGISTER_TRIGGER_KEYS && op2 == IM_CONNECT_REPLY) {
           IIIMPIMValues ret = new IIIMPIMValues();

            data1.read2(); // skip the input method id
            data1.skipBytes(2);
           int num_on_keys = (data1.read4() / 16); // on keys
           
           if (num_on_keys > 0) {
                ret.onKey = new IIIMPKey[num_on_keys];
                for (int i = 0; i < num_on_keys; i++) {
                    int keycode = data1.read4();
                    char keychar = (char) data1.read4();
                    int modifier = data1.read4();
                    int timestamp = data1.read4();
                    ret.onKey[i] =
                        new IIIMPKey(keycode, keychar, modifier);
                }
            }

            int num_off_keys = (data1.read4() / 16); // off keys
            if (num_off_keys > 0) {
                ret.offKey = new IIIMPKey[num_off_keys];
                for (int i = 0; i < num_off_keys; i++) {
                    int keycode = data1.read4();
                    char keychar = (char) data1.read4();
                    int modifier = data1.read4();
                    int timestamp = data1.read4();
                    ret.offKey[i] = new IIIMPKey(keycode, keychar,modifier);
                }
           }

            ret.dynamic_event_flow = true;     

            ret.id = data2.read2(); // input method id
            String[] localeNameList = null;
            try {
                StringData d = new StringData((ProtocolData) data2);
                localeNameList = d.toStringArray();
            } catch (Exception e) {
              if (Manager.DEBUG) {
                  e.printStackTrace();
              }
            }

            if (localeNameList != null) {
                int max = localeNameList.length;
                ret.localeList = new Locale[max];
                for (int i = 0; i < max; i++) {
                   ret.localeList[i] =
                   toLocale(localeNameList[i]);
               }
           }

            imServer.setData(ret);
        }
    }

Here is the call graph for this function:

Here is the caller graph for this function:

void sun.awt.im.iiimp.ProtocolDriver.driveProtocol ( Protocol  protocol) throws IOException [inline, package]

Definition at line 294 of file ProtocolDriver.java.

                                                             {
        int opCode = protocol.getOpCode();
        ProtocolData data = protocol.getData();
        
        ProtocolData replyData = new ProtocolData();
        Protocol reply;        
        int imServerID = data.read2();
        int inputContextID = 0;

        AttributedCharacterIterator iterator = null;                
        FeedbackText text = null;
        int type;
        
        switch(opCode) {
         case IM_PREEDIT_START:
           debug("IM_PREEDIT_START");
             
           inputContextID = data.read2();
           replyData.write2(imServerID);
           replyData.write2(inputContextID);
           replyData.write4(1024);
                
           dispatchPreeditEvent(new IIIMPreeditEvent(IIIMPreeditEvent.START));
           reply = new Protocol(opCode, replyData);
            send(new Protocol(IM_PREEDIT_START_REPLY, replyData));
           break;
         case IM_PREEDIT_DRAW:
           {
              debug("IM_PREEDIT_DRAW");
              
              inputContextID = data.read2();
              int caret_position = data.read4();
              int first_changed = data.read4();
              int length_changed = data.read4();
              type = data.read4();
                
              InputContext temp = imServer.getInputContext(inputContextID);
              Manager manager = Manager.getInstance();
              manager.setIIIMPreeditListener(temp.getPreeditListener());
              if (type == STRING) {
                  //iterator =
                  //    (new AttributedString(data.readString())).getIterator();                
              } else if (type == TEXT) {
                  text = FeedbackText.toFeedbackText(data);
              }
                
              if(text == null) {
                  for (int i = (first_changed + length_changed - 1);
                      i >= first_changed; i--) {
                     temp.removeContentAt(i);
                  }
              } else {
                  // composedText replace
                  if (length_changed > 0) {
                     for (int i = (first_changed + length_changed - 1);
                          i >= first_changed; i--) {
                         temp.removeContentAt(i);
                     }
                  }
                  int len = text.count;
                  for (int i = first_changed, j = 0;
                      i < (first_changed+len); i++, j++) {
                     FeedbackChar c = text.value[j];
                     temp.insertContentAt(c, i);
                  }
              }
              
              iterator = temp.getAttributedString().getIterator();
              
              // IIIMPreeditEvent don't include change first, change length
              // and FeedbackType information   
              IIIMPreeditEvent event =
                  new IIIMPreeditEvent(IIIMPreeditEvent.DRAW,
                                    iterator, caret_position);
              dispatchPreeditEvent(event);
              regularReply(imServerID, inputContextID, IM_PREEDIT_DRAW_REPLY);
              break;
           }
         case IM_PREEDIT_DONE:
           debug("IM_PREEDIT_DONE");
            
           // Send event to remove preeditlistener
           inputContextID = data.read2();
           // For event isn't synchronized, but it have no effect
           dispatchPreeditEvent(new IIIMPreeditEvent(IIIMPreeditEvent.DONE));
           regularReply(imServerID, inputContextID, IM_PREEDIT_DONE_REPLY);
           break;

         case IM_STATUS_START:
           debug("IM_STATUS_START");
            
           inputContextID = data.read2();
           
           dispatchStatusEvent(new IIIMStatusEvent(IIIMStatusEvent.START));
           regularReply(imServerID, inputContextID, IM_STATUS_START_REPLY);
           break;

         // Hack to avoid IIIMServer waiting for IM_OPEN_NS_REPLY
         // TODO !! Need to add Hotkey and Namespace POSIX I/O 
         // Support for Java Clients using IIIM 

         case IM_OPEN_NS:
           debug("IM_OPEN_NS");

           data.skipBytes(2);
           int flags = data.read4();
           int ns_id = data.read4();
           String fname = data.readString();

           replyData.write2(imServerID);
           replyData.write2(0);
           replyData.write4(-1);
           replyData.write4(2);
           send(new Protocol(IM_OPEN_NS_REPLY, replyData));
           break;

         case IM_STATUS_DRAW:
           debug("IM_STATUS_DRAW");
            
           inputContextID = data.read2();
           type = data.read4();
                
           IIIMStatusEvent statusEvent = null;
           if(type == STRING) {
              iterator =
                  (new AttributedString(data.readString())).getIterator();
           } else if(type == TEXT) {
              text = FeedbackText.toFeedbackText(data);

              iterator = FeedbackText.toACIterator(text);
           }
           statusEvent = 
              new IIIMStatusEvent(IIIMStatusEvent.DRAW, iterator);                
           dispatchStatusEvent(statusEvent);
           
           regularReply(imServerID, inputContextID, IM_STATUS_DRAW_REPLY);
           break;

         case IM_STATUS_DONE:
           debug("IM_STATUS_DONE");
            
           inputContextID = data.read2();
           dispatchStatusEvent(new IIIMStatusEvent(IIIMStatusEvent.DONE));
           
           regularReply(imServerID, inputContextID, IM_STATUS_DONE_REPLY);
           break;

         case IM_FORWARD_EVENT:
           {
              debug("IM_FORWARD_EVENT");

              inputContextID = data.read2();
              type = data.read4();
              switch(type) {
                case STRING:
                  break;
                case TEXT:
                  break;
                case KEYEVENT:
                  int len = data.read4();
                  imServer.getInputContext(inputContextID).setForward();
                  if(len > 0) {
                     byte[] buf = new byte[len];
                     data.read(buf, 0, len);
                     KeyData kd = new KeyData(buf, len);
                     IIIMPKey[] kev = kd.toKey();
                     break;                        
                  }
                  break;
              }
              regularReply(imServerID, inputContextID, IM_FORWARD_EVENT_REPLY);
              break;
           }

         case IM_FORWARD_EVENT_REPLY:
           debug("IM_FORWARD_EVENT_REPLY");
            
           inputContextID = data.read2();
           break;

         case IM_FORWARD_EVENT_WITH_OPERATIONS:
         case IM_FORWARD_EVENT_WITH_OPERATIONS_REPLY:
           debug("IM_FORWARD_EVENT_WITH_OPERATIONS_REPLY");

           // unprocessed operation list processing will be done later

           break;

         case IM_COMMIT_STRING:
           debug("IM_COMMIT_STRING");
            
           inputContextID = data.read2();
           type = data.read4();
           IIIMCommittedEvent commitedEvent = null;

           {
              InputContext temp = imServer.getInputContext(inputContextID);
              Manager manager = Manager.getInstance();
              manager.setIIIMCommittedListener(temp.getCommittedListener());
           }

           if(type == STRING) {
              String committed = data.readString();
              commitedEvent = new IIIMCommittedEvent(committed);
           } else if(type == TEXT) {
              text = FeedbackText.toFeedbackText(data);
              commitedEvent = new IIIMCommittedEvent(text.toString());                
           }
           dispatchCommittedEvent(commitedEvent);
           // No reply protocol
           break;           

         case IM_LOOKUP_CHOICE_START:
           {
              debug("IM_LOOKUP_CHOICE_START");
            
              inputContextID = data.read2();
           
              type = data.read2();
                
              int size = data.read2();
              int rows = data.read2();
              int columns = data.read2();
                
              int dir = data.read2();
              int labeled = data.read2();
                
              IIIMLookupEvent event =
                  new IIIMLookupEvent(IIIMLookupEvent.START,
                                   type, size,
                                   new Dimension(rows, columns),
                                   dir, labeled);
              dispatchLookupEvent(event);
              regularReply(imServerID, inputContextID,
                          IM_LOOKUP_CHOICE_START_REPLY);   
              break;             
           }
         case IM_LOOKUP_CHOICE_DRAW:
           {
              debug("IM_LOOKUP_CHOICE_DRAW");
            
              inputContextID = data.read2();
              int ret_first_index = data.read4();
              int ret_last_index = data.read4();
              int ret_current_index = data.read4();

              // List of candidates
              FeedbackText[] candidates = null;
              int len = data.read4();

              byte[] buf;

              if (len > 0) {
                  buf = new byte[len];
                  data.read(buf, 0, len);
                  candidates = FeedbackText.
                     toListOfFeedbackText(new ProtocolData(buf, len));
              }

              // List of labels
              FeedbackText[] labels = null;
              len = data.read4();
                if (len > 0) {
                    buf =new byte[len];
                    data.read(buf, 0, len);
                    labels = FeedbackText.
                        toListOfFeedbackText(new ProtocolData(buf, len));
                }
                FeedbackText title =
                  FeedbackText.toFeedbackText(data);


              IIIMLookupEvent lookupEvent = null;
              if (Manager.COLOR_SUPPORT) {
                  AttributedCharacterIterator[] can =
                     new AttributedCharacterIterator[candidates.length];
                  for (int i = 0; i < can.length; i++) {
                     can[i] = FeedbackText.toACIterator(candidates[i]);
                  }

                  AttributedCharacterIterator[] lab =
                     new AttributedCharacterIterator[labels.length];
                  if (labels != null) {
                     for (int i = 0; i < lab.length; i++) {
                         lab[i] = FeedbackText.toACIterator(labels[i]);
                     }
                  } else {
                     for (int i = 0; i < lab.length; i++) {
                         lab[i] = new AttributedString("").getIterator();
                     }
                  }
                  AttributedCharacterIterator titleIterator =
                     title == null ?
                     new AttributedString("Lookup Window").getIterator() :
                  FeedbackText.toACIterator(title);

                  lookupEvent = new IIIMLookupEvent(IIIMLookupEvent.DRAW,
                                                ret_first_index,
                                                ret_last_index,
                                                ret_current_index,
                                                can, lab, titleIterator);
              } else {
                  String[] can = new String[candidates.length];
                  for (int i = 0; i < can.length; i++) {
                     can[i] = candidates[i].toString();
                  }

                  String[] lab = new String[labels.length];
                  if (labels != null) {
                     for (int i = 0; i < lab.length; i++) {
                         lab[i] = labels[i].toString();                
                     }
                  } else {
                     // In this case, user must select candidate
                     // with mouse click.
                     for (int i = 0; i < candidates.length; i++) {
                         lab[i] = " ";
                     }
                  }
                  String titleString =
                     title == null ? "Lookup Window" : title.toString();

                  lookupEvent = new IIIMLookupEvent(IIIMLookupEvent.DRAW,
                                                ret_first_index,
                                                ret_last_index,
                                                ret_current_index,
                                                can, lab, titleString);
              }

              dispatchLookupEvent(lookupEvent);
                regularReply(imServerID, inputContextID,
                          IM_LOOKUP_CHOICE_DRAW_REPLY);
                break;
            }
         case IM_LOOKUP_CHOICE_PROCESS:
            {
                debug("IM_LOOKUP_CHOICE_PROCESS");
            
                inputContextID = data.read2();
                
                type = data.read2();
                
                int val = data.read2();
                
                if(type == 0) {
                    // INDEX type, val is selected index
                } else if(type ==  1) {
                    // PAGE type, val is page index
                }
                IIIMLookupEvent event = new IIIMLookupEvent(
                                        IIIMLookupEvent.PROCESS,
                                        type, val
                                        );
              dispatchLookupEvent(event);
                regularReply(imServerID, inputContextID,
                          IM_LOOKUP_CHOICE_PROCESS_REPLY);
                break;
            }
         case IM_LOOKUP_CHOICE_DONE:
            {
                debug("IM_LOOKUP_CHOICE_DONE");
            
                inputContextID = data.read2();
              dispatchLookupEvent(new IIIMLookupEvent(IIIMLookupEvent.DONE));
                regularReply(imServerID, inputContextID,
                          IM_LOOKUP_CHOICE_DONE_REPLY);
                break;
            }

         case IM_AUX_START:
            {
                debug("IM_AUX_START");
                inputContextID = data.read2();
                auxIMID = imServerID;
              auxICID = inputContextID;

                int index = data.read4();
                String name = data.readString();

              if (odLoader == null) {
                  replyData.write2(imServerID);
                  replyData.write2(inputContextID);
                  replyData.write4(index);
                  replyData.writeString(name);
                  send(new Protocol(IM_AUX_START_REPLY, replyData));
                break;
              }

              try {
                  IIIMAuxListener aux =
                     (IIIMAuxListener)odLoader.loadClass(name).newInstance();
                  auxMap.put(name, aux);
                  aux.auxStart(new IIIMAuxEvent(IIIMAuxEvent.START,
                                            index, name));
              } catch(Exception e) {
                  if (Manager.DEBUG) {
                     e.printStackTrace();
                  }
              }

                replyData.write2(imServerID);
                replyData.write2(inputContextID);
                replyData.write4(index);
                replyData.writeString(name);
                send(new Protocol(IM_AUX_START_REPLY, replyData));
                break;
            }
         case IM_AUX_DRAW:
            {
                debug("IM_AUX_DRAW");
            
                inputContextID = data.read2();
                StringData data1 = new StringData(data);
                int index = data1.read4();
                String name = data1.readString();
                int len = data1.read4() / 4;
                int[] idata = new int[len];
                for(int i = 0; i < len; i++) {
                    idata[i] = data1.read4();
                }
                
                String[] sdata = data1.toStringArray2();

              IIIMAuxListener aux = (IIIMAuxListener)auxMap.get(name);
              if (aux == null) {
                debug(" Unknown aux : " + name);
                  replyData.write2(imServerID);
                  replyData.write2(inputContextID);
                  replyData.write4(index);
                  replyData.writeString(name);
                  send(new Protocol(IM_AUX_DRAW_REPLY, replyData));                
                break;
              }
              aux.auxDraw(new IIIMAuxEvent(IIIMAuxEvent.DRAW, index,
                                        name, idata, sdata));
                replyData.write2(imServerID);
                replyData.write2(inputContextID);
                replyData.write4(index);
                replyData.writeString(name);
                send(new Protocol(IM_AUX_DRAW_REPLY, replyData));                
                break;
            }   
         case IM_AUX_DONE:
            {
                debug("IM_AUX_DONE");
            
                inputContextID = data.read2();
                
                int index = data.read4();
                String name = data.readString();

              IIIMAuxListener aux = (IIIMAuxListener)auxMap.get(name);
              if (aux == null) {
                  debug(" Unknown aux : " + name);
                  break;
              }

              aux.auxDone(new IIIMAuxEvent(IIIMAuxEvent.DONE, index, name));
                
                replyData.write2(imServerID);
                replyData.write2(inputContextID);
                replyData.write4(index);
                replyData.writeString(name);
                send(new Protocol(IM_AUX_DONE_REPLY, replyData));                 
                break;
            }
         case IM_CONNECT_REPLY:
           {
                debug("IM_CONNECT_REPLY");
                IIIMPIMValues ret = new IIIMPIMValues();

                String[] localeNameList = null;
               try {
                   StringData d = new StringData((ProtocolData) data);
                   localeNameList = d.toStringArray();
               } catch (Exception e) {
                  if (Manager.DEBUG) {
                     e.printStackTrace();
                  }
               }
               Locale[] localeList = null;
               if (localeNameList != null) {
                   int max = localeNameList.length;
                   localeList = new Locale[max];
                   for (int i = 0; i < max; i++) {
                      localeList[i] = toLocale(localeNameList[i]);
                   }
               }
               ret.id = imServerID;
               ret.localeList = localeList;
               
               imServer.setLocaleList(ret);              
               break;
           }
         case IM_REGISTER_TRIGGER_KEYS:
           {
               debug("IM_REGISTER_TRIGGER_KEYS");
               IIIMPIMValues ret = new IIIMPIMValues();

               data.skipBytes(2);
               int num_on_keys = (data.read4() / 16); // on keys

               if (num_on_keys > 0) {
                 ret.onKey = new IIIMPKey[num_on_keys];
                 for (int i = 0; i < num_on_keys; i++) {
                   int keycode = data.read4();
                   char keychar = (char) data.read4();
                   int modifier = data.read4();
                   int timestamp = data.read4();
                   ret.onKey[i] =
                   new IIIMPKey(keycode, keychar, modifier);
                 }
               }
  
               int num_off_keys = (data.read4() / 16); // off keys
               if (num_off_keys > 0) {
                 ret.offKey = new IIIMPKey[num_off_keys];
                 for (int i = 0; i < num_off_keys; i++) {
                   int keycode = data.read4();
                   char keychar = (char) data.read4();
                   int modifier = data.read4();
                   int timestamp = data.read4();
                   ret.offKey[i] = new IIIMPKey(keycode, keychar,modifier);
                 }
               }

               ret.id = imServerID;
               ret.dynamic_event_flow = true;     
               imServer.setTriggerKeys(ret);             
               break;
           } 
         case IM_DISCONNECT_REPLY:
           {
                debug("IM_DISCONNECT_REPLY");
           
               //Initialize imServer
               imServer = new IMServer();

               break;               
           }
         case IM_CREATEIC_REPLY:
           {
                debug("IM_CREATEIC_REPLY");
           
               inputContextID = data.read2();
              aliveIC.add(new Integer(inputContextID));
               if(inputContext != null) // It shouldn't happen
                   inputContext.setID(inputContextID);
        
               // getCurrentInputContext().setID(inputContextID);         
               break;
           }
         case IM_TRIGGER_NOTIFY:
           {
              debug("IM_TRIGGER_NOTIFY");

              inputContextID = data.read2();
              int onOff = data.read2();
              data.read2(); // padding

              InputContext ic = imServer.getInputContext(inputContextID);
              if (onOff == 1) {
                  // this method do not send IM_TRIGGER_NOTIFY
                  ic.setConversionModeOff();
              }
              regularReply(imServerID, inputContextID, IM_TRIGGER_NOTIFY_REPLY);
              break;
           }
         case IM_TRIGGER_NOTIFY_REPLY:
           {
                debug("IM_TRIGGER_NOTIFY_REPLY");
           
               inputContextID = data.read2();
               break;        
           }
         case IM_DESTROYIC_REPLY:
           {
                debug("IM_DESTROYIC_REPLY");
           
               inputContextID = data.read2();
               imServer.removeInputContextHandler(
                   imServer.getInputContext(inputContextID));
               break;
           }
         case IM_SETICVALUES_REPLY:
           {
                debug("IM_SETICVALUES_REPLY");
           
               inputContextID = data.read2();
               break;
           }
         case IM_GETICVALUES_REPLY:
           {
                debug("IM_GETICVALUES_REPLY");
           
               inputContextID = data.read2();
               int len = data.read2(); // byte length
               byte[] buf = new byte[len];
               data.read(buf, 0 , len);
               data.read2(); //pad
               
               IIIMPICValues value = new IIIMPICValues(buf);
               // getInputContext() and set ICValues
               break;
           }
         case IM_SETICFOCUS_REPLY: 
         case IM_UNSETICFOCUS_REPLY:
           {
                //debug("IM_SETICFOCUS_REPLY or IM_UNSETICFOCUS_REPLY");
           
               inputContextID = data.read2();
               break;
           }
         case IM_RESETIC_REPLY:
           {
               debug("IM_RESETIC_REPLY");
               
               inputContextID = data.read2();
               // Reset ic's context
               imServer.getInputContext(inputContextID).done();
               //done();
               break;
           }
         case IM_AUX_SETVALUES_REPLY:
           {
               debug("IM_AUX_SETVALUES_REPLY");
               inputContextID = data.read2();
               int index = data.read4();
               String name = data.readString();
               
              // dispatchAuxEvent(new IIIMAuxEvent(IIIMAuxEvent.SETVALUES, index, 
              //                            name, null, null));
               break;
           }
           
         case IM_SETIMVALUES:
           {
              data.read2(); //padding
              int length = data.read4();

              if (length > 0) {
                  byte[] buf = new byte[length];
                  data.read(buf, 0, length);

                  ProtocolData attrs = new ProtocolData(buf, length);

                  while(attrs.available() > 0) {
                     type = attrs.read2();
                     attrs.read2(); // pad
                     int size = attrs.read4();
                     ProtocolData adata =
                         new ProtocolData(attrs.buf, attrs.pos, size);
                     attrs.skipBytes(size);
                     switch(type) {
                       case INPUTMETHOD_LIST:
                         while(adata.available() > 0) {
                            String imHRN = adata.readString();
                            String imID = adata.readString();
                            debug("im = " + imHRN + ":" + imID);
                            int len = adata.read4();
                            ProtocolData ldata =
                                new ProtocolData(adata.buf, adata.pos, len);
                            adata.skipBytes(len);
                            while(ldata.available() > 0) {
                                String langHRN = ldata.readString();
                                String langID = ldata.readString();
                                debug(" im lang = " +
                                     langHRN + "/" + langID);
                            }
                         }
                         break;
                       case OBJECT_DESCRIPTER_LIST:
                         while(adata.available() > 0) {
                            int objCategory = adata.read2();
                            adata.read2(); // pad 
                            int objSize = adata.read4();
                            int attribID = adata.read2();
                            int dattribID = adata.read2();
                            if (objCategory == SYNTAX_RULE_CATEGORY) {
                                ccdefID = dattribID;
                            } else if (objCategory == MANAGE_RULE_CATEGORY) {
                                manageRuleID = dattribID;
                            }
                            String objName = adata.readString();
                            String objHRN = adata.readString();
                            String objSignature = adata.readString();
                            String objUser = adata.readString();
                            IIIMPObjectDescripter objDesc =
                                new IIIMPObjectDescripter(objCategory,
                                                       objSize,
                                                       attribID,
                                                       dattribID,
                                                       objName,
                                                       objHRN,
                                                       objSignature,
                                                       objUser);
                            doSet.add(objDesc);
                         }
                         break;
                       default:
                         debug(" unknown attribID");
                         break;
                     }
                  }
              }
              replyData.write2(imServerID);
              replyData.write2(0); // pad
              send(new Protocol(IM_SETIMVALUES_REPLY, replyData));
              break;
           }
         case IM_SETIMVALUES_REPLY:
           debug("IM_SETIMVALUES_REPLY");
           
           data.read2(); // for pad
           break;
         
         case IM_GETIMVALUES_REPLY:
           {
               debug("IM_GETIMVALUES_REPLY");
           
               data.read2(); // for pad
              data.read4(); // size , not used
               
              while(data.available() > 0) {
                  debug(" data.available() = " + data.available());
                  int attrID = data.read2();
                  debug(" attrID = " + attrID);
                  
                  data.read2(); // for pad
                  int size = data.read4();
                  debug("attrsize = " + size);

                  // CCDEF & ManageRule object downloading
                  if (attrID == ccdefID) {
                     String ccdef = data.readString();
                     Manager manager = Manager.getInstance();
                     manager.setCCDEF(ccdef);
                     continue;
                  } else if (attrID == manageRuleID) {
                     String mr = data.readString();
                     Manager manager = Manager.getInstance();
                     manager.setManageRule(new ManageRule(mr));
                     continue;
                  }

                  if (size > 0) {
                     int classNameListSize = data.read4();
                     debug(" cnls = " + classNameListSize);
                     ProtocolData classNameData =
                         new ProtocolData(data.buf, data.pos, classNameListSize);
                     data.skipBytes(classNameListSize);
                     while(classNameData.available() > 0) {
                         String className = classNameData.readString();
                         classNameSet.add(className);
                         debug(" class = " + className);
                     }
                     int jarSize = data.read4();
                     debug(" jar size = " + jarSize);
                     byte[] attrval = new byte[jarSize];
                     data.read(attrval, 0, jarSize);

                     // FileOutputStream out = new FileOutputStream("/tmp/out");
                     // out.write(attrval);
                     // out.flush();

                     if (odLoader != null) {
                         JarInputStream jis =
                            new JarInputStream(new ByteArrayInputStream(attrval));
                         odLoader.addJar(jis);
                     }

                     int pad = ProtocolData.paddings(size);
                     debug(" paddings = " + pad);
                     for (int i = 0; i < pad; i++) {
                         data.read();
                     }
                  }
              }

              if (classNameSet.size() > 0) {
                  // check Preedit/Lookup/Status override object
                  Iterator it = classNameSet.iterator();
                  try {
                     while (it.hasNext()) {
                         String name = (String)it.next();
                         debug(" name = " + name);
                         if (odLoader != null) {
                            Class cl = odLoader.findClass(name);
                            Object o = cl.newInstance();
                            Manager manager = Manager.getInstance();

                            if (o instanceof IIIMLookupListener) {
                                manager.setIIIMLookupListener
                                   ((IIIMLookupListener)o);
                            } else if (o instanceof IIIMPreeditListener) {
                                manager.setIIIMPreeditListener
                                   ((IIIMPreeditListener)o);
                            } else if (o instanceof IIIMStatusListener) {
                                manager.setIIIMStatusListener
                                   ((IIIMStatusListener)o);
                            }
                         }
                     }
                  } catch(Exception e) {
                     if (Manager.DEBUG) {
                         e.printStackTrace();
                     }
                  }
              }

                break;
           }
            default:
                break;
        }    
    }
void sun.awt.im.iiimp.ProtocolDriver.driveProtocol ( Protocol  protocol) throws IOException [inline, package]

Definition at line 359 of file ProtocolDriver.java.

                                                             {
        int opCode = protocol.getOpCode();
        ProtocolData data = protocol.getData();
        
        ProtocolData replyData = new ProtocolData();
        Protocol reply;        
        int imServerID = data.read2();
        int inputContextID = 0;

        AttributedCharacterIterator iterator = null;                
        FeedbackText text = null;
        int type;
        
        switch(opCode) {
         case IM_PREEDIT_START:
           debug("IM_PREEDIT_START");
             
           inputContextID = data.read2();
           replyData.write2(imServerID);
           replyData.write2(inputContextID);
           replyData.write4(1024);
                
           dispatchPreeditEvent(new IIIMPreeditEvent(IIIMPreeditEvent.START));
           reply = new Protocol(opCode, replyData);
           send(reply);                 
           break;
         case IM_PREEDIT_DRAW:
           {
              debug("IM_PREEDIT_DRAW");
              
              inputContextID = data.read2();
              int caret_position = data.read4();
              int first_changed = data.read4();
              int length_changed = data.read4();
              type = data.read4();
                
              InputContext temp = imServer.getInputContext(inputContextID);
              Manager manager = Manager.getInstance();
              manager.setIIIMPreeditListener(temp.getPreeditListener());
              if (type == STRING) {
                  //iterator =
                  //    (new AttributedString(data.readString())).getIterator();                
              } else if (type == TEXT) {
                  text = FeedbackText.toFeedbackText(data);
              }
                
              if(text == null) {
                  for (int i = (first_changed + length_changed - 1);
                      i >= first_changed; i--) {
                     temp.removeContentAt(i);
                  }
              } else {
                  // composedText replace
                  if (length_changed > 0) {
                     for (int i = (first_changed + length_changed - 1);
                          i >= first_changed; i--) {
                         temp.removeContentAt(i);
                     }
                  }
                  int len = text.count;
                  for (int i = first_changed, j = 0;
                      i < (first_changed+len); i++, j++) {
                     FeedbackChar c = text.value[j];
                     temp.insertContentAt(c, i);
                  }
              }
              
              iterator = temp.getAttributedString().getIterator();
              
              // IIIMPreeditEvent don't include change first, change length
              // and FeedbackType information   
              IIIMPreeditEvent event =
                  new IIIMPreeditEvent(IIIMPreeditEvent.DRAW,
                                    iterator, caret_position);
              dispatchPreeditEvent(event);
              regularReply(imServerID, inputContextID, IM_PREEDIT_DRAW_REPLY);
              break;
           }
         case IM_PREEDIT_DONE:
           debug("IM_PREEDIT_DONE");
            
           // Send event to remove preeditlistener
           inputContextID = data.read2();
           // For event isn't synchronized, but it have no effect
           dispatchPreeditEvent(new IIIMPreeditEvent(IIIMPreeditEvent.DONE));
           regularReply(imServerID, inputContextID, IM_PREEDIT_DONE_REPLY);
           break;

         case IM_STATUS_START:
           debug("IM_STATUS_START");
            
           inputContextID = data.read2();
           
           dispatchStatusEvent(new IIIMStatusEvent(IIIMStatusEvent.START));
           regularReply(imServerID, inputContextID, IM_STATUS_START_REPLY);
           break;

         case IM_STATUS_DRAW:
           debug("IM_STATUS_DRAW");
            
           inputContextID = data.read2();
           type = data.read4();
                
           IIIMStatusEvent statusEvent = null;
           if(type == STRING) {
              iterator =
                  (new AttributedString(data.readString())).getIterator();
           } else if(type == TEXT) {
              text = FeedbackText.toFeedbackText(data);

              iterator = FeedbackText.toACIterator(text);
           }
           statusEvent = 
              new IIIMStatusEvent(IIIMStatusEvent.DRAW, iterator);                
           dispatchStatusEvent(statusEvent);
           
           regularReply(imServerID, inputContextID, IM_STATUS_DRAW_REPLY);
           break;

         case IM_STATUS_DONE:
           debug("IM_STATUS_DONE");
            
           inputContextID = data.read2();
           dispatchStatusEvent(new IIIMStatusEvent(IIIMStatusEvent.DONE));
           
           regularReply(imServerID, inputContextID, IM_STATUS_DONE_REPLY);
           break;

         case IM_FORWARD_EVENT:
           {
              debug("IM_FORWARD_EVENT");

              inputContextID = data.read2();
              type = data.read4();
              switch(type) {
                case STRING:
                  break;
                case TEXT:
                  break;
                case KEYEVENT:
                  int len = data.read4();
                  imServer.getInputContext(inputContextID).setForward();
                  if(len > 0) {
                     byte[] buf = new byte[len];
                     data.read(buf, 0, len);
                     KeyData kd = new KeyData(buf, len);
                     IIIMPKey[] kev = kd.toKey();
                     break;                        
                  }
                  break;
              }
              regularReply(imServerID, inputContextID, IM_FORWARD_EVENT_REPLY);
              break;
           }

         case IM_FORWARD_EVENT_REPLY:
           debug("IM_FORWARD_EVENT_REPLY");
            
           inputContextID = data.read2();
           break;

         case IM_FORWARD_EVENT_WITH_OPERATIONS:
         case IM_FORWARD_EVENT_WITH_OPERATIONS_REPLY:
           debug("IM_FORWARD_EVENT_WITH_OPERATIONS_REPLY");

           // unprocessed operation list processing will be done later

           break;

         case IM_COMMIT_STRING:
           debug("IM_COMMIT_STRING");
            
           inputContextID = data.read2();
           type = data.read4();
           IIIMCommittedEvent commitedEvent = null;

           {
              InputContext temp = imServer.getInputContext(inputContextID);
              Manager manager = Manager.getInstance();
              manager.setIIIMCommittedListener(temp.getCommittedListener());
           }

           if(type == STRING) {
              String committed = data.readString();
              commitedEvent = new IIIMCommittedEvent(committed);
           } else if(type == TEXT) {
              text = FeedbackText.toFeedbackText(data);
              commitedEvent = new IIIMCommittedEvent(text.toString());                
           }
           dispatchCommittedEvent(commitedEvent);
           // No reply protocol
           break;           

         case IM_LOOKUP_CHOICE_START:
           {
              debug("IM_LOOKUP_CHOICE_START");
            
              inputContextID = data.read2();
           
              type = data.read2();
                
              int size = data.read2();
              int rows = data.read2();
              int columns = data.read2();
                
              int dir = data.read2();
              int labeled = data.read2();
                
              IIIMLookupEvent event =
                  new IIIMLookupEvent(IIIMLookupEvent.START,
                                   type, size,
                                   new Dimension(rows, columns),
                                   dir, labeled);
              dispatchLookupEvent(event);
              regularReply(imServerID, inputContextID,
                          IM_LOOKUP_CHOICE_START_REPLY);   
              break;             
           }
         case IM_LOOKUP_CHOICE_DRAW:
           {
              debug("IM_LOOKUP_CHOICE_DRAW");
            
              inputContextID = data.read2();
              int ret_first_index = data.read4();
              int ret_last_index = data.read4();
              int ret_current_index = data.read4();

              // List of candidates
              FeedbackText[] candidates = null;
              int len = data.read4();

              byte[] buf;

              if (len > 0) {
                  buf = new byte[len];
                  data.read(buf, 0, len);
                  candidates = FeedbackText.
                     toListOfFeedbackText(new ProtocolData(buf, len));
              }

              // List of labels
              FeedbackText[] labels = null;
              len = data.read4();
                if (len > 0) {
                    buf =new byte[len];
                    data.read(buf, 0, len);
                    labels = FeedbackText.
                        toListOfFeedbackText(new ProtocolData(buf, len));
                }
                FeedbackText title =
                  FeedbackText.toFeedbackText(data);


              IIIMLookupEvent lookupEvent = null;
              if (Manager.COLOR_SUPPORT) {
                  AttributedCharacterIterator[] can =
                     new AttributedCharacterIterator[candidates.length];
                  for (int i = 0; i < can.length; i++) {
                     can[i] = FeedbackText.toACIterator(candidates[i]);
                  }

                  AttributedCharacterIterator[] lab =
                     new AttributedCharacterIterator[labels.length];
                  if (labels != null) {
                     for (int i = 0; i < lab.length; i++) {
                         lab[i] = FeedbackText.toACIterator(labels[i]);
                     }
                  } else {
                     for (int i = 0; i < lab.length; i++) {
                         lab[i] = new AttributedString("").getIterator();
                     }
                  }
                  AttributedCharacterIterator titleIterator =
                     title == null ?
                     new AttributedString("Lookup Window").getIterator() :
                  FeedbackText.toACIterator(title);

                  lookupEvent = new IIIMLookupEvent(IIIMLookupEvent.DRAW,
                                                ret_first_index,
                                                ret_last_index,
                                                ret_current_index,
                                                can, lab, titleIterator);
              } else {
                  String[] can = new String[candidates.length];
                  for (int i = 0; i < can.length; i++) {
                     can[i] = candidates[i].toString();
                  }

                  String[] lab = new String[labels.length];
                  if (labels != null) {
                     for (int i = 0; i < lab.length; i++) {
                         lab[i] = labels[i].toString();                
                     }
                  } else {
                     // In this case, user must select candidate
                     // with mouse click.
                     for (int i = 0; i < candidates.length; i++) {
                         lab[i] = " ";
                     }
                  }
                  String titleString =
                     title == null ? "Lookup Window" : title.toString();

                  lookupEvent = new IIIMLookupEvent(IIIMLookupEvent.DRAW,
                                                ret_first_index,
                                                ret_last_index,
                                                ret_current_index,
                                                can, lab, titleString);
              }

              dispatchLookupEvent(lookupEvent);
                regularReply(imServerID, inputContextID,
                          IM_LOOKUP_CHOICE_DRAW_REPLY);
                break;
            }
         case IM_LOOKUP_CHOICE_PROCESS:
            {
                debug("IM_LOOKUP_CHOICE_PROCESS");
            
                inputContextID = data.read2();
                
                type = data.read2();
                
                int val = data.read2();
                
                if(type == 0) {
                    // INDEX type, val is selected index
                } else if(type ==  1) {
                    // PAGE type, val is page index
                }
                IIIMLookupEvent event = new IIIMLookupEvent(
                                        IIIMLookupEvent.PROCESS,
                                        type, val
                                        );
              dispatchLookupEvent(event);
                regularReply(imServerID, inputContextID,
                          IM_LOOKUP_CHOICE_PROCESS_REPLY);
                break;
            }
         case IM_LOOKUP_CHOICE_DONE:
            {
                debug("IM_LOOKUP_CHOICE_DONE");
            
                inputContextID = data.read2();
              dispatchLookupEvent(new IIIMLookupEvent(IIIMLookupEvent.DONE));
                regularReply(imServerID, inputContextID,
                          IM_LOOKUP_CHOICE_DONE_REPLY);
                break;
            }

         case IM_AUX_START:
            {
                debug("IM_AUX_START");
                inputContextID = data.read2();
                auxIMID = imServerID;
              auxICID = inputContextID;

                int index = data.read4();
                String name = data.readString();

              if (odLoader == null) {
                  break;
              }

              try {
                  IIIMAuxListener aux =
                     (IIIMAuxListener)odLoader.loadClass(name).newInstance();
                  auxMap.put(name, aux);
                  aux.auxStart(new IIIMAuxEvent(IIIMAuxEvent.START,
                                            index, name));
              } catch(Exception e) {
                  if (Manager.DEBUG) {
                     e.printStackTrace();
                  }
              }

                replyData.write2(imServerID);
                replyData.write2(inputContextID);
                replyData.write4(index);
                replyData.writeString(name);
                send(new Protocol(IM_AUX_START_REPLY, replyData));
                break;
            }
         case IM_AUX_DRAW:
            {
                debug("IM_AUX_DRAW");
            
                inputContextID = data.read2();
                StringData data1 = new StringData(data);
                int index = data1.read4();
                String name = data1.readString();
                int len = data1.read4() / 4;
                int[] idata = new int[len];
                for(int i = 0; i < len; i++) {
                    idata[i] = data1.read4();
                }
                
                String[] sdata = data1.toStringArray2();

              IIIMAuxListener aux = (IIIMAuxListener)auxMap.get(name);
              if (aux == null) {
                  debug(" Unknown aux : " + name);
                  break;
              }
              aux.auxDraw(new IIIMAuxEvent(IIIMAuxEvent.DRAW, index,
                                        name, idata, sdata));
                replyData.write2(imServerID);
                replyData.write2(inputContextID);
                replyData.write4(index);
                replyData.writeString(name);
                send(new Protocol(IM_AUX_DRAW_REPLY, replyData));                
                break;
            }   
         case IM_AUX_DONE:
            {
                debug("IM_AUX_DONE");
            
                inputContextID = data.read2();
                
                int index = data.read4();
                String name = data.readString();

              IIIMAuxListener aux = (IIIMAuxListener)auxMap.get(name);
              if (aux == null) {
                  debug(" Unknown aux : " + name);
                  break;
              }

              aux.auxDone(new IIIMAuxEvent(IIIMAuxEvent.DONE, index, name));
                
                replyData.write2(imServerID);
                replyData.write2(inputContextID);
                replyData.write4(index);
                replyData.writeString(name);
                send(new Protocol(IM_AUX_DONE_REPLY, replyData));                 
                break;
            }
         case IM_CONNECT_REPLY:
           {
                debug("IM_CONNECT_REPLY");
                IIIMPIMValues ret = new IIIMPIMValues();

                String[] localeNameList = null;
               try {
                   StringData d = new StringData((ProtocolData) data);
                   localeNameList = d.toStringArray();
               } catch (Exception e) {
                  if (Manager.DEBUG) {
                     e.printStackTrace();
                  }
               }
               Locale[] localeList = null;
               if (localeNameList != null) {
                   int max = localeNameList.length;
                   localeList = new Locale[max];
                   for (int i = 0; i < max; i++) {
                      localeList[i] = toLocale(localeNameList[i]);
                   }
               }
               ret.id = imServerID;
               ret.dynamic_event_flow = false; 
               
               imServer.setData(ret);             
               break;
           }
         case IM_DISCONNECT_REPLY:
           {
                debug("IM_DISCONNECT_REPLY");
           
               //Initialize imServer
               imServer = new IMServer();

               break;               
           }
         case IM_CREATEIC_REPLY:
           {
                debug("IM_CREATEIC_REPLY");
           
               inputContextID = data.read2();
              aliveIC.add(new Integer(inputContextID));
               if(inputContext != null) // It shouldn't happen
                   inputContext.setID(inputContextID);
        
               // getCurrentInputContext().setID(inputContextID);         
               break;
           }
         case IM_TRIGGER_NOTIFY:
           {
              debug("IM_TRIGGER_NOTIFY");

              inputContextID = data.read2();
              int onOff = data.read2();
              data.read2(); // padding

              InputContext ic = imServer.getInputContext(inputContextID);
              if (onOff == 1) {
                  // this method do not send IM_TRIGGER_NOTIFY
                  ic.setConversionModeOff();
              }
              regularReply(imServerID, inputContextID, IM_TRIGGER_NOTIFY_REPLY);
              break;
           }
         case IM_TRIGGER_NOTIFY_REPLY:
           {
                debug("IM_TRIGGER_NOTIFY_REPLY");
           
               inputContextID = data.read2();
               break;        
           }
         case IM_DESTROYIC_REPLY:
           {
                debug("IM_DESTROYIC_REPLY");
           
               inputContextID = data.read2();
               imServer.removeInputContextHandler(
                   imServer.getInputContext(inputContextID));
               break;
           }
         case IM_SETICVALUES_REPLY:
           {
                debug("IM_SETICVALUES_REPLY");
           
               inputContextID = data.read2();
               break;
           }
         case IM_GETICVALUES_REPLY:
           {
                debug("IM_GETICVALUES_REPLY");
           
               inputContextID = data.read2();
               int len = data.read2(); // byte length
               byte[] buf = new byte[len];
               data.read(buf, 0 , len);
               data.read2(); //pad
               
               IIIMPICValues value = new IIIMPICValues(buf);
               // getInputContext() and set ICValues
               break;
           }
         case IM_SETICFOCUS_REPLY: 
         case IM_UNSETICFOCUS_REPLY:
           {
                //debug("IM_SETICFOCUS_REPLY or IM_UNSETICFOCUS_REPLY");
           
               inputContextID = data.read2();
               break;
           }
         case IM_RESETIC_REPLY:
           {
               debug("IM_RESETIC_REPLY");
               
               inputContextID = data.read2();
               // Reset ic's context
               imServer.getInputContext(inputContextID).done();
               //done();
               break;
           }
         case IM_AUX_SETVALUES_REPLY:
           {
               debug("IM_AUX_SETVALUES_REPLY");
               inputContextID = data.read2();
               int index = data.read4();
               String name = data.readString();
               
              // dispatchAuxEvent(new IIIMAuxEvent(IIIMAuxEvent.SETVALUES, index, 
              //                            name, null, null));
               break;
           }
           
         case IM_SETIMVALUES:
           {
              data.read2(); //padding
              int length = data.read4();

              if (length > 0) {
                  byte[] buf = new byte[length];
                  data.read(buf, 0, length);

                  ProtocolData attrs = new ProtocolData(buf, length);

                  while(attrs.available() > 0) {
                     type = attrs.read2();
                     attrs.read2(); // pad
                     int size = attrs.read4();
                     ProtocolData adata =
                         new ProtocolData(attrs.buf, attrs.pos, size);
                     attrs.skipBytes(size);
                     switch(type) {
                       case INPUTMETHOD_LIST:
                         while(adata.available() > 0) {
                            String imHRN = adata.readString();
                            String imID = adata.readString();
                            debug("im = " + imHRN + ":" + imID);
                            int len = adata.read4();
                            ProtocolData ldata =
                                new ProtocolData(adata.buf, adata.pos, len);
                            adata.skipBytes(len);
                            while(ldata.available() > 0) {
                                String langHRN = ldata.readString();
                                String langID = ldata.readString();
                                debug(" im lang = " +
                                     langHRN + "/" + langID);
                            }
                         }
                         break;
                       case OBJECT_DESCRIPTER_LIST:
                         while(adata.available() > 0) {
                            int objCategory = adata.read2();
                            adata.read2(); // pad 
                            int objSize = adata.read4();
                            int attribID = adata.read2();
                            int dattribID = adata.read2();
                            if (objCategory == SYNTAX_RULE_CATEGORY) {
                                ccdefID = dattribID;
                            } else if (objCategory == MANAGE_RULE_CATEGORY) {
                                manageRuleID = dattribID;
                            }
                            String objName = adata.readString();
                            String objHRN = adata.readString();
                            String objSignature = adata.readString();
                            String objUser = adata.readString();
                            IIIMPObjectDescripter objDesc =
                                new IIIMPObjectDescripter(objCategory,
                                                       objSize,
                                                       attribID,
                                                       dattribID,
                                                       objName,
                                                       objHRN,
                                                       objSignature,
                                                       objUser);
                            doSet.add(objDesc);
                         }
                         break;
                       default:
                         debug(" unknown attribID");
                         break;
                     }
                  }
              }
              replyData.write2(imServerID);
              replyData.write2(0); // pad
              send(new Protocol(IM_SETIMVALUES_REPLY, replyData));
              break;
           }
         case IM_SETIMVALUES_REPLY:
           debug("IM_SETIMVALUES_REPLY");
           
           data.read2(); // for pad
           break;
         
         case IM_GETIMVALUES_REPLY:
           {
               debug("IM_GETIMVALUES_REPLY");
           
               data.read2(); // for pad
              data.read4(); // size , not used
               
              while(data.available() > 0) {
                  debug(" data.available() = " + data.available());
                  int attrID = data.read2();
                  debug(" attrID = " + attrID);
                  
                  data.read2(); // for pad
                  int size = data.read4();
                  debug("attrsize = " + size);

                  // CCDEF & ManageRule object downloading
                  if (attrID == ccdefID) {
                     String ccdef = data.readString();
                     Manager manager = Manager.getInstance();
                     manager.setCCDEF(ccdef);
                     continue;
                  } else if (attrID == manageRuleID) {
                     String mr = data.readString();
                     Manager manager = Manager.getInstance();
                     manager.setManageRule(new ManageRule(mr));
                     continue;
                  }

                  if (size > 0) {
                     int classNameListSize = data.read4();
                     debug(" cnls = " + classNameListSize);
                     ProtocolData classNameData =
                         new ProtocolData(data.buf, data.pos, classNameListSize);
                     data.skipBytes(classNameListSize);
                     while(classNameData.available() > 0) {
                         String className = classNameData.readString();
                         classNameSet.add(className);
                         debug(" class = " + className);
                     }
                     int jarSize = data.read4();
                     debug(" jar size = " + jarSize);
                     byte[] attrval = new byte[jarSize];
                     data.read(attrval, 0, jarSize);

                     // FileOutputStream out = new FileOutputStream("/tmp/out");
                     // out.write(attrval);
                     // out.flush();

                     if (odLoader != null) {
                         JarInputStream jis =
                            new JarInputStream(new ByteArrayInputStream(attrval));
                         odLoader.addJar(jis);
                     }

                     int pad = ProtocolData.paddings(size);
                     debug(" paddings = " + pad);
                     for (int i = 0; i < pad; i++) {
                         data.read();
                     }
                  }
              }

              if (classNameSet.size() > 0) {
                  // check Preedit/Lookup/Status override object
                  Iterator it = classNameSet.iterator();
                  try {
                     while (it.hasNext()) {
                         String name = (String)it.next();
                         debug(" name = " + name);
                         if (odLoader != null) {
                            Class cl = odLoader.findClass(name);
                            Object o = cl.newInstance();
                            Manager manager = Manager.getInstance();

                            if (o instanceof IIIMLookupListener) {
                                manager.setIIIMLookupListener
                                   ((IIIMLookupListener)o);
                            } else if (o instanceof IIIMPreeditListener) {
                                manager.setIIIMPreeditListener
                                   ((IIIMPreeditListener)o);
                            } else if (o instanceof IIIMStatusListener) {
                                manager.setIIIMStatusListener
                                   ((IIIMStatusListener)o);
                            }
                         }
                     }
                  } catch(Exception e) {
                     if (Manager.DEBUG) {
                         e.printStackTrace();
                     }
                  }
              }

                break;
           }
            default:
                break;
        }    
    }

Definition at line 1564 of file ProtocolDriver.java.

                                 {
        debug("Enter endComposition");
        
        synchronized(this) {
        if(inputContext != null) 
            inputContext.reset(false);
        }
    }

Here is the call graph for this function:

Definition at line 1574 of file ProtocolDriver.java.

                                 {
        debug("Enter endComposition");
        
        synchronized(this) {
        if(inputContext != null) 
            inputContext.reset(false);
        }
    }

Here is the call graph for this function:

void sun.awt.im.iiimp.ProtocolDriver.forwardEventWithOperation ( int  imID,
int  icID,
String  action,
String  content 
) throws IOException [inline, package]

Definition at line 1607 of file ProtocolDriver.java.

                          {

       ProtocolData data = new ProtocolData();
       data.write2(imID);
       data.write2(icID);
       // PD supports only "convert"/Sting type of operation now.
       data.write4(0); // STRING type
       data.writeString(content);

       ProtocolData operation = new ProtocolData();
       operation.writeString(action);
       operation.write2(0); // there is no value associated with "convert" action
       operation.pad();

       data.write4(operation.count);
       data.writeBytes(operation.buf, operation.count);

       send(new Protocol(IM_FORWARD_EVENT_WITH_OPERATIONS, data));

       getReply(IM_FORWARD_EVENT_WITH_OPERATIONS_REPLY);
    }

Here is the call graph for this function:

Here is the caller graph for this function:

void sun.awt.im.iiimp.ProtocolDriver.forwardEventWithOperation ( int  imID,
int  icID,
String  action,
String  content 
) throws IOException [inline, package]

Definition at line 1617 of file ProtocolDriver.java.

                          {

       ProtocolData data = new ProtocolData();
       data.write2(imID);
       data.write2(icID);
       // PD supports only "convert"/Sting type of operation now.
       data.write4(0); // STRING type
       data.writeString(content);

       ProtocolData operation = new ProtocolData();
       operation.writeString(action);
       operation.write2(0); // there is no value associated with "convert" action
       operation.pad();

       data.write4(operation.count);
       data.writeBytes(operation.buf, operation.count);

       send(new Protocol(IM_FORWARD_EVENT_WITH_OPERATIONS, data));

       getReply(IM_FORWARD_EVENT_WITH_OPERATIONS_REPLY);
    }

Here is the call graph for this function:

byte [] sun.awt.im.iiimp.ProtocolDriver.genPasswd ( ) [inline, private]

Definition at line 1483 of file ProtocolDriver.java.

                               {
       SecureRandom sr;
       try {
           sr = SecureRandom.getInstance("SHA1PRNG");
       } catch(NoSuchAlgorithmException e) {
           sr = new SecureRandom();
       }
    
       sr.setSeed(System.currentTimeMillis());
       
       byte[] ba = new byte[32];
       sr.nextBytes(ba);
       for (int i = 0; i < 32; i++) {
           ba[i] = aa[Math.abs(ba[i] % 62)];
       }

       return ba;
    }

Here is the caller graph for this function:

byte [] sun.awt.im.iiimp.ProtocolDriver.genPasswd ( ) [inline, private]

Definition at line 1484 of file ProtocolDriver.java.

                               {
       SecureRandom sr;
       try {
           sr = SecureRandom.getInstance("SHA1PRNG");
       } catch(NoSuchAlgorithmException e) {
           sr = new SecureRandom();
       }
    
       sr.setSeed(System.currentTimeMillis());
       
       byte[] ba = new byte[32];
       sr.nextBytes(ba);
       for (int i = 0; i < 32; i++) {
           ba[i] = aa[Math.abs(ba[i] % 62)];
       }

       return ba;
    }
static ProtocolData sun.awt.im.iiimp.ProtocolDriver.getCreateICData ( int  imID) throws IOException [inline, static, package]

Definition at line 1223 of file ProtocolDriver.java.

                                                                     {
       ProtocolData data = new ProtocolData();
       data.write2(imID);
       IIIMPICValues val = new IIIMPICValues(Locale.getDefault());
       byte[] buf = val.getListOfICAttr();

       data.write2(buf.length);
       data.writeBytes(buf);
       data.write2(0);

       return data;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

static ProtocolData sun.awt.im.iiimp.ProtocolDriver.getCreateICData ( int  imID) throws IOException [inline, static, package]

Definition at line 1224 of file ProtocolDriver.java.

                                                                     {
       ProtocolData data = new ProtocolData();
       data.write2(imID);
       IIIMPICValues val = new IIIMPICValues(Locale.getDefault());
       byte[] buf = val.getListOfICAttr();

       data.write2(buf.length);
       data.writeBytes(buf);
       data.write2(0);

       return data;
    }

Here is the call graph for this function:

Definition at line 1683 of file ProtocolDriver.java.

                                      {
       return null;
    }

Here is the caller graph for this function:

Definition at line 1693 of file ProtocolDriver.java.

                                      {
       return null;
    }
String sun.awt.im.iiimp.ProtocolDriver.getHostName ( ) [inline, private]

Definition at line 1418 of file ProtocolDriver.java.

                                 {
       try {
           java.net.InetAddress hostAddr =
              java.net.InetAddress.getLocalHost();
           return hostAddr.getHostName();
       } catch (Exception e) {}
       return null;
    }     

Here is the caller graph for this function:

String sun.awt.im.iiimp.ProtocolDriver.getHostName ( ) [inline, private]

Definition at line 1419 of file ProtocolDriver.java.

                                 {
       try {
           java.net.InetAddress hostAddr =
              java.net.InetAddress.getLocalHost();
           return hostAddr.getHostName();
       } catch (Exception e) {}
       return null;
    }     
static ProtocolDriver sun.awt.im.iiimp.ProtocolDriver.getInstance ( ) [inline, static, package]

Definition at line 91 of file ProtocolDriver.java.

                                        {
        if (pd == null) {
           pd = (ProtocolDriver)AccessController.doPrivileged(new PrivilegedAction() {
              public Object run() {
                  try {
                     return new ProtocolDriver();
                  } catch(Exception e) {
                     return null;
                  }
              }
           });
        }
        return pd;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

static ProtocolDriver sun.awt.im.iiimp.ProtocolDriver.getInstance ( ) [inline, static, package]

Definition at line 92 of file ProtocolDriver.java.

                                        {
        if (pd == null) {
           pd = (ProtocolDriver)AccessController.doPrivileged(new PrivilegedAction() {
              public Object run() {
                  try {
                     return new ProtocolDriver();
                  } catch(Exception e) {
                     return null;
                  }
              }
           });
        }
        return pd;
    }

Here is the call graph for this function:

Definition at line 1679 of file ProtocolDriver.java.

                            {
       return "IIIM ProtocolDriver";
    }

Definition at line 1689 of file ProtocolDriver.java.

                            {
       return "IIIM ProtocolDriver";
    }
String sun.awt.im.iiimp.ProtocolDriver.getPasswd ( ) [inline, private]

Definition at line 1427 of file ProtocolDriver.java.

                               {
       return (String)AccessController.doPrivileged(new PrivilegedAction() {
           public Object run() {
              String userHome = System.getProperty("user.home");
              File f = new File(userHome + File.separator + ".iiim" +
                               File.separator + "auth" + File.separator +
                               "passwd");
              try {
                  if (f != null && f.canRead()) {
                      byte[] ba = new byte[32];
                     DataInputStream in =
                       new DataInputStream(new FileInputStream(f.getPath()));
                     in.readFully(ba);
                     in.close();
                     return new String(ba);
                  }
                  return createPasswdFile(f);
              } catch(Exception e) {
                  return createPasswdFile(f);
              }
           }
       });
    }

Here is the call graph for this function:

Here is the caller graph for this function:

String sun.awt.im.iiimp.ProtocolDriver.getPasswd ( ) [inline, private]

Definition at line 1428 of file ProtocolDriver.java.

                               {
       return (String)AccessController.doPrivileged(new PrivilegedAction() {
           public Object run() {
              String userHome = System.getProperty("user.home");
              File f = new File(userHome + File.separator + ".iiim" +
                               File.separator + "auth" + File.separator +
                               "passwd");
              try {
                  if (f != null && f.canRead()) {
                      byte[] ba = new byte[32];
                     DataInputStream in =
                       new DataInputStream(new FileInputStream(f.getPath()));
                     in.readFully(ba);
                     in.close();
                     return new String(ba);
                  }
                  return createPasswdFile(f);
              } catch(Exception e) {
                  return createPasswdFile(f);
              }
           }
       });
    }

Here is the call graph for this function:

void sun.awt.im.iiimp.ProtocolDriver.getReply ( int  protocolID) throws IOException [inline, package]

Definition at line 229 of file ProtocolDriver.java.

                                                     {
        getReply(0, protocolID);
    }

Here is the caller graph for this function:

void sun.awt.im.iiimp.ProtocolDriver.getReply ( int  protocolID) throws IOException [inline, package]

Definition at line 230 of file ProtocolDriver.java.

                                                     {
        getReply(0, protocolID);
    }

Here is the call graph for this function:

void sun.awt.im.iiimp.ProtocolDriver.getReply ( int  proto1,
int  proto2 
) throws IOException [inline, package]

Definition at line 239 of file ProtocolDriver.java.

                                                             {

       nestLevel++;
       Integer processProto = new Integer(proto2);
       nestVector.add(processProto);
        while(true) {
           if (outSideNestExit) {
              if (catchedProtocolInNest == proto2) {
                  catchedInNest = false;
                  outSideNestExit = false;
                  break;
              }
           }

            Protocol protocol1 = new Protocol();
            protocol1.read(in);

            // If it matches one of the expected reply protocol, return
            if((protocol1.getOpCode() == proto1) ) {
                Protocol protocol2 = new Protocol();
                protocol2.read(in);
            
                if(protocol2.getOpCode() != proto2) {
                    // Received an unexpected protocol
                    lostConnect();
                    throw new IIIMProtocolException("Unexpected protocol received: "
                        + protocol1 + " against: " + proto1);            
                }
                driveProtocol(protocol1, protocol2); 
                break;
            }
            else if((protocol1.getOpCode() == proto2)) {
                driveProtocol(protocol1);
                break;
            } else {
                //debug("Addtional protocol = " + protocol1.getOpCode());
                driveProtocol(protocol1);
              if (nestLevel > 1) {
                  int p = protocol1.getOpCode();
                  for (int i = 0; i < nestLevel - 1; i++) { 
                     if (p == ((Integer)nestVector.get(i)).intValue()) {
                         catchedProtocolInNest = p; 
                         catchedInNest = true;
                     }
                  }
              }
            }
       }
       if (catchedInNest) {
           outSideNestExit = true;
       }
       nestLevel--;
       nestVector.remove(processProto);
    }

Here is the call graph for this function:

void sun.awt.im.iiimp.ProtocolDriver.getReply ( int  proto1,
int  proto2 
) throws IOException [inline, package]

Definition at line 240 of file ProtocolDriver.java.

                                                             {

       nestLevel++;
       Integer processProto = new Integer(proto2);
       nestVector.add(processProto);
        while(true) {
           if (outSideNestExit) {
              if (catchedProtocolInNest == proto2) {
                  catchedInNest = false;
                  outSideNestExit = false;
                  break;
              }
           }

            Protocol protocol1 = new Protocol();
            protocol1.read(in);

            // If it matches one of the expected reply protocol, return
            if((protocol1.getOpCode() == proto1) ) {
                Protocol protocol2 = new Protocol();
                protocol2.read(in);
            
                if(protocol2.getOpCode() != proto2) {
                    // Received an unexpected protocol
                    lostConnect();
                    throw new IIIMProtocolException("Unexpected protocol received: "
                        + protocol1 + " against: " + proto1);            
                }
                break;
            }
            else if((protocol1.getOpCode() == proto2)) {
                driveProtocol(protocol1);
                break;
            } else {
                //debug("Addtional protocol = " + protocol1.getOpCode());
                driveProtocol(protocol1);
              if (nestLevel > 1) {
                  int p = protocol1.getOpCode();
                  for (int i = 0; i < nestLevel - 1; i++) { 
                     if (p == ((Integer)nestVector.get(i)).intValue()) {
                         catchedProtocolInNest = p; 
                         catchedInNest = true;
                     }
                  }
              }
            }
       }
       if (catchedInNest) {
           outSideNestExit = true;
       }
       nestLevel--;
       nestVector.remove(processProto);
    }

Here is the call graph for this function:

Definition at line 1703 of file ProtocolDriver.java.

Here is the call graph for this function:

Definition at line 1713 of file ProtocolDriver.java.

Here is the call graph for this function:

Definition at line 1687 of file ProtocolDriver.java.

                                         {
       return null;
    }

Definition at line 1697 of file ProtocolDriver.java.

                                         {
       return null;
    }

Definition at line 1691 of file ProtocolDriver.java.

                                            {
       return null;
    }

Definition at line 1701 of file ProtocolDriver.java.

                                            {
       return null;
    }
boolean sun.awt.im.iiimp.ProtocolDriver.isConnected ( ) [inline, package]

Definition at line 137 of file ProtocolDriver.java.

                          {
       return connected;
    }
boolean sun.awt.im.iiimp.ProtocolDriver.isConnected ( ) [inline, package]

Definition at line 138 of file ProtocolDriver.java.

                          {
       return connected;
    }
synchronized void sun.awt.im.iiimp.ProtocolDriver.lostConnect ( ) [inline, package]

Definition at line 174 of file ProtocolDriver.java.

                                    {
        if (connected == false) {
            return;
        }
       try {
            uc.disconnect();
        } catch(IOException e) {
            connected = false;
        }
        connected = false;
        done();
        uc = null;
        in = null;
        out = null;
        inputContext = null;
        imServer = new IMServer();
    } 

Here is the call graph for this function:

Here is the caller graph for this function:

synchronized void sun.awt.im.iiimp.ProtocolDriver.lostConnect ( ) [inline, package]

Definition at line 175 of file ProtocolDriver.java.

                                    {
        if (connected == false) {
            return;
        }
       try {
            uc.disconnect();
        } catch(IOException e) {
            connected = false;
        }
        connected = false;
        done();
        uc = null;
        in = null;
        out = null;
        inputContext = null;
        imServer = new IMServer();
    } 

Here is the call graph for this function:

static void sun.awt.im.iiimp.ProtocolDriver.main ( String[]  args) [inline, static]

Definition at line 1630 of file ProtocolDriver.java.

                                           {
        try {
            ProtocolDriver pd = new ProtocolDriver();
            pd.connectIM();
        } catch(IOException e) {
           if (Manager.DEBUG) {
              e.printStackTrace();
           }
        }

    }

Here is the call graph for this function:

static void sun.awt.im.iiimp.ProtocolDriver.main ( String[]  args) [inline, static]

Definition at line 1640 of file ProtocolDriver.java.

                                           {
        try {
            ProtocolDriver pd = new ProtocolDriver();
            pd.connectIM();
        } catch(IOException e) {
           if (Manager.DEBUG) {
              e.printStackTrace();
           }
        }

    }

Here is the call graph for this function:

void sun.awt.im.iiimp.ProtocolDriver.notifyTrigger ( int  imID,
int  icID,
boolean  mode 
) throws IOException [inline, package]

Definition at line 1284 of file ProtocolDriver.java.

                                                                            {
        if(connected == false) {
            return;
        }
        
        ProtocolData ps = new ProtocolData();
        ps.write2(imID);
        ps.write2(icID);
        ps.write2( (mode == true) ? 0 : 1);
        
        send(new Protocol(IM_TRIGGER_NOTIFY, ps));
        getReply(IM_TRIGGER_NOTIFY_REPLY);
    }

Here is the call graph for this function:

Here is the caller graph for this function:

void sun.awt.im.iiimp.ProtocolDriver.notifyTrigger ( int  imID,
int  icID,
boolean  mode 
) throws IOException [inline, package]

Definition at line 1285 of file ProtocolDriver.java.

                                                                            {
        if(connected == false) {
            return;
        }
        
        ProtocolData ps = new ProtocolData();
        ps.write2(imID);
        ps.write2(icID);
        ps.write2( (mode == true) ? 0 : 1);
        
        send(new Protocol(IM_TRIGGER_NOTIFY, ps));
        getReply(IM_TRIGGER_NOTIFY_REPLY);
    }

Here is the call graph for this function:

synchronized void sun.awt.im.iiimp.ProtocolDriver.openIM ( ) throws IOException [inline, package]

Definition at line 1157 of file ProtocolDriver.java.

                                                  {
       if (userName == null) {
           userName = System.getProperty("user.name", null);
           String hostName = getHostName();
           if (hostName != null) {
              userName += "@" + hostName;
           }
           String passwd = getPasswd();
           if (passwd != null) {
             userName += "#" + passwd;
           }
       }
       if (userName == null) {
           throw new IOException();
       } 
       
       // creates protocol for IM_CONNECT
       ProtocolData data = new ProtocolData();
       data.write(BIGENDIAN); // endian
       data.write(VERSION); //protocol version
       data.writeString(userName); // user name and host name
       data.write2(0);  //client auth protocol names

       Protocol protocol = new Protocol(IM_CONNECT, data);
       send(protocol);
       
       getReply(IM_REGISTER_TRIGGER_KEYS, IM_CONNECT_REPLY);
    }

Here is the call graph for this function:

Here is the caller graph for this function:

synchronized void sun.awt.im.iiimp.ProtocolDriver.openIM ( ) throws IOException [inline, package]

Definition at line 1158 of file ProtocolDriver.java.

                                                  {
       if (userName == null) {
           userName = System.getProperty("user.name", null);
           String hostName = getHostName();
           if (hostName != null) {
              userName += "@" + hostName;
           }
           String passwd = getPasswd();
           if (passwd != null) {
               userName += "#" + passwd;
           }
       }
       if (userName == null) {
           throw new IOException();
       } 
       
       // creates protocol for IM_CONNECT
       ProtocolData data = new ProtocolData();
       data.write(BIGENDIAN); // endian
       data.write(VERSION); //protocol version
       data.writeString(userName); // user name and host name
       data.write2(0);  //client auth protocol names

       Protocol protocol = new Protocol(IM_CONNECT, data);
       send(protocol);
       
       getReply(IM_CONNECT_REPLY);
    }

Here is the call graph for this function:

void sun.awt.im.iiimp.ProtocolDriver.processKeyEvent ( int  imID,
int  icID,
KeyEvent  e 
) throws IOException [inline, package]

Definition at line 1400 of file ProtocolDriver.java.

                                                                            {
       if (connected == false) {
           return;
       }

        ProtocolData data = new ProtocolData();
        data.write2(imID);
        data.write2(icID);
        data.write4(2); // keyevent type is 2
        
        KeyData kd = new KeyData(e);
        data.writeBytes(kd.toByteStream());

        send(new Protocol(IM_FORWARD_EVENT, data));
        
        getReply(IM_FORWARD_EVENT_REPLY);
    }

Here is the call graph for this function:

Here is the caller graph for this function:

void sun.awt.im.iiimp.ProtocolDriver.processKeyEvent ( int  imID,
int  icID,
KeyEvent  e 
) throws IOException [inline, package]

Definition at line 1401 of file ProtocolDriver.java.

                                                                            {
       if (connected == false) {
           return;
       }

        ProtocolData data = new ProtocolData();
        data.write2(imID);
        data.write2(icID);
        data.write4(2); // keyevent type is 2
        
        KeyData kd = new KeyData(e);
        data.writeBytes(kd.toByteStream());

        send(new Protocol(IM_FORWARD_EVENT, data));
        
        getReply(IM_FORWARD_EVENT_REPLY);
    }

Here is the call graph for this function:

synchronized void sun.awt.im.iiimp.ProtocolDriver.regularReply ( int  imID,
int  icID,
int  opCode 
) [inline, package]

Definition at line 205 of file ProtocolDriver.java.

                                                                   {
        ProtocolData data;
        Protocol reply;
        
        data = new ProtocolData();
        try {
            data.write2(imID);
            data.write2(icID);
        } catch(IOException e) {
           if (Manager.DEBUG) {
              e.printStackTrace();
           }
       }
                
        reply = new Protocol(opCode, data);
        try {
            send(reply);                 
        } catch(IOException e) {
           if (Manager.DEBUG) {
              e.printStackTrace();
           }
       }
    }

Here is the call graph for this function:

Here is the caller graph for this function:

synchronized void sun.awt.im.iiimp.ProtocolDriver.regularReply ( int  imID,
int  icID,
int  opCode 
) [inline, package]

Definition at line 206 of file ProtocolDriver.java.

                                                                   {
        ProtocolData data;
        Protocol reply;
        
        data = new ProtocolData();
        try {
            data.write2(imID);
            data.write2(icID);
        } catch(IOException e) {
           if (Manager.DEBUG) {
              e.printStackTrace();
           }
       }
                
        reply = new Protocol(opCode, data);
        try {
            send(reply);                 
        } catch(IOException e) {
           if (Manager.DEBUG) {
              e.printStackTrace();
           }
       }
    }

Here is the call graph for this function:

Definition at line 1560 of file ProtocolDriver.java.

                               {
       //dispose();
    }

Definition at line 1570 of file ProtocolDriver.java.

                               {
       //dispose();
    }
void sun.awt.im.iiimp.ProtocolDriver.resetIC ( int  imID,
int  icID 
) throws IOException [inline, package]

Definition at line 1271 of file ProtocolDriver.java.

                                                        {
       if (connected == false) {
           return;
       }
        
        ProtocolData data = new ProtocolData();
        data.write2(imID);
        data.write2(icID);
        
        send(new Protocol(IM_RESETIC, data));
        getReply(IM_RESETIC_REPLY);
    }

Here is the call graph for this function:

Here is the caller graph for this function:

void sun.awt.im.iiimp.ProtocolDriver.resetIC ( int  imID,
int  icID 
) throws IOException [inline, package]

Definition at line 1272 of file ProtocolDriver.java.

                                                        {
       if (connected == false) {
           return;
       }
        
        ProtocolData data = new ProtocolData();
        data.write2(imID);
        data.write2(icID);
        
        send(new Protocol(IM_RESETIC, data));
        getReply(IM_RESETIC_REPLY);
    }

Here is the call graph for this function:

synchronized void sun.awt.im.iiimp.ProtocolDriver.send ( Protocol  protocol) throws IOException [inline, package]

Definition at line 192 of file ProtocolDriver.java.

                                                                 {
        protocol.write(out);
        out.flush();
    }

Here is the caller graph for this function:

synchronized void sun.awt.im.iiimp.ProtocolDriver.send ( Protocol  protocol) throws IOException [inline, package]

Definition at line 193 of file ProtocolDriver.java.

                                                                 {
        protocol.write(out);
        out.flush();
    }
void sun.awt.im.iiimp.ProtocolDriver.sendAuxData ( IIIMAuxEvent  ev) throws IOException [inline, package]

Definition at line 1298 of file ProtocolDriver.java.

                                                         {
       sendAuxData(auxIMID, auxICID, ev.getIndex(),
                  ev.getName(), ev.getIntValues(), ev.getStringValues());
    }

Here is the caller graph for this function:

void sun.awt.im.iiimp.ProtocolDriver.sendAuxData ( IIIMAuxEvent  ev) throws IOException [inline, package]

Definition at line 1299 of file ProtocolDriver.java.

                                                         {
       sendAuxData(auxIMID, auxICID, ev.getIndex(),
                  ev.getName(), ev.getIntValues(), ev.getStringValues());
    }

Here is the call graph for this function:

void sun.awt.im.iiimp.ProtocolDriver.sendAuxData ( int  imID,
int  icID,
int  index,
String  name,
int[]  idata,
String[]  sdata 
) throws IOException [inline, package]

Definition at line 1303 of file ProtocolDriver.java.

                                        {
        if (connected == false) {
            return;
        }

        ProtocolData data = new ProtocolData();
        data.write2(imID);
        data.write2(icID);
        data.write4(index); // auxiliary window class index
        data.writeString(name); // engine name

       if (idata == null) {
           data.write4(0);
       } else {
           ProtocolData d = new ProtocolData();
           for (int i = 0; i < idata.length; i++) {
              d.write4(idata[i]);
           }
           data.write4(d.count); // byte length of integer value list
           data.writeBytes(d.buf, d.count); // interger value list
       }

       if (sdata == null) {
           data.write4(0);
       } else {
           ProtocolData d = new ProtocolData();
           for (int i = 0; i < sdata.length; i++) {
              d.writeString(sdata[i]);
           }
           data.write4(d.count); // byte length of string value list
           data.writeBytes(d.buf, d.count); // string value list
       }

        send(new Protocol(IM_AUX_SETVALUES, data));
        getReply(IM_AUX_SETVALUES_REPLY);        
    }

Here is the call graph for this function:

void sun.awt.im.iiimp.ProtocolDriver.sendAuxData ( int  imID,
int  icID,
int  index,
String  name,
int[]  idata,
String[]  sdata 
) throws IOException [inline, package]

Definition at line 1304 of file ProtocolDriver.java.

                                        {
        if (connected == false) {
            return;
        }

        ProtocolData data = new ProtocolData();
        data.write2(imID);
        data.write2(icID);
        data.write4(index); // auxiliary window class index
        data.writeString(name); // engine name

       if (idata == null) {
           data.write4(0);
       } else {
           ProtocolData d = new ProtocolData();
           for (int i = 0; i < idata.length; i++) {
              d.write4(idata[i]);
           }
           data.write4(d.count); // byte length of integer value list
           data.writeBytes(d.buf, d.count); // interger value list
       }

       if (sdata == null) {
           data.write4(0);
       } else {
           ProtocolData d = new ProtocolData();
           for (int i = 0; i < sdata.length; i++) {
              d.writeString(sdata[i]);
           }
           data.write4(d.count); // byte length of string value list
           data.writeBytes(d.buf, d.count); // string value list
       }

        send(new Protocol(IM_AUX_SETVALUES, data));
        getReply(IM_AUX_SETVALUES_REPLY);        
    }

Here is the call graph for this function:

This will receive object donwloading candidate before get IM_SETVALUES_REPLY.

Definition at line 1346 of file ProtocolDriver.java.

                         {
       debug(" setClientType");
       try {
           ProtocolData data = new ProtocolData();
           int imID = imServer.getID();
           data.write2(imID);
           data.write2(0); // pad

           IIIMPClientDescripter desc = new IIIMPClientDescripter();
           ProtocolData d = desc.getData();
           data.write4(d.count);
           data.writeBytes(d.buf, d.count);

           send(new Protocol(IM_SETIMVALUES, data));
           getReply(IM_SETIMVALUES_REPLY);
       } catch(Exception e) {
           if (Manager.DEBUG) {
              e.printStackTrace();
           }
       }
    }

Here is the call graph for this function:

Here is the caller graph for this function:

This will receive object donwloading candidate before get IM_SETVALUES_REPLY.

Definition at line 1347 of file ProtocolDriver.java.

                         {
       debug(" setClientType");
       try {
           ProtocolData data = new ProtocolData();
           int imID = imServer.getID();
           data.write2(imID);
           data.write2(0); // pad

           IIIMPClientDescripter desc = new IIIMPClientDescripter();
           ProtocolData d = desc.getData();
           data.write4(d.count);
           data.writeBytes(d.buf, d.count);

           send(new Protocol(IM_SETIMVALUES, data));
           getReply(IM_SETIMVALUES_REPLY);
       } catch(Exception e) {
           if (Manager.DEBUG) {
              e.printStackTrace();
           }
       }
    }

Here is the call graph for this function:

void sun.awt.im.iiimp.ProtocolDriver.setFocus ( int  imID,
int  icID,
boolean  mode 
) throws IOException [inline, package]

Definition at line 1257 of file ProtocolDriver.java.

                                                                       {
       if (connected == false) {
           return;
       }

       ProtocolData data = new ProtocolData();
       data.write2(imID);
       data.write2(icID);

        send(new Protocol(mode ? IM_SETICFOCUS : IM_UNSETICFOCUS, data));
        
        getReply(mode ? IM_SETICFOCUS_REPLY : IM_UNSETICFOCUS_REPLY);
    }

Here is the call graph for this function:

Here is the caller graph for this function:

void sun.awt.im.iiimp.ProtocolDriver.setFocus ( int  imID,
int  icID,
boolean  mode 
) throws IOException [inline, package]

Definition at line 1258 of file ProtocolDriver.java.

                                                                       {
       if (connected == false) {
           return;
       }

       ProtocolData data = new ProtocolData();
       data.write2(imID);
       data.write2(icID);

        send(new Protocol(mode ? IM_SETICFOCUS : IM_UNSETICFOCUS, data));
        
        getReply(mode ? IM_SETICFOCUS_REPLY : IM_UNSETICFOCUS_REPLY);
    }

Here is the call graph for this function:

Definition at line 1695 of file ProtocolDriver.java.

                                  {
       return;
    }

Definition at line 1705 of file ProtocolDriver.java.

                                  {
       return;
    }

Definition at line 1699 of file ProtocolDriver.java.

                                     {
       return;
    }

Definition at line 1709 of file ProtocolDriver.java.

                                     {
       return;
    }
static Locale sun.awt.im.iiimp.ProtocolDriver.toLocale ( String  str) [inline, static, package]

Definition at line 1707 of file ProtocolDriver.java.

                                       {
       if (str == null || str.length() == 0) {
           return null;
       }

       // if str is a locale name that is defined in the spec...
       if (str.equals("ja")) {
           return Locale.JAPAN;
        } else if (str.equals("ko")) {
           return Locale.KOREAN;
        } else if (str.equals("zh_TW")) {
           return Locale.TRADITIONAL_CHINESE;
        } else if (str.equals("zh_CN")) {
           return Locale.SIMPLIFIED_CHINESE;
        }

       // if str is not in the spec...
       int index = str.indexOf('_');
       if (index > 0) {
           String language = str.substring(0, index);
           String tmp = str.substring(index + 1);
           index = tmp.indexOf('.');
           String country = "";
           if (index > 0) {
              country = tmp.substring(0, index);
           }
           return new Locale(language, country);
       }

       return new Locale(str, "");
    }

Here is the caller graph for this function:

static Locale sun.awt.im.iiimp.ProtocolDriver.toLocale ( String  str) [inline, static, package]

Definition at line 1717 of file ProtocolDriver.java.

                                       {
       if (str == null || str.length() == 0) {
           return null;
       }

       // if str is a locale name that is defined in the spec...
       if (str.equals("ja")) {
           return Locale.JAPAN;
        } else if (str.equals("ko")) {
           return Locale.KOREAN;
        } else if (str.equals("zh_TW")) {
           return Locale.TRADITIONAL_CHINESE;
        } else if (str.equals("zh_CN")) {
           return Locale.SIMPLIFIED_CHINESE;
        } 

       // if str is not in the spec...
       int index = str.indexOf('_');
       if (index > 0) {
           String language = str.substring(0, index);
           String country = str.substring(index + 1);
           return new Locale(language, country);
       }
       return new Locale(str, "");
    }
static String sun.awt.im.iiimp.ProtocolDriver.toLocaleString ( Locale  locale) [inline, static, package]

Definition at line 1739 of file ProtocolDriver.java.

                                                {
       if (locale == null) {
           return null;
       }

        String loc = locale.getLanguage();
       if (loc.equals("ja")) {
           return "ja";
        } else if (loc.equals("ko")) {
           return "ko";
        } else if (loc.equals("zh")) {
            String region = locale.getCountry();
            if (region.equals("TW")) {
              return "zh_TW";
            } else {
              return "zh_CN";
            }
        } 

       return loc;
    }

Here is the caller graph for this function:

static String sun.awt.im.iiimp.ProtocolDriver.toLocaleString ( Locale  locale) [inline, static, package]

Definition at line 1743 of file ProtocolDriver.java.

                                                {
       if (locale == null) {
           return null;
       }

        String loc = locale.getLanguage();
        String region = locale.getCountry();
        String locale_string = "";

       if (loc.equals("ja")) {
           return "ja";
        } else if (loc.equals("ko")) {
           return "ko";
        } else if (loc.equals("zh")) {
            if (region.equals("TW")) {
              return "zh_TW";
            } else if (region.equals("CN")){
              return "zh_CN";
            } else
                return "zh_HK";
        } else {
           if (region == null || region.length() == 0)
             locale_string = loc;
           else
             locale_string = loc + "_" + region;
        }
       return locale_string;
    }

Member Data Documentation

byte [] sun.awt.im.iiimp.ProtocolDriver.aa [static, package]
Initial value:
 {
       (byte)'0', (byte)'1', (byte)'2', (byte)'3',
       (byte)'4', (byte)'5', (byte)'6', (byte)'7',
       (byte)'8', (byte)'9', (byte)'A', (byte)'B',
       (byte)'C', (byte)'D', (byte)'E', (byte)'F',
       (byte)'G', (byte)'H', (byte)'I', (byte)'J',
       (byte)'K', (byte)'L', (byte)'M', (byte)'N',
       (byte)'O', (byte)'P', (byte)'Q', (byte)'R',
       (byte)'S', (byte)'T', (byte)'U', (byte)'V',
       (byte)'W', (byte)'X', (byte)'Y', (byte)'Z',
       (byte)'a', (byte)'b', (byte)'c', (byte)'d',
       (byte)'e', (byte)'f', (byte)'g', (byte)'h',
       (byte)'i', (byte)'j', (byte)'k', (byte)'l',
       (byte)'m', (byte)'n', (byte)'o', (byte)'p',
       (byte)'q', (byte)'r', (byte)'s', (byte)'t',
       (byte)'u', (byte)'v', (byte)'w', (byte)'x',
       (byte)'y', (byte)'z',
    }

Definition at line 1502 of file ProtocolDriver.java.

Definition at line 87 of file ProtocolDriver.java.

Definition at line 81 of file ProtocolDriver.java.

Definition at line 80 of file ProtocolDriver.java.

Definition at line 82 of file ProtocolDriver.java.

static final int IIIMProtocol.BACKGROUND_RGB_FEEDBACK = 2 [static, inherited]

Definition at line 153 of file IIIMProtocol.java.

static final int IIIMProtocol.BIGENDIAN = 0x42 [static, inherited]

Definition at line 116 of file IIIMProtocol.java.

Definition at line 234 of file ProtocolDriver.java.

Definition at line 237 of file ProtocolDriver.java.

static final int IIIMProtocol.CCDEF = 0x1030 [static, inherited]

Definition at line 134 of file IIIMProtocol.java.

Definition at line 88 of file ProtocolDriver.java.

static final String sun.awt.im.iiimp.ProtocolDriver.CHMOD_CMD = "/usr/bin/chmod" [static, private]

Definition at line 1451 of file ProtocolDriver.java.

Definition at line 85 of file ProtocolDriver.java.

static final int IIIMProtocol.CLAUSE = 3 [static, inherited]

Definition at line 160 of file IIIMProtocol.java.

static final int IIIMProtocol.CLIENT_DESCRIPTER = 0x1011 [static, inherited]

Definition at line 133 of file IIIMProtocol.java.

boolean sun.awt.im.iiimp.ProtocolDriver.connected = false [private]

Definition at line 66 of file ProtocolDriver.java.

static final int IIIMProtocol.DECORATION_FEEDBACK = 0 [static, inherited]

Definition at line 151 of file IIIMProtocol.java.

Definition at line 84 of file ProtocolDriver.java.

boolean sun.awt.im.iiimp.ProtocolDriver.download = true [private]

Definition at line 86 of file ProtocolDriver.java.

static final int IIIMProtocol.EIGHTBYTES_PACKET = 1 [static, inherited]

Definition at line 52 of file IIIMProtocol.java.

static final int IIIMProtocol.FOREGROUND_RGB_FEEDBACK = 1 [static, inherited]

Definition at line 152 of file IIIMProtocol.java.

static final int IIIMProtocol.FOURBYTES_PACKET = 0 [static, inherited]

Definition at line 51 of file IIIMProtocol.java.

static final int IIIMProtocol.GUI_CATEGORY = 0 [static, inherited]

Definition at line 145 of file IIIMProtocol.java.

static final int IIIMProtocol.GUI_OBJECT = 0x1031 [static, inherited]

Definition at line 135 of file IIIMProtocol.java.

static final int IIIMProtocol.IC_CHARACTER_SUBSETS = 2 [static, inherited]

Definition at line 140 of file IIIMProtocol.java.

static final int IIIMProtocol.IC_INPUT_LANGUAGE = 1 [static, inherited]

Definition at line 139 of file IIIMProtocol.java.

static final int IIIMProtocol.IC_INPUT_METHOD = 3 [static, inherited]

Definition at line 141 of file IIIMProtocol.java.

static final String sun.awt.im.iiimp.ProtocolDriver.IIIMP_PGK_PREFIX = "sun.awt.im" [static, private]

Definition at line 1642 of file ProtocolDriver.java.

static final int IIIMProtocol.IM_AUX_DONE = 94 [static, inherited]

Definition at line 110 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_AUX_DONE_REPLY = 95 [static, inherited]

Definition at line 111 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_AUX_DRAW = 92 [static, inherited]

Definition at line 108 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_AUX_DRAW_REPLY = 93 [static, inherited]

Definition at line 109 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_AUX_SETVALUES = 96 [static, inherited]

Definition at line 112 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_AUX_SETVALUES_REPLY = 97 [static, inherited]

Definition at line 113 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_AUX_START = 90 [static, inherited]

Definition at line 106 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_AUX_START_REPLY = 91 [static, inherited]

Definition at line 107 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_COMMIT_STRING = 14 [static, inherited]

Definition at line 69 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_CONNECT = 1 [static, inherited]

Definition at line 56 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_CONNECT_REPLY = 2 [static, inherited]

Definition at line 57 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_CREATEIC = 20 [static, inherited]

Definition at line 72 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_CREATEIC_REPLY = 21 [static, inherited]

Definition at line 73 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_DESTROYIC = 22 [static, inherited]

Definition at line 74 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_DESTROYIC_REPLY = 23 [static, inherited]

Definition at line 75 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_DISCONNECT = 3 [static, inherited]

Definition at line 58 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_DISCONNECT_REPLY = 4 [static, inherited]

Definition at line 59 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_FORWARD_EVENT = 12 [static, inherited]

Definition at line 67 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_FORWARD_EVENT_REPLY = 13 [static, inherited]

Definition at line 68 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_FORWARD_EVENT_WITH_OPERATIONS = 15 [static, inherited]

Definition at line 70 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_FORWARD_EVENT_WITH_OPERATIONS_REPLY = 16 [static, inherited]

Definition at line 71 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_GETICVALUES = 26 [static, inherited]

Definition at line 78 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_GETICVALUES_REPLY = 27 [static, inherited]

Definition at line 79 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_GETIMVALUES = 10 [static, inherited]

Definition at line 65 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_GETIMVALUES_REPLY = 11 [static, inherited]

Definition at line 66 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_LOOKUP_CHOICE_DONE = 74 [static, inherited]

Definition at line 102 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_LOOKUP_CHOICE_DONE_REPLY = 75 [static, inherited]

Definition at line 103 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_LOOKUP_CHOICE_DRAW = 72 [static, inherited]

Definition at line 100 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_LOOKUP_CHOICE_DRAW_REPLY = 73 [static, inherited]

Definition at line 101 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_LOOKUP_CHOICE_PROCESS = 76 [static, inherited]

Definition at line 104 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_LOOKUP_CHOICE_PROCESS_REPLY = 77 [static, inherited]

Definition at line 105 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_LOOKUP_CHOICE_START = 70 [static, inherited]

Definition at line 98 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_LOOKUP_CHOICE_START_REPLY = 71 [static, inherited]

Definition at line 99 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_NO_PROTOCOL = 0 [static, inherited]

Definition at line 55 of file IIIMProtocol.java.

final int sun.awt.im.iiimp.IIIMProtocol.IM_OPEN_NS = 80 [static, inherited]

Definition at line 107 of file IIIMProtocol.java.

final int sun.awt.im.iiimp.IIIMProtocol.IM_OPEN_NS_REPLY = 81 [static, inherited]

Definition at line 108 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_PREEDIT_DONE = 46 [static, inherited]

Definition at line 90 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_PREEDIT_DONE_REPLY = 47 [static, inherited]

Definition at line 91 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_PREEDIT_DRAW = 42 [static, inherited]

Definition at line 88 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_PREEDIT_DRAW_REPLY = 43 [static, inherited]

Definition at line 89 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_PREEDIT_START = 40 [static, inherited]

Definition at line 86 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_PREEDIT_START_REPLY = 41 [static, inherited]

Definition at line 87 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_REGISTER_TRIGGER_KEYS = 5 [static, inherited]

Definition at line 60 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_RESETIC = 32 [static, inherited]

Definition at line 84 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_RESETIC_REPLY = 33 [static, inherited]

Definition at line 85 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_SETICFOCUS = 28 [static, inherited]

Definition at line 80 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_SETICFOCUS_REPLY = 29 [static, inherited]

Definition at line 81 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_SETICVALUES = 24 [static, inherited]

Definition at line 76 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_SETICVALUES_REPLY = 25 [static, inherited]

Definition at line 77 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_SETIMVALUES = 8 [static, inherited]

Definition at line 63 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_SETIMVALUES_REPLY = 9 [static, inherited]

Definition at line 64 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_STATUS_DONE = 54 [static, inherited]

Definition at line 96 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_STATUS_DONE_REPLY = 55 [static, inherited]

Definition at line 97 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_STATUS_DRAW = 52 [static, inherited]

Definition at line 94 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_STATUS_DRAW_REPLY = 53 [static, inherited]

Definition at line 95 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_STATUS_START = 50 [static, inherited]

Definition at line 92 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_STATUS_START_REPLY = 51 [static, inherited]

Definition at line 93 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_TRIGGER_NOTIFY = 6 [static, inherited]

Definition at line 61 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_TRIGGER_NOTIFY_REPLY = 7 [static, inherited]

Definition at line 62 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_UNSETICFOCUS = 30 [static, inherited]

Definition at line 82 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_UNSETICFOCUS_REPLY = 31 [static, inherited]

Definition at line 83 of file IIIMProtocol.java.

Definition at line 62 of file ProtocolDriver.java.

Definition at line 74 of file ProtocolDriver.java.

static final int IIIMProtocol.INPUT_LANGUAGE = 4 [static, inherited]

Definition at line 122 of file IIIMProtocol.java.

static final int IIIMProtocol.INPUT_STRING = 0 [static, inherited]

Definition at line 157 of file IIIMProtocol.java.

Definition at line 63 of file ProtocolDriver.java.

static final int IIIMProtocol.INPUTMETHOD_LIST = 0x1001 [static, inherited]

Definition at line 131 of file IIIMProtocol.java.

static final String sun.awt.im.iiimp.ProtocolDriver.JAVA_PROTOCOL_HANDLER_PKGS = "java.protocol.handler.pkgs" [static, private]

Definition at line 1643 of file ProtocolDriver.java.

static final int IIIMProtocol.KEYEVENT = 2 [static, inherited]

Definition at line 128 of file IIIMProtocol.java.

static final int IIIMProtocol.LITTLEENDIAN = 0x6c [static, inherited]

Definition at line 117 of file IIIMProtocol.java.

static final int IIIMProtocol.LOOKUP_MAX_NUMBER = 1 [static, inherited]

Definition at line 119 of file IIIMProtocol.java.

static final int IIIMProtocol.LOOKUP_STYLE = 2 [static, inherited]

Definition at line 120 of file IIIMProtocol.java.

static final int IIIMProtocol.LWE_CATEGORY = 1 [static, inherited]

Definition at line 146 of file IIIMProtocol.java.

static final int IIIMProtocol.LWE_OBJECT = 0x1032 [static, inherited]

Definition at line 136 of file IIIMProtocol.java.

static final int IIIMProtocol.MANAGE_RULE_CATEGORY = 3 [static, inherited]

Definition at line 148 of file IIIMProtocol.java.

Definition at line 89 of file ProtocolDriver.java.

Definition at line 233 of file ProtocolDriver.java.

Vector sun.awt.im.iiimp.ProtocolDriver.nestVector = new Vector() [package]

Definition at line 236 of file ProtocolDriver.java.

static final int IIIMProtocol.NOID = -1 [static, inherited]

Definition at line 144 of file IIIMProtocol.java.

static final int IIIMProtocol.OBJECT_DESCRIPTER_LIST = 0x1010 [static, inherited]

Definition at line 132 of file IIIMProtocol.java.

Definition at line 78 of file ProtocolDriver.java.

Definition at line 76 of file ProtocolDriver.java.

Definition at line 235 of file ProtocolDriver.java.

static final int IIIMProtocol.PART_OF_SPEECH = 2 [static, inherited]

Definition at line 159 of file IIIMProtocol.java.

static ProtocolDriver sun.awt.im.iiimp.ProtocolDriver.pd = null [static, private]

Definition at line 65 of file ProtocolDriver.java.

Definition at line 90 of file ProtocolDriver.java.

static final int IIIMProtocol.PRIMARY_LANGUAGE = 5 [static, inherited]

Definition at line 123 of file IIIMProtocol.java.

static final int IIIMProtocol.QUERY_LOOKUP_STYLE = 3 [static, inherited]

Definition at line 121 of file IIIMProtocol.java.

static final int IIIMProtocol.READING = 1 [static, inherited]

Definition at line 158 of file IIIMProtocol.java.

static final int IIIMProtocol.STRING = 0 [static, inherited]

Definition at line 126 of file IIIMProtocol.java.

static final int IIIMProtocol.SYNTAX_RULE_CATEGORY = 2 [static, inherited]

Definition at line 147 of file IIIMProtocol.java.

static final int IIIMProtocol.TEXT = 1 [static, inherited]

Definition at line 127 of file IIIMProtocol.java.

Definition at line 72 of file ProtocolDriver.java.

static final int IIIMProtocol.UNDERLINE_RGB_FEEDBACK = 3 [static, inherited]

Definition at line 154 of file IIIMProtocol.java.

Definition at line 70 of file ProtocolDriver.java.

Definition at line 68 of file ProtocolDriver.java.

static final int IIIMProtocol.VERSION = 1 [static, inherited]

Definition at line 48 of file IIIMProtocol.java.


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