Back to index

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

List of all members.

Public Member Functions

 LookupWindow ()
void lookupStart (IIIMLookupEvent e)
void lookupDone (IIIMLookupEvent e)
void lookupDraw (IIIMLookupEvent e)
void lookupProcess (IIIMLookupEvent e)
void setStyle (String style)
String getStyle ()
 LookupWindow ()
void lookupStart (IIIMLookupEvent e)
void lookupDone (IIIMLookupEvent e)
void lookupDraw (IIIMLookupEvent e)
void lookupProcess (IIIMLookupEvent e)
void setStyle (String style)
String getStyle ()

Public Attributes

Window window

Protected Member Functions

void dispatchActionEvent (IIIMActionEvent e)
void dispatchActionEvent (IIIMActionEvent e)

Package Functions

void init ()
void setLocation (int x, int y)
void calculatePosition ()
synchronized void show ()
void init ()
void setLocation (int x, int y)
void calculatePosition ()
synchronized void show ()
synchronized void hide ()
synchronized void hide ()

Static Package Functions

 [static initializer]
 [static initializer]

Package Attributes

int columHeight
int columWidth
FontMetrics fm

Static Package Attributes

static int screenHeight
static int screenWidth

Private Member Functions

void setTitle (String str)
void setTitle (String str)

Private Attributes

LookupPane pane
String style
int offset = 24

Static Private Attributes

static final int LocateX
static final int LocateY

Detailed Description

Definition at line 52 of file LookupWindow.java.


Constructor & Destructor Documentation

Definition at line 74 of file LookupWindow.java.

                          {
        style = Manager.getProperty("iiimf.preedit.style");
        if(style == null) style = "ROOTWINDOW";      
        
        init();
    }

Here is the call graph for this function:

Definition at line 74 of file LookupWindow.java.

                          {
        style = Manager.getProperty("iiimf.preedit.style");
        if(style == null) style = "ROOTWINDOW";      
        
        init();
    }

Here is the call graph for this function:


Member Function Documentation

sun.awt.im.iiimp.LookupWindow.[static initializer] ( ) [inline, static, package]

Reimplemented from sun.awt.im.iiimp.IIIMWindow.

sun.awt.im.iiimp.LookupWindow.[static initializer] ( ) [inline, static, package]

Reimplemented from sun.awt.im.iiimp.IIIMWindow.

Definition at line 145 of file LookupWindow.java.

                             {
        Component component = getClientComponent();
        
        Component frame = component;
        Insets inset = window.getInsets();
        
        while(!(frame instanceof Frame) && !(frame instanceof Dialog)) {
           frame = frame.getParent();
       }
        
        if(style.equals("BELOWSPOT") 
            && component instanceof InputMethodRequests) {
                Rectangle rect = 
                    ((InputMethodRequests)component).getTextLocation(TextHitInfo.leading(0));
                Point point = new Point();
                point.x = rect.x;
                point.y = rect.y + (int)rect.getHeight() + offset;
                // Leave space for Preedit window
                point.y += (inset.top + inset.bottom + fm.getHeight());
                window.setLocation(point);            
        /*
         * ONSPOT style can used as root window
        else if(style.equals("ONSPOT") 
            && component instanceof InputMethodRequests) {
        */
        } else  {
            // For "ROOTWINDOW" style and component isn't InputMethodRequests
            // Place the window on the left-corner of client component
            
            Point point = frame.getLocation();
            Dimension size = frame.getSize();     

            double x = point.getX();
            // It must leave the position for PreeditWindow
            double y = point.getY() + size.getHeight() 
                + inset.top + inset.bottom + fm.getHeight();
            
            window.setLocation((int)x, (int)y);
            
  
        }
        
            // If window is out of screen, adjust it
            Point location = window.getLocation();
            double xl = location.getX();
            double yl = location.getY();
            Dimension dm = window.getSize();
            if((xl + dm.getWidth()) > screenWidth) 
                xl = screenWidth - dm.getWidth();
            if((yl + dm.getHeight()) > screenHeight) 
                yl = screenHeight - dm.getHeight();
            window.setLocation((int)xl, (int)yl);                  
    }

Here is the caller graph for this function:

Definition at line 145 of file LookupWindow.java.

                             {
        Component component = getClientComponent();
        
        Component frame = component;
        Insets inset = window.getInsets();
        
        while(!(frame instanceof Frame) && !(frame instanceof Dialog)) {
           frame = frame.getParent();
       }
        
        if(style.equals("BELOWSPOT") 
            && component instanceof InputMethodRequests) {
                Rectangle rect = 
                    ((InputMethodRequests)component).getTextLocation(TextHitInfo.leading(0));
                Point point = new Point();
                point.x = rect.x;
                point.y = rect.y + (int)rect.getHeight() + offset;
                // Leave space for Preedit window
                point.y += (inset.top + inset.bottom + fm.getHeight());
                window.setLocation(point);            
        /*
         * ONSPOT style can used as root window
        else if(style.equals("ONSPOT") 
            && component instanceof InputMethodRequests) {
        */
        } else  {
            // For "ROOTWINDOW" style and component isn't InputMethodRequests
            // Place the window on the left-corner of client component
            
            Point point = frame.getLocation();
            Dimension size = frame.getSize();     

            double x = point.getX();
            // It must leave the position for PreeditWindow
            double y = point.getY() + size.getHeight() 
                + inset.top + inset.bottom + fm.getHeight();
            
            window.setLocation((int)x, (int)y);
            
  
        }
        
            // If window is out of screen, adjust it
            Point location = window.getLocation();
            double xl = location.getX();
            double yl = location.getY();
            Dimension dm = window.getSize();
            if((xl + dm.getWidth()) > screenWidth) 
                xl = screenWidth - dm.getWidth();
            if((yl + dm.getHeight()) > screenHeight) 
                yl = screenHeight - dm.getHeight();
            window.setLocation((int)xl, (int)yl);                  
    }
void sun.awt.im.iiimp.LookupWindow.dispatchActionEvent ( IIIMActionEvent  e) [inline, protected]

Definition at line 102 of file LookupWindow.java.

                                                          {
       super.dispatchActionEvent(e);
    }
void sun.awt.im.iiimp.LookupWindow.dispatchActionEvent ( IIIMActionEvent  e) [inline, protected]

Definition at line 102 of file LookupWindow.java.

                                                          {
       super.dispatchActionEvent(e);
    }

Here is the caller graph for this function:

Definition at line 137 of file LookupWindow.java.

                             {
        return style;
    }

Definition at line 137 of file LookupWindow.java.

                             {
        return style;
    }
synchronized void sun.awt.im.iiimp.IIIMWindow.hide ( ) [inline, package, inherited]

Definition at line 61 of file IIIMWindow.java.

                             {
        if(window != null)
            window.setVisible(false);
    }

Here is the caller graph for this function:

synchronized void sun.awt.im.iiimp.IIIMWindow.hide ( ) [inline, package, inherited]

Definition at line 61 of file IIIMWindow.java.

                             {
        if(window != null)
            window.setVisible(false);
    }
void sun.awt.im.iiimp.LookupWindow.init ( ) [inline, package]

Definition at line 81 of file LookupWindow.java.

                {
        window = new EventWindow(this);
                
       Font font = new Font("Monospaced", Font.PLAIN, 12);
       
        fm = window.getFontMetrics(font);
        int fontHeight = fm.getHeight();
        int fontWidth = fm.getMaxAdvance();
        int fontAscent = fm.getAscent();
        columWidth = fontWidth ;
        columHeight = fontHeight + 2;
              
        window.setFont(font);
       
        pane = new LookupPane();
        pane.setFont(font);
        window.add(pane);

       window.pack();
    }

Here is the caller graph for this function:

void sun.awt.im.iiimp.LookupWindow.init ( ) [inline, package]

Definition at line 81 of file LookupWindow.java.

                {
        window = new EventWindow(this);
                
       Font font = new Font("Monospaced", Font.PLAIN, 12);
       
        fm = window.getFontMetrics(font);
        int fontHeight = fm.getHeight();
        int fontWidth = fm.getMaxAdvance();
        int fontAscent = fm.getAscent();
        columWidth = fontWidth ;
        columHeight = fontHeight + 2;
              
        window.setFont(font);
       
        pane = new LookupPane();
        pane.setFont(font);
        window.add(pane);

       window.pack();
    }
void sun.awt.im.iiimp.LookupWindow.lookupDone ( IIIMLookupEvent  e) [inline]

Definition at line 116 of file LookupWindow.java.

                                              {
        pane.handleEvent(e);
       window.setVisible(false);
    }

Here is the call graph for this function:

void sun.awt.im.iiimp.LookupWindow.lookupDone ( IIIMLookupEvent  e) [inline]

Definition at line 116 of file LookupWindow.java.

                                              {
        pane.handleEvent(e);
       window.setVisible(false);
    }

Here is the call graph for this function:

void sun.awt.im.iiimp.LookupWindow.lookupDraw ( IIIMLookupEvent  e) [inline]

Definition at line 121 of file LookupWindow.java.

                                              {
        pane.handleEvent(e);
       setTitle(e.getTitle());
       window.setSize(window.getPreferredSize());
       calculatePosition();  
       window.setVisible(true);
    }

Here is the call graph for this function:

void sun.awt.im.iiimp.LookupWindow.lookupDraw ( IIIMLookupEvent  e) [inline]

Definition at line 121 of file LookupWindow.java.

                                              {
        pane.handleEvent(e);
       setTitle(e.getTitle());
       window.setSize(window.getPreferredSize());
       calculatePosition();  
       window.setVisible(true);
    }

Here is the call graph for this function:

void sun.awt.im.iiimp.LookupWindow.lookupProcess ( IIIMLookupEvent  e) [inline]

Definition at line 129 of file LookupWindow.java.

                                                 {
        pane.handleEvent(e);
    }

Here is the call graph for this function:

void sun.awt.im.iiimp.LookupWindow.lookupProcess ( IIIMLookupEvent  e) [inline]

Definition at line 129 of file LookupWindow.java.

                                                 {
        pane.handleEvent(e);
    }

Here is the call graph for this function:

void sun.awt.im.iiimp.LookupWindow.lookupStart ( IIIMLookupEvent  e) [inline]

Definition at line 107 of file LookupWindow.java.

                                               {
       if (pane == null) {
           init();
       }
       pane.setTarget(getClientComponent());
       pane.setLookupWindow(this);
        pane.handleEvent(e);
    }

Here is the call graph for this function:

void sun.awt.im.iiimp.LookupWindow.lookupStart ( IIIMLookupEvent  e) [inline]

Definition at line 107 of file LookupWindow.java.

                                               {
       if (pane == null) {
           init();
       }
       pane.setTarget(getClientComponent());
       pane.setLookupWindow(this);
        pane.handleEvent(e);
    }

Here is the call graph for this function:

void sun.awt.im.iiimp.LookupWindow.setLocation ( int  x,
int  y 
) [inline, package]

Definition at line 141 of file LookupWindow.java.

                                   {
        window.setLocation(x,y);
    }
void sun.awt.im.iiimp.LookupWindow.setLocation ( int  x,
int  y 
) [inline, package]

Definition at line 141 of file LookupWindow.java.

                                   {
        window.setLocation(x,y);
    }
void sun.awt.im.iiimp.LookupWindow.setStyle ( String  style) [inline]

Definition at line 133 of file LookupWindow.java.

                                       {
        this.style = style;
    }
void sun.awt.im.iiimp.LookupWindow.setStyle ( String  style) [inline]

Definition at line 133 of file LookupWindow.java.

                                       {
        this.style = style;
    }
void sun.awt.im.iiimp.LookupWindow.setTitle ( String  str) [inline, private]

Definition at line 204 of file LookupWindow.java.

                                      {
        ((Dialog)window).setTitle(str);
    }

Here is the caller graph for this function:

void sun.awt.im.iiimp.LookupWindow.setTitle ( String  str) [inline, private]

Definition at line 204 of file LookupWindow.java.

                                      {
        ((Dialog)window).setTitle(str);
    }
synchronized void sun.awt.im.iiimp.LookupWindow.show ( ) [inline, package]

Reimplemented from sun.awt.im.iiimp.IIIMWindow.

Definition at line 199 of file LookupWindow.java.

                             {
        if(window == null) init();
        window.setVisible(true);
    }

Here is the call graph for this function:

synchronized void sun.awt.im.iiimp.LookupWindow.show ( ) [inline, package]

Reimplemented from sun.awt.im.iiimp.IIIMWindow.

Definition at line 199 of file LookupWindow.java.

                             {
        if(window == null) init();
        window.setVisible(true);
    }

Here is the call graph for this function:


Member Data Documentation

Definition at line 64 of file LookupWindow.java.

Definition at line 64 of file LookupWindow.java.

FontMetrics sun.awt.im.iiimp.LookupWindow.fm [package]

Definition at line 65 of file LookupWindow.java.

static final int sun.awt.im.iiimp.LookupWindow.LocateX [static, private]

Definition at line 55 of file LookupWindow.java.

static final int sun.awt.im.iiimp.LookupWindow.LocateY [static, private]

Definition at line 56 of file LookupWindow.java.

Definition at line 62 of file LookupWindow.java.

Definition at line 58 of file LookupWindow.java.

static int sun.awt.im.iiimp.IIIMWindow.screenHeight [static, package, inherited]

Definition at line 52 of file IIIMWindow.java.

static int sun.awt.im.iiimp.IIIMWindow.screenWidth [static, package, inherited]

Definition at line 53 of file IIIMWindow.java.

Definition at line 60 of file LookupWindow.java.

Definition at line 51 of file IIIMWindow.java.


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