public EventAdapter(JTextField tf, JTable tbl) { boolean autoIme = Project.getBoolean("autoIme", true); if (autoIme) { tf.addFocusListener(AutoKanjiListener.getInstance()); } else { tf.addFocusListener(AutoRomanListener.getInstance()); } tf.addActionListener(EventAdapter.this); tbl.getSelectionModel().addListSelectionListener(EventAdapter.this); tbl.addMouseListener(EventAdapter.this); }