Back to index

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

List of all members.

Public Member Functions

 PreeditWindow ()
void preeditStart (IIIMPreeditEvent e)
void preeditDone (IIIMPreeditEvent e)
void preeditDraw (IIIMPreeditEvent e)
void dispatchEvent (IIIMPreeditEvent e)
void setStyle (String style)
String getStyle ()
 PreeditWindow ()
void preeditStart (IIIMPreeditEvent e)
void preeditDone (IIIMPreeditEvent e)
void preeditDraw (IIIMPreeditEvent e)
void dispatchEvent (IIIMPreeditEvent e)
void setStyle (String style)
String getStyle ()

Public Attributes

Window window

Package Functions

void init ()
void calculatePosition ()
void init ()
void calculatePosition ()
synchronized void hide ()
synchronized void hide ()
synchronized void show ()
synchronized void show ()

Static Package Functions

 [static initializer]
 [static initializer]

Package Attributes

String style
PreeditPane pane
int columWidth
int columHeight
int offset = 20

Static Package Attributes

static int screenHeight
static int screenWidth

Detailed Description

Definition at line 53 of file PreeditWindow.java.


Constructor & Destructor Documentation

Definition at line 64 of file PreeditWindow.java.

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

Here is the call graph for this function:

Definition at line 64 of file PreeditWindow.java.

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

Here is the call graph for this function:


Member Function Documentation

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

Definition at line 125 of file PreeditWindow.java.

                             {
        Component component = getClientComponent();
        
        Component frame = component;
        while(!(frame instanceof Frame)) frame = component.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;
                
                window.setLocation(point);
        } else {
            // for ROOTWINDOW style and client not InputMethodRequests
            // Place the window on the left-corner of client component
            Point point = frame.getLocation();
            Dimension size = frame.getSize();     
        
            double x = point.getX();
            double y = point.getY() + size.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 125 of file PreeditWindow.java.

                             {
        Component component = getClientComponent();
        
        Component frame = component;
        while(!(frame instanceof Frame)) frame = component.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;
                
                window.setLocation(point);
        } else {
            // for ROOTWINDOW style and client not InputMethodRequests
            // Place the window on the left-corner of client component
            Point point = frame.getLocation();
            Dimension size = frame.getSize();     
        
            double x = point.getX();
            double y = point.getY() + size.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.PreeditWindow.dispatchEvent ( IIIMPreeditEvent  e) [inline]

Definition at line 101 of file PreeditWindow.java.

                                                  {
        if(pane == null) init();
        
        pane.handleEvent(e);
        
        Insets inset = window.getInsets();
        
        int width = inset.left + inset.right + pane.width();
        int height = inset.top + inset.bottom + pane.height();
        
        window.setSize(width, height);
        calculatePosition();

        window.show();
    }

Here is the call graph for this function:

void sun.awt.im.iiimp.PreeditWindow.dispatchEvent ( IIIMPreeditEvent  e) [inline]

Definition at line 101 of file PreeditWindow.java.

                                                  {
        if(pane == null) init();
        
        pane.handleEvent(e);
        
        Insets inset = window.getInsets();
        
        int width = inset.left + inset.right + pane.width();
        int height = inset.top + inset.bottom + pane.height();
        
        window.setSize(width, height);
        calculatePosition();

        window.show();
    }

Here is the call graph for this function:

Definition at line 121 of file PreeditWindow.java.

                             {
        return style;
    }

Definition at line 121 of file PreeditWindow.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.PreeditWindow.init ( ) [inline, package]

Definition at line 69 of file PreeditWindow.java.

                {
        window = new Dialog(new Frame(""));
        ((Dialog)window).setResizable(true);
        
        ((Dialog)window).setTitle("Preedit Window");
        
       Font font = new Font("Monospaced", Font.PLAIN, 12);
       
        FontMetrics 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 PreeditPane();
        pane.setFont(font);
        window.add(pane);

       window.pack();                
    }

Here is the caller graph for this function:

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

Definition at line 69 of file PreeditWindow.java.

                {
        window = new Dialog(new Frame(""));
        ((Dialog)window).setResizable(true);
        
        ((Dialog)window).setTitle("Preedit Window");
        
       Font font = new Font("Monospaced", Font.PLAIN, 12);
       
        FontMetrics 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 PreeditPane();
        pane.setFont(font);
        window.add(pane);

       window.pack();                
    }
void sun.awt.im.iiimp.PreeditWindow.preeditDone ( IIIMPreeditEvent  e) [inline]

Definition at line 96 of file PreeditWindow.java.

                                                {
    }
void sun.awt.im.iiimp.PreeditWindow.preeditDone ( IIIMPreeditEvent  e) [inline]

Definition at line 96 of file PreeditWindow.java.

                                                {
    }
void sun.awt.im.iiimp.PreeditWindow.preeditDraw ( IIIMPreeditEvent  e) [inline]

Definition at line 98 of file PreeditWindow.java.

                                                {
    }
void sun.awt.im.iiimp.PreeditWindow.preeditDraw ( IIIMPreeditEvent  e) [inline]

Definition at line 98 of file PreeditWindow.java.

                                                {
    }
void sun.awt.im.iiimp.PreeditWindow.preeditStart ( IIIMPreeditEvent  e) [inline]

Definition at line 94 of file PreeditWindow.java.

                                                 {
    }
void sun.awt.im.iiimp.PreeditWindow.preeditStart ( IIIMPreeditEvent  e) [inline]

Definition at line 94 of file PreeditWindow.java.

                                                 {
    }
void sun.awt.im.iiimp.PreeditWindow.setStyle ( String  style) [inline]

Definition at line 117 of file PreeditWindow.java.

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

Definition at line 117 of file PreeditWindow.java.

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

Reimplemented in sun.awt.im.iiimp.LookupWindow, and sun.awt.im.iiimp.LookupWindow.

Definition at line 66 of file IIIMWindow.java.

                             {
        if(window != null)
            window.setVisible(true);
    }
synchronized void sun.awt.im.iiimp.IIIMWindow.show ( ) [inline, package, inherited]

Reimplemented in sun.awt.im.iiimp.LookupWindow, and sun.awt.im.iiimp.LookupWindow.

Definition at line 66 of file IIIMWindow.java.

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

Member Data Documentation

Definition at line 58 of file PreeditWindow.java.

Definition at line 58 of file PreeditWindow.java.

Definition at line 61 of file PreeditWindow.java.

Definition at line 56 of file PreeditWindow.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 54 of file PreeditWindow.java.

Definition at line 51 of file IIIMWindow.java.


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