Package net.sphene.goim.rcp.ui.ContactList

Examples of net.sphene.goim.rcp.ui.ContactList.EntryMenu


      public void mouseDown(MouseEvent e) {
        Word word = getWordTypeOfEvent(e);
        if(word != null) {
          if(word.type == Word.WordType.JID) {
            if(!isMe(word.word)) {
              EntryMenu menu = (EntryMenu) chatParticipantStatus
                  .getParent().getData("entryMenu");
              RosterEntry entry = account.xmpp.getRoster().getEntry(
                  StringUtils.parseBareAddress(word.word));
              menu.open(account,entry,word.word);
            }
          }
          // ...
        }
      }
View Full Code Here


              String user = event.location.substring(7);
              // System.out.println(user + " vs. " +
              // chat.getParticipant());
              if (chat != null && StringUtils.parseBareAddress(user)
                .equals(StringUtils.parseBareAddress(chat.getJID()))) {
                EntryMenu menu = (EntryMenu) chatParticipantStatus
                    .getParent().getData("entryMenu");
                menu
                    .open(
                        account,
                        account.xmpp
                            .getRoster()
                            .getEntry(
                                StringUtils
                                    .parseBareAddress(user)),
                        null);
              }
            } else if (event.location.startsWith("http://")) {
              try {
                PlatformUI.getWorkbench().getBrowserSupport().getExternalBrowser().openURL(new URL(event.location));
              } catch (Exception e) {
                e.printStackTrace();
                throw new RuntimeException(e);
              }
              event.doit = false;
            }
          }
        });
    chatHistory.addMouseListener(new org.eclipse.swt.events.MouseAdapter() {
      public void mouseUp(org.eclipse.swt.events.MouseEvent e) {
        System.out.println("Data: " + e.data);
      }
    });
    Menu menu = new Menu(chatHistory.getShell(),SWT.POP_UP);
    // TODO add context menu to chat history ..
    menu.addListener(SWT.Show, new Listener() {
      public void handleEvent(Event event) {
       
      }
    });
    chatHistory.setMenu(menu);
View Full Code Here

    contactList = new Tree(contactListGroup,SWT.FULL_SELECTION);
    contactList.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
   
    contactListGroup.setBackground(contactList.getBackground());
   
    entryMenu = new EntryMenu(contactList);
   
    final TreeColumn jid = new TreeColumn(contactList,SWT.LEFT);
    jid.setText("JID");
    contactList.addListener(SWT.Resize,new Listener() {
View Full Code Here

TOP

Related Classes of net.sphene.goim.rcp.ui.ContactList.EntryMenu

Copyright © 2018 www.massapicom. 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.