Package nu.fw.jeti.backend.roster

Examples of nu.fw.jeti.backend.roster.JIDStatusGroup


  {//error message
    if(tree!=null && !tree.existGroup(I18N.gettext("main.error.Error")))
    {//cannont use groupAdded because that needs invokeAndWait for the roster to work
    //this doesn't work with invokeAndWait because an error fired from the eventdispatch
    //thread causes an deadlock  
      final JIDStatusGroup group = tree.getGroup(I18N.gettext("main.error.Error"));
      Runnable updateAComponent = new Runnable() {
      public void run()
        {
          int len = treeModelListeners.size();
          TreeModelEvent e = new TreeModelEvent(this,new Object[] {tree},new int[] {tree.indexOfGroup(group)}, new Object[]{group});
View Full Code Here


 
  public void remove()
  {
    if(tree!=null && tree.existGroup(I18N.gettext("main.error.Error")))
    {
      JIDStatusGroup group = tree.getGroup(I18N.gettext("main.error.Error"));
      int index = tree.indexOfGroup(group);
      tree.removeGroup(group);
      groupDeleted(group,index);
    }
  }
View Full Code Here

              else expandPath(selPath);
            }
          }
          else
          {
            JIDStatusGroup group = null;
            JIDStatus jidStatus = null;
            if (o instanceof PrimaryJIDStatus)
            {
              group = ((JIDStatusGroup) selPath.getPathComponent(selPath.getPathCount() - 2));
              jidStatus = ((PrimaryJIDStatus) o).getJIDPrimaryStatus();
            }
            else if (o instanceof JIDStatus)
            {
              group = ((JIDStatusGroup) selPath.getPathComponent(selPath.getPathCount() - 3));
              jidStatus = (JIDStatus)o;
            }
            else return;
            maybeShowPopup(e, jidStatus, group);//cde
           
            if (SwingUtilities.isLeftMouseButton(e))
            {
              lastTreePath = selPath;
              //check if double or single mouseclick, needed
              // because double click= 2 single clicks
              if (timer.isRunning())
              {
                timer.stop();
                sendChat(jidStatus);
              }
              else
              {
                timer.restart();
              }
            }
          }
        }
      }

      public void mouseReleased(MouseEvent e)
      {
        TreePath selPath = getPathForLocation(e.getX(), e.getY());
        if (selPath != null)
        {
          Object o = selPath.getLastPathComponent();
          if (o instanceof JIDStatusGroup)
          {//group
            maybeShowGroupPopup(e, (JIDStatusGroup) o);
          }
          if (o instanceof PrimaryJIDStatus)
          {
            JIDStatusGroup group = ((JIDStatusGroup) selPath.getPathComponent(selPath.getPathCount() - 2));
            maybeShowPopup(e, ((PrimaryJIDStatus) o).getJIDPrimaryStatus(), group);
          }
          else if (o instanceof JIDStatus)
          {
            JIDStatusGroup group = ((JIDStatusGroup) selPath.getPathComponent(selPath.getPathCount() - 3));
            maybeShowPopup(e, (JIDStatus) o, group);
          }
        }
      }
View Full Code Here

          return fill;
        }
        return makeComponent(jidsStatus);
      } else if (value instanceof JIDStatusGroup)
      {
        JIDStatusGroup group = (JIDStatusGroup) value;
        if (onlineTree)
        {
          if (group.getOnlines() == 0) return fill;
          text = group.toString() + " ("
          + group.getOnlines() + ")";
          renderer.setText(text);
      //    renderer.setPreferredSize(new Dimension(fontMetrics.stringWidth(text)+20,fontMetrics.getHeight()));
          //renderer.setPreferredSize(new Dimension(300,fontMetrics.getHeight()));
        }
        if (expanded) renderer.setIcon(StatusIcons
View Full Code Here

        }
        return makeComponent(jidsStatus);
      }
      else if (value instanceof JIDStatusGroup)
      {
        JIDStatusGroup group = (JIDStatusGroup) value;
        if (onlineTree) {
          renderer.setText(group.toString() + " ("
                                     + group.getOnlines() + ")");
        }
        if (expanded) {
                    renderer.setIcon(StatusIcons.getImageIcon("arrowDown"));
        } else {
                    renderer.setIcon(StatusIcons.getImageIcon("arrowUp"));
View Full Code Here

TOP

Related Classes of nu.fw.jeti.backend.roster.JIDStatusGroup

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.