Package com.aelitis.azureus.core.subs

Examples of com.aelitis.azureus.core.subs.Subscription


    cell.setMarginHeight(0);
  }

  // @see org.gudy.azureus2.plugins.ui.tables.TableCellRefreshListener#refresh(org.gudy.azureus2.plugins.ui.tables.TableCell)
  public void refresh(TableCell cell) {
    Subscription sub = (Subscription) cell.getDataSource();

    boolean isRead = sub.getHistory().getNumUnread() > 0;
    int sortVal = isRead ? 1 : 0;

    if (!cell.setSortValue(sortVal) && cell.isValid()) {
      return;
    }
View Full Code Here


    setMinWidth(300);
  }

  public void refresh(TableCell cell) {
    String name = null;
    Subscription sub = (Subscription) cell.getDataSource();
    if (sub != null) {
      name = sub.getName();
    }
    if (name == null) {
      name = "";
    }
View Full Code Here

   
    bounds.width -= (imageWidth + 5);
   
    GCStringPrinter.printString(gc, cell.getSortValue().toString(), bounds,true,false,SWT.LEFT);
   
    Subscription sub = (Subscription) cell.getDataSource();
   
    if ( sub != null && !sub.isSearchTemplate()){

      gc.drawImage(viewImage, bounds.x + bounds.width, bounds.y + bounds.height / 2 - imageHeight / 2);
    }
   
    imageLoader.releaseImage("ic_view");
View Full Code Here

    if (event.eventType == TableCellMouseEvent.EVENT_MOUSEUP
        && event.button == 1) {
      TableCell cell = event.cell;
      int cellWidth = cell.getWidth();
      if(event.x > cellWidth - imageWidth - 5 && event.x < cellWidth - 5) {
        Subscription sub = (Subscription) cell.getDataSource();
        if(sub != null && !sub.isSearchTemplate()){
          String key = "Subscription_" + ByteFormatter.encodeString(sub.getPublicKey());
          MultipleDocumentInterface mdi = UIFunctionsManager.getUIFunctions().getMDI();
          if (mdi != null) {
            mdi.showEntryByID(key);
          }
        }
View Full Code Here

    setAlignment(ALIGN_TRAIL);
  }

  public void refresh(TableCell cell) {
    int nbResults = 0;
    Subscription sub = (Subscription) cell.getDataSource();
    if (sub != null) {
      nbResults = sub.getHistory().getNumUnread();
    }

    if (!cell.setSortValue(nbResults) && cell.isValid()) {
      return;
    }
View Full Code Here

    setMaxWidth(100);
  }

  public void refresh(TableCell cell) {
    boolean autoDownload = false;
    Subscription sub = (Subscription) cell.getDataSource();
    if (sub != null) {
      SubscriptionHistory history = sub.getHistory();
      if(history != null) {
        autoDownload = history.isAutoDownload();
      }
    }
View Full Code Here

    setAlignment(ALIGN_TRAIL);
  }

  public void refresh(TableCell cell) {
    int nbResults = 0;
    Subscription sub = (Subscription) cell.getDataSource();
    if (sub != null) {
      nbResults = sub.getHistory().getNumUnread() + sub.getHistory().getNumRead();
    }

    if (!cell.setSortValue(nbResults) && cell.isValid()) {
      return;
    }
View Full Code Here

    TableCell   cell,
    long     timestamp )
  {
    timestamp = 0;
       
    Subscription sub = (Subscription) cell.getDataSource();
   
    if ( sub != null ){

      timestamp = sub.getHistory().getLastScanTime();
    }

    if (!cell.setSortValue(timestamp) && cell.isValid()) {
      return;
    }
View Full Code Here

    setMaxWidth(100);
  }

  public void refresh(TableCell cell) {
    int nbResults = 0;
    Subscription sub = (Subscription) cell.getDataSource();
    String category = null;
    if (sub != null) {
      category = sub.getCategory();
    }
   
    if ( category == null ){
      category = "";
    }
View Full Code Here

    setMaxWidth(100);
  }

  public void refresh(TableCell cell) {
    int nbSubsribers = 0;
    Subscription sub = (Subscription) cell.getDataSource();
    if (sub != null) {
      nbSubsribers = (int) sub.getCachedPopularity();
    }

    if (!cell.setSortValue(nbSubsribers) && cell.isValid()) {
      return;
    }
View Full Code Here

TOP

Related Classes of com.aelitis.azureus.core.subs.Subscription

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.