Back to index

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

List of all members.

Public Member Functions

Locale[] getAvailableLocales ()
InputContext[] getInputContext ()
Locale[] getAvailableLocales ()
InputContext[] getInputContext ()

Package Functions

 IMServer ()
 IMServer (int id)
boolean open (Locale locale)
boolean reopen (Locale locale)
boolean setData (IIIMPIMValues d)
void addInputContextHandler (InputContext ich)
void removeInputContextHandler (InputContext ich)
InputContext getInputContext (int id)
int getID ()
int getInputContextID (java.awt.im.InputContext ic)
boolean isDynamicEventFlow ()
boolean isConversionOnKey (KeyEvent e)
boolean isConversionOffKey (KeyEvent e)
boolean isLocaleSupported (Locale locale)
 IMServer ()
 IMServer (int id)
boolean open (Locale locale)
boolean reopen (Locale locale)
boolean setLocaleList (IIIMPIMValues d)
boolean setTriggerKeys (IIIMPIMValues d)
void addInputContextHandler (InputContext ich)
void removeInputContextHandler (InputContext ich)
InputContext getInputContext (int id)
int getID ()
int getInputContextID (java.awt.im.InputContext ic)
boolean isDynamicEventFlow ()
boolean isConversionOnKey (KeyEvent e)
boolean isConversionOffKey (KeyEvent e)
boolean isLocaleSupported (Locale locale)

Static Package Functions

static boolean localeEquals (java.util.Locale loc1, java.util.Locale loc2)
static boolean localeEquals (java.util.Locale loc1, java.util.Locale loc2)

Private Member Functions

void debug (String str)
void debug (String str)

Private Attributes

Vector ichList = new Vector()
Locale locale = null
int id = -1
Locale localeList [] = null
IIIMPKey onKey [] = null
IIIMPKey offKey [] = null
boolean dynamic_event_flow = false

Detailed Description

Definition at line 1763 of file ProtocolDriver.java.


Constructor & Destructor Documentation

sun.awt.im.iiimp.IMServer.IMServer ( ) [inline, package]

Definition at line 1779 of file ProtocolDriver.java.

               {
    }
sun.awt.im.iiimp.IMServer.IMServer ( int  id) [inline, package]

Definition at line 1782 of file ProtocolDriver.java.

                     {
        this.id = id;
    }
sun.awt.im.iiimp.IMServer.IMServer ( ) [inline, package]

Definition at line 1790 of file ProtocolDriver.java.

               {
    }
sun.awt.im.iiimp.IMServer.IMServer ( int  id) [inline, package]

Definition at line 1793 of file ProtocolDriver.java.

                     {
        this.id = id;
    }

Member Function Documentation

Definition at line 1826 of file ProtocolDriver.java.

                                                  {
       ichList.addElement(ich);
    }

Here is the caller graph for this function:

Definition at line 1848 of file ProtocolDriver.java.

                                                  {
       ichList.addElement(ich);
    }
void sun.awt.im.iiimp.IMServer.debug ( String  str) [inline, private]

Definition at line 1872 of file ProtocolDriver.java.

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

Here is the caller graph for this function:

void sun.awt.im.iiimp.IMServer.debug ( String  str) [inline, private]

Definition at line 1894 of file ProtocolDriver.java.

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

Definition at line 1817 of file ProtocolDriver.java.

                                          {
       if (localeList == null) {
           return null;
       }
        Locale[] tmp = new Locale[localeList.length];
       System.arraycopy(localeList, 0, tmp, 0, localeList.length);
       return tmp;
    }

Here is the caller graph for this function:

Definition at line 1839 of file ProtocolDriver.java.

                                          {
       if (localeList == null) {
           return null;
       }
        Locale[] tmp = new Locale[localeList.length];
       System.arraycopy(localeList, 0, tmp, 0, localeList.length);
       return tmp;
    }
int sun.awt.im.iiimp.IMServer.getID ( ) [inline, package]

Definition at line 1853 of file ProtocolDriver.java.

                {
       return id;
    }

Here is the caller graph for this function:

int sun.awt.im.iiimp.IMServer.getID ( ) [inline, package]

Definition at line 1875 of file ProtocolDriver.java.

                {
       return id;
    }

Definition at line 1834 of file ProtocolDriver.java.

                                         {
       for (int i = 0; i < ichList.size(); i++) {
           InputContext ic = (InputContext) ichList.elementAt(i);
           if (ic.getID() == id) {
              return ic;
           }
       }
       return (InputContext) null;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1844 of file ProtocolDriver.java.

                                            {
       if (ichList.size() == 0) {
           return null;
       }
       InputContext[] ich = new InputContext[ichList.size()];
       ichList.copyInto(ich);
       return ich;
    }

Here is the caller graph for this function:

Definition at line 1856 of file ProtocolDriver.java.

                                         {
       for (int i = 0; i < ichList.size(); i++) {
           InputContext ic = (InputContext) ichList.elementAt(i);
           if (ic.getID() == id) {
              return ic;
           }
       }
       return (InputContext) null;
    }

Here is the call graph for this function:

Definition at line 1866 of file ProtocolDriver.java.

                                            {
       if (ichList.size() == 0) {
           return null;
       }
       InputContext[] ich = new InputContext[ichList.size()];
       ichList.copyInto(ich);
       return ich;
    }
int sun.awt.im.iiimp.IMServer.getInputContextID ( java.awt.im.InputContext  ic) [inline, package]

Definition at line 1857 of file ProtocolDriver.java.

                                                       {
        InputContext[] inputContext = getInputContext();
        
        if(inputContext == null) {
            debug("InputContext is null, return -1");
            return -1; // I don't know -1 is exact
        }
        for(int i=0; i < inputContext.length; i++) {
            if(inputContext[i].isIn(ic)) return inputContext[i].getID();
        }
        
        debug("There are no ic in it, return -1");
        return -1;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

int sun.awt.im.iiimp.IMServer.getInputContextID ( java.awt.im.InputContext  ic) [inline, package]

Definition at line 1879 of file ProtocolDriver.java.

                                                       {
        InputContext[] inputContext = getInputContext();
        
        if(inputContext == null) {
            debug("InputContext is null, return -1");
            return -1; // I don't know -1 is exact
        }
        for(int i=0; i < inputContext.length; i++) {
            if(inputContext[i].isIn(ic)) return inputContext[i].getID();
        }
        
        debug("There are no ic in it, return -1");
        return -1;
    }

Here is the call graph for this function:

boolean sun.awt.im.iiimp.IMServer.isConversionOffKey ( KeyEvent  e) [inline, package]

Definition at line 1897 of file ProtocolDriver.java.

                                           {
       int mod = e.getModifiers();
       int code = e.getKeyCode();
       if (offKey != null) {
           for (int i = 0; i < offKey.length; i++) {
              if ((mod & offKey[i].modifier) != 0) {
                  if (code == offKey[i].keycode) {
                     return true;
                  }
              }
           }
       }
       return false;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

boolean sun.awt.im.iiimp.IMServer.isConversionOffKey ( KeyEvent  e) [inline, package]

Definition at line 1919 of file ProtocolDriver.java.

                                           {
       int mod = e.getModifiers();
       int code = e.getKeyCode();
       if (offKey != null) {
           for (int i = 0; i < offKey.length; i++) {
              if ((mod & offKey[i].modifier) != 0) {
                  if (code == offKey[i].keycode) {
                     return true;
                  }
              }
           }
       }
       return false;
    }

Here is the call graph for this function:

boolean sun.awt.im.iiimp.IMServer.isConversionOnKey ( KeyEvent  e) [inline, package]

Definition at line 1882 of file ProtocolDriver.java.

                                          {
       int mod = e.getModifiers();
       int code = e.getKeyCode();
       if (onKey != null) {
           for (int i = 0; i < onKey.length; i++) {
              if ((mod & onKey[i].modifier) != 0) {
                  if (code == onKey[i].keycode) {
                     return true;
                  }
              }
           }
       }
       return false;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

boolean sun.awt.im.iiimp.IMServer.isConversionOnKey ( KeyEvent  e) [inline, package]

Definition at line 1904 of file ProtocolDriver.java.

                                          {
       int mod = e.getModifiers();
       int code = e.getKeyCode();
       if (onKey != null) {
           for (int i = 0; i < onKey.length; i++) {
              if ((mod & onKey[i].modifier) != 0) {
                  if (code == onKey[i].keycode) {
                     return true;
                  }
              }
           }
       }
       return false;
    }

Here is the call graph for this function:

boolean sun.awt.im.iiimp.IMServer.isDynamicEventFlow ( ) [inline, package]

Definition at line 1878 of file ProtocolDriver.java.

                                 {
       return dynamic_event_flow;
    }

Here is the caller graph for this function:

boolean sun.awt.im.iiimp.IMServer.isDynamicEventFlow ( ) [inline, package]

Definition at line 1900 of file ProtocolDriver.java.

                                 {
       return dynamic_event_flow;
    }
boolean sun.awt.im.iiimp.IMServer.isLocaleSupported ( Locale  locale) [inline, package]

Definition at line 1912 of file ProtocolDriver.java.

                                             { 
        if (localeList != null && localeList.length > 0) {
            for (int i = 0; i < localeList.length; i++) {
                if (localeEquals(locale, localeList[i]) == true) {
                    return true;
                }
            }
        }        
        return false;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

boolean sun.awt.im.iiimp.IMServer.isLocaleSupported ( Locale  locale) [inline, package]

Definition at line 1934 of file ProtocolDriver.java.

                                             { 
        if (localeList != null && localeList.length > 0) {
            for (int i = 0; i < localeList.length; i++) {
                if (localeEquals(locale, localeList[i]) == true) {
                    return true;
                }
            }
        }        
        return false;
    }

Here is the call graph for this function:

static boolean sun.awt.im.iiimp.IMServer.localeEquals ( java.util.Locale  loc1,
java.util.Locale  loc2 
) [inline, static, package]

Definition at line 1923 of file ProtocolDriver.java.

                                                                              {
       if (loc1 == null || loc2 == null) {
           return false;
       }

       String lang = loc1.getLanguage();
        if (lang.equals("en") ||
           lang.equals("fr") ||
           lang.equals("de") ||
           lang.equals("it") ||
           lang.equals("sv") ||
           lang.equals("es") ||
           lang.equals("ja") ||
           lang.equals("ko")) {
           return lang.equals(loc2.getLanguage());
       }

       if (lang.equals("zh")) {
           if (lang.equals(loc2.getLanguage())) {
              String region = loc1.getCountry();
              if (region != null && region.length() > 0) {
                  return region.equals(loc2.getCountry());
              }
              return true;
           }
           return false;
        }
       
       return lang.equals(loc2.getLanguage());
    }

Here is the caller graph for this function:

static boolean sun.awt.im.iiimp.IMServer.localeEquals ( java.util.Locale  loc1,
java.util.Locale  loc2 
) [inline, static, package]

Definition at line 1945 of file ProtocolDriver.java.

                                                                              {
       if (loc1 == null || loc2 == null) {
           return false;
       }

       String lang = loc1.getLanguage();
        if (lang.equals("en") ||
           lang.equals("fr") ||
           lang.equals("de") ||
           lang.equals("it") ||
           lang.equals("sv") ||
           lang.equals("es") ||
           lang.equals("ja") ||
           lang.equals("ko")) {
           return lang.equals(loc2.getLanguage());
       }

       if (lang.equals("zh")) {
           if (lang.equals(loc2.getLanguage())) {
              String region = loc1.getCountry();
              if (region != null && region.length() > 0) {
                  return region.equals(loc2.getCountry());
              }
              return true;
           }
           return false;
        }
       
       return lang.equals(loc2.getLanguage());
    }
boolean sun.awt.im.iiimp.IMServer.open ( Locale  locale) [inline, package]

Definition at line 1786 of file ProtocolDriver.java.

                                {
       if (isLocaleSupported(locale)) {
           this.locale = locale;
           return true;
       }
       return false;
    }

Here is the call graph for this function:

boolean sun.awt.im.iiimp.IMServer.open ( Locale  locale) [inline, package]

Definition at line 1797 of file ProtocolDriver.java.

                                {
       if (isLocaleSupported(locale)) {
           this.locale = locale;
           return true;
       }
       return false;
    }

Here is the call graph for this function:

Definition at line 1830 of file ProtocolDriver.java.

                                                     {
       ichList.removeElement(ich);
    }

Here is the caller graph for this function:

Definition at line 1852 of file ProtocolDriver.java.

                                                     {
       ichList.removeElement(ich);
    }
boolean sun.awt.im.iiimp.IMServer.reopen ( Locale  locale) [inline, package]

Definition at line 1794 of file ProtocolDriver.java.

                                  {
        if (isLocaleSupported(locale)) {
           this.locale = locale;
           return true;
       }
       return false;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

boolean sun.awt.im.iiimp.IMServer.reopen ( Locale  locale) [inline, package]

Definition at line 1805 of file ProtocolDriver.java.

                                  {
        if (isLocaleSupported(locale)) {
           this.locale = locale;
           return true;
       }
       return false;
    }

Here is the call graph for this function:

boolean sun.awt.im.iiimp.IMServer.setData ( IIIMPIMValues  d) [inline, package]

Definition at line 1802 of file ProtocolDriver.java.

                                     {
       if (d == null) {
           return false;
       }

       // copy IiimpIMValues
       id = d.id;
       dynamic_event_flow = d.dynamic_event_flow;
       onKey = d.onKey;
       offKey = d.offKey;
       localeList = d.localeList;

       return true;
    }

Here is the caller graph for this function:

boolean sun.awt.im.iiimp.IMServer.setLocaleList ( IIIMPIMValues  d) [inline, package]

Definition at line 1813 of file ProtocolDriver.java.

                                           {
       if (d == null) {
           return false;
       }

       // copy IiimpIMValues
       id = d.id;
       localeList = d.localeList;

       return true;
    }

Here is the caller graph for this function:

boolean sun.awt.im.iiimp.IMServer.setTriggerKeys ( IIIMPIMValues  d) [inline, package]

Definition at line 1825 of file ProtocolDriver.java.

                                            {
       if (d == null) {
           return false;
       }

       // copy IiimpIMValues
       id = d.id;
       dynamic_event_flow = d.dynamic_event_flow;
       onKey = d.onKey;
       offKey = d.offKey;

       return true;
    }

Here is the caller graph for this function:


Member Data Documentation

Definition at line 1776 of file ProtocolDriver.java.

Vector sun.awt.im.iiimp.IMServer.ichList = new Vector() [private]

Definition at line 1764 of file ProtocolDriver.java.

int sun.awt.im.iiimp.IMServer.id = -1 [private]

Definition at line 1768 of file ProtocolDriver.java.

Locale sun.awt.im.iiimp.IMServer.locale = null [private]

Definition at line 1766 of file ProtocolDriver.java.

Locale sun.awt.im.iiimp.IMServer.localeList = null [private]

Definition at line 1770 of file ProtocolDriver.java.

Definition at line 1774 of file ProtocolDriver.java.

Definition at line 1772 of file ProtocolDriver.java.


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