Package nu.fw.jeti.jabber

Examples of nu.fw.jeti.jabber.JIDStatus


          public void run()
          {
            ChatWindow w = (ChatWindow) tabs.getSelectedComponent();
            if(w!=null)
            {
              JIDStatus j = w.getJIDStatus();
              window.setTitle(j.getNick());
              window.setIconImage(StatusIcons.getStatusIcon(j).getImage());
              tabs.setBackgroundAt(tabs.getSelectedIndex()
                ,UIManager.getColor("TabbedPane.background"));
              tabs.setForegroundAt(tabs.getSelectedIndex()
                ,UIManager.getColor("TabbedPane.foreground"));
View Full Code Here


    JID from = message.getFrom();
    if (message.getType().equals("chat") || (message.getType().equals("error") && message.getThread() != null))
    {
      beep();
      ChatWindow chatWindow;
      JIDStatus jidStatus = backend.getJIDStatus(message.getFrom());
      String server = from.getDomain();
      if(server.indexOf("conference")>-1 ||
        server.indexOf("private")>-1 ||
        server.indexOf("groupchat")>-1)
      {//private messages from groupchat should have a window per resource
View Full Code Here

  }
 
  /*--------------------Status Change events----------------------------------*/
  public void presenceChanged(Presence presence)
  {
    JIDStatus jidStatus = backend.getJIDStatus(presence.getFrom());
    String nick = null;
    if (jidStatus != null) nick = jidStatus.getNick();
    if (nick == null) nick = presence.getFrom().getUser();
    if(jetiFrame!=null) jetiFrame.initTimer(nick,Presence.toLongShow(presence.getShow()));
    //beep();
    //chatWindows.presenceChanged(presence);
  }
View Full Code Here

  }

  private void fireOnSubscriptionRequestEvent(final JID from, final String id)
  {

    JIDStatus jidStatus = backend.getJIDStatus(from);
    if (jidStatus != null)
    {
      Popups.OptionChoosed choose = new Popups.OptionChoosed()
      {
        public void optionChoosed(int option)
        {
          String type = "subscribed";
          if (option == javax.swing.JOptionPane.YES_OPTION)
            type = "unsubscribed";
          sendSubscribed(from, type, id);
        }
      };

      Object[] options = { I18N.gettext("main.popup.Deny_subscription"), I18N.gettext("OK") };
      Popups.showOptionDialog(
        MessageFormat.format(I18N.gettext("main.popup.{0}_wants_to_subscribe_to_your_presence"),new Object[]{jidStatus.getNick()}),
        I18N.gettext("main.popup.Subscription_request"),
        javax.swing.JOptionPane.YES_NO_OPTION,
        javax.swing.JOptionPane.QUESTION_MESSAGE,
        null,
        options,
View Full Code Here

    if (path != null)
    {
      Object o = path.getLastPathComponent();
      if(o instanceof PrimaryJIDStatus)
      {
        JIDStatus jidStatus = ((PrimaryJIDStatus)o).getJIDPrimaryStatus();
        return "<HTML><P>" + I18N.gettext("main.main.roster.Status")
            + " " + Presence.toLongShow(jidStatus.getShow())+"</p><p>" +
            I18N.gettext("main.main.statusmenu.Status_message")
            + " " + jidStatus.getStatus()
            + "</p><p> JID: " + jidStatus.getJID() + "</p><p>"
            + I18N.gettext("main.main.roster.Subscription")
            + " " + jidStatus.getSubscription()  + "</p><p>"
            + I18N.gettext("main.main.roster.Waiting_Status")
            + " " + jidStatus.getWaiting() + "</p></HTML>";
       
      }
     }
    return null;
  }
View Full Code Here

            handleError(messageElement);
            return;
        }

    getRootPane().setDefaultButton(jButton1);
    JIDStatus jidStatus = backend.getJIDStatus(messageElement.getFrom());
    jid = messageElement.getFrom();
    if (jidStatus == null || jidStatus.getNick() == null ) {
            if (jid.getResource() != null) {
                user = jid.getUser() + "/" + jid.getResource();
            } else {
                user = jid.getUser();
            }
    } else {
            user = jidStatus.getNick();
        }
    String subject = messageElement.getSubject();
    if (subject == null) {
            setTitle(user);
    } else {
View Full Code Here

    jidTree = new JIDStatusTree();
    server.clear();
    for (Iterator i = roster.getItems(); i.hasNext();)
    {
      RosterItem item = (RosterItem) i.next();
      JIDStatus jidStatus = new NormalJIDStatus(item);
      jidStatussen.put(item.getJID(), jidStatus);
      if (item.getJID().getUser() == null)
      {
        //server /transport
        server.addServerNoFire(jidStatus);
View Full Code Here

  {//call update??
    jid = item.getJID();
    completeJID = jid;
    show = Presence.UNAVAILABLE;
    resource = completeJID.getResource();
    JIDStatus server = Roster.getJIDStatus(new JID(jid.getDomain()));
    if(server == null) type =null;
    else type = server.getType();
    update(item);
  }
View Full Code Here

       this.nickname = jid.toString();
    }
    show = Presence.UNAVAILABLE;
    resource = completeJID.getResource();
    //System.out.println("jidstatus made");
    JIDStatus server = Roster.getJIDStatus(new JID(jid.getDomain()));
    if(server == null) type =null;
    else type = server.getType();
  }
View Full Code Here

      {
        try
        {
          if(message.getBody() == null)return;
          String nick = message.getFrom().getUser();
          JIDStatus jidStatus = Backend.getJIDStatus(message.getFrom());
          if(jidStatus!=null) nick = jidStatus.getNick();
          if(nick == null)return;
          synthesizer1.resume();
          synthesizer1.speakPlainText(nick + " says  ", null);
          synthesizer1.speakPlainText(message.getBody(), null);
          synthesizer1.waitEngineState(Synthesizer.QUEUE_EMPTY);
View Full Code Here

TOP

Related Classes of nu.fw.jeti.jabber.JIDStatus

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.