About the right-click menu of contactitem

I develop a plugin to simulate the “cantact” tab.

In the plugin class “ExamplePluginNew.java”,here is the initialize() method:

public void initialize() {

System.out.println(“Welcome To Spark”);

EventQueue.invokeLater(new Runnable() {


public void run() {


Organization organization = new Organization();




here Class Organization is almost the same as the ContactList.java except the initialize() in Organization.java:

public void initialize() {


// Add Contact List
boolean show = localPreferences.isEmptyGroupsShown();

    // Hide all Offline Users

// Add a subscription listener.


However , after I construct the new tab , the right-click menu of contactitem can not be showed.That is to say ,the showpop() method is not called.

Can somebody help me? I don’t know why. The attachment is the Organization.java and ExamplePluginNew.java. Thank you very much.

Organization.java.zip (15728 Bytes)
ExamplePluginNew.java.zip (1174 Bytes)

Need help. Can anybody help me? Thank you very much.


looks like something doesnt register with the ContactList

Check if this method is called

public void fireContactItemClicked(ContactItem contactItem) {

for (ContactListListener contactListListener : new ArrayList(contactListListeners)) {




Thank you very much. But I said it was the right-click menu. So I think the method is (in ContackGroup.java)

private void firePopupEvent(MouseEvent e, ContactItem item) {

for (ContactGroupListener contactGroupListener : new ArrayList(listeners)) {

contactGroupListener.showPopup(e, item);



which is called in private void checkPopup(MouseEvent e) (in ContackGroup.java)

and all the key eventlisteners are registed in the Constructor method

public ContactGroup(String groupName)(in ContackGroup.java)

So it seems that all the methods are registed and I don’t know why the right-click menu of contackitem is not work.

still need help