Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.MenuItem.addListener()


        }
      });
     
      MenuItem remove = new MenuItem(entryMenu,SWT.PUSH);
      remove.setText("Remove Contact");
      remove.addListener(SWT.Selection,new Listener() {
        public void handleEvent(Event event) {
          activeAccount.xmpp.removeContact(selectedEntry,entryMenu.getShell());
        }
      });
     
View Full Code Here


          Presence presence = new Presence(Presence.Type.SUBSCRIBE);
          presence.setTo(StringUtils.parseBareAddress(selectedEntry.getUser()));
          activeAccount.xmpp.getConnection().sendPacket(presence);
        }
      });
      authRemove.addListener(SWT.Selection,new Listener() {
        public void handleEvent(Event event) {
          Presence presence = new Presence(Presence.Type.UNSUBSCRIBED);
          presence.setTo(StringUtils.parseBareAddress(selectedEntry.getUser()));
          activeAccount.xmpp.getConnection().sendPacket(presence);
        }
View Full Code Here

      addToGroupItem.setMenu(addToGroup);
      MenuItem createGroup = new MenuItem(addToGroup,SWT.PUSH);
      createGroup.setText("New Group");
      createGroup.setData("constant",true);
      new MenuItem(addToGroup,SWT.SEPARATOR).setData("constant",true);
      createGroup.addListener(SWT.Selection,new Listener() {
        public void handleEvent(Event event) {
          InputDialog dialog = new InputDialog(
              addToGroup.getShell(),
              "Create Group",
              "Name for the newly created Group",
View Full Code Here

        RosterGroup group = (RosterGroup)groups.next();
        if(!group.contains(selectedEntry)) {
          MenuItem item = new MenuItem(addToGroup,SWT.PUSH);
          item.setData("group",group);
          item.setText(group.getName());
          item.addListener(SWT.Selection,addToGroupListener);
        }
      }
     
      groups = selectedEntry.getGroups();
      if(!groups.hasNext()) {
View Full Code Here

      while(groups.hasNext()) {
        RosterGroup group = (RosterGroup)groups.next();
        MenuItem item = new MenuItem(removeFromGroup,SWT.PUSH);
        item.setData("group",group);
        item.setText(group.getName());
        item.addListener(SWT.Selection,removeFromGroupListener);
      }
    }
  }

  protected void delAccountSection(GOIMAccount account) {
View Full Code Here

              if(r != InputDialog.OK) return;
              String reason = inputDialog.getValue();
              muc.invite(jid,reason);
            }
          });
          autoJoin.addListener(SWT.Selection,new Listener() {
            public void handleEvent(Event event) {
              if(!autoJoin.getSelection()) {
                //autoJoin.setSelection(false);
                MUCUtils.removeFromAutoJoinList(MUCBrowserGUI.this.account,muc.getRoom());
              } else {
View Full Code Here

    Menu contextMenu = new Menu(userList);
    userList.setMenu(contextMenu);

    MenuItem chatWith = new MenuItem(contextMenu, SWT.PUSH);
    chatWith.setText("Chat With..");
    chatWith.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        System.out.println("Open chat with: " + selectedUser);
        account.chatWindowExtensionManager.openChatWindow(selectedUser,false);
      }
    });
View Full Code Here

      }
    });

    MenuItem viewCard = new MenuItem(contextMenu, SWT.PUSH);
    viewCard.setText("View VCard");
    viewCard.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        new vCardGUI(account, muc.getRoom() + "/" + selectedUser);
      }
    });
View Full Code Here

    Menu mucMenu = new Menu(mucItem);
    mucItem.setMenu(mucMenu);

    MenuItem kick = new MenuItem(mucMenu, SWT.PUSH);
    kick.setText("Kick");
    kick.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        // TODO finish this
        try {
          muc.kickParticipant(selectedUser, "");
        } catch (XMPPException e) {
View Full Code Here

      }
    });

    MenuItem ban = new MenuItem(mucMenu, SWT.PUSH);
    ban.setText("Ban");
    ban.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        // TODO finish this

      }
    });
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.