示例#1
0
  public void removeFromShare(VuzeBuddy buddy) {

    if (null != buddy) {
      for (Iterator iterator = avatarWidgets.iterator(); iterator.hasNext(); ) {
        AvatarWidget widget = (AvatarWidget) iterator.next();
        if (null != widget.getVuzeBuddy()) {
          if (true == buddy.getLoginID().equals(widget.getVuzeBuddy().getLoginID())) {
            if (sharePage != null) {
              sharePage.removeBuddy(widget.getVuzeBuddy());
            }
            widget.setSharedAlready(false);
            break;
          }
        }
      }
    }
  }
示例#2
0
  public void addToShare(AvatarWidget widget) {
    /*if (null == sharePage) {
    	SkinView detailPanelView = SkinViewManager.getByClass(DetailPanel.class);
    	if (detailPanelView instanceof DetailPanel) {
    		DetailPanel detailPanel = ((DetailPanel) detailPanelView);
    		sharePage = (SharePage) detailPanel.getPage(SharePage.PAGE_ID);

    	} else {
    		throw new IllegalArgumentException(
    				"Oops.. looks like the DetailPanel skin is not properly initialized");
    	}
    }*/
    if (sharePage != null) {
      sharePage.addBuddy(widget.getVuzeBuddy());
    }
    widget.setSharedAlready(true);
  }
示例#3
0
  public void setShareMode(boolean isShareMode, SharePage sharePage) {

    this.sharePage = sharePage;

    if (this.isShareMode != isShareMode) {
      this.isShareMode = isShareMode;
      for (Iterator iterator = avatarWidgets.iterator(); iterator.hasNext(); ) {
        AvatarWidget widget = (AvatarWidget) iterator.next();
        if (false == isShareMode) {
          widget.setSharedAlready(false);
        }
        widget.refreshVisual();
      }

      if (true == isShareMode) {
        setEditMode(false);
        setAddBuddyMode(false);
      }
    }
  }
示例#4
0
 public void removeFromShare(AvatarWidget widget) {
   if (sharePage != null) {
     sharePage.removeBuddy(widget.getVuzeBuddy());
   }
   widget.setSharedAlready(false);
 }