[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-awt-dev
Subject:    <AWT Dev> Proposal: Input Method switch popup menu patch
From:       Ichiroh Takiguchi <takiguc () linux ! vnet ! ibm ! com>
Date:       2018-06-19 11:50:27
Message-ID: 591b52020b980e5405823e3e9862e891 () linux ! vnet ! ibm ! com
[Download RAW message or body]

Hello,
IBM would like to contribute Input Method (IM) switch popup menu patch 
to OpenJDK project.

Issue:
Please try following steps to recreate the issue
Prerequisite:
Download CityIM.jar [1] and InputMethodHotKey.jar [2]
Run InputMethodHotKey.jar to set IM hotkey, like
$ java -jar InputMethodHotKey.jar
(Hotkey, like Shift+F4)

Testcase is as follows:
======
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class IMFTestB {
   IMFTestB(Component comp, int width, int height, int x, int y) {
     Frame f = comp instanceof JComponent ? new JFrame() : new Frame();
     f.setTitle(comp.getClass().getSimpleName());
     f.add(comp);
     f.setSize(width, height);
     f.setLocation(x, y);
     f.addWindowListener(new WindowAdapter() {
       public void windowClosing(WindowEvent we) {
         System.exit(0);
       }
     });
     f.setVisible(true);
   }
   public static void main(String[] args) {
     new IMFTestB(new JTextArea(), 300, 200, 0, 0);
     new IMFTestB(new JButton("JButton"), 300, 200, 300, 0);
     new IMFTestB(new TextArea(), 300, 200, 0, 200);
     Canvas canvas = new Canvas();
     canvas.addKeyListener(new KeyAdapter() { });
     new IMFTestB(canvas, 300, 200, 300, 200);
   }
}
======

1. Compile and run IMFTestB Jwith CityIM.jar
$ java -cp .:CityIM.jar IMFTestB
2. Click JTextArea window
3. Press Shift+F4 key to display IM Switch popup menu is displayed
4. Item can be changed by up and down arrow key
5. Press Shift+F4 key again, then arrow key does not wok
6. Try same thing on JButton window
7. It's OK for TextArea window and Canvas window.

Reason:
2nd IM popup menu is displayed by 4th step

I'd like contribute following 2 files:
M 
src/java.desktop/share/classes/sun/awt/im/ExecutableInputMethodManager.java
M src/java.desktop/share/classes/sun/awt/im/InputMethodPopupMenu.java
http://cr.openjdk.java.net/~aleonard/im_popup/webrev.00/

I appreciate any feedback please, and how I would go about obtaining a 
sponsor and contributor?

[1] 
https://docs.oracle.com/javase/1.5.0/docs/guide/imf/spi-tutorial.html#Sample%20Code
[2] http://javadesktop.org/articles/InputMethod/index.html

Thanks,
Ichiroh Takiguchi
IBM Japan, Ltd.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic