VE 1.1 add named inner class listener [message #111225] |
Sat, 19 November 2005 15:14 |
Eclipse User |
|
|
|
Originally posted by: lange.maine.edu
Hello
I have Eclipse 3.1 and VE 1.1. I have a Java Swing class (inherited
from JFrame). Inside this class, I have a private inner named class that
is set up as follows:
private class CheckBoxHandler implements ItemListener
Inside I write the code for the method itemStateChanged.
I then do:
CheckBoxHandler handler = new CheckBoxHandler();
Now when I right click on a particular check box in Design View and click
Events > AddEvent I cannot see my handler to add. In fact the radio
button
for Add existing Listener is greyed out. I have to add my own code to add
my listener as in:
myCheckBox.addItemListener(handler);
Now when I want to view the listeners, in the Java Bean View I select
Expert Events and can see from the icon type and wording that the above
CheckBoxHandler is the one that is used
From the documentation in Eclipse for the VE for Swing, it appears that
one can only add anonymous inner class listeners by right clicking on a
check box (or whatever). Is this correct?
Thank You,
Gail
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03175 seconds