Package com.aelitis.azureus.activities

Examples of com.aelitis.azureus.activities.VuzeActivitiesEntry


  // @see org.gudy.azureus2.plugins.ui.tables.TableCellMouseListener#cellMouseTrigger(org.gudy.azureus2.plugins.ui.tables.TableCellMouseEvent)
  public void cellMouseTrigger(final TableCellMouseEvent event) {
    if (event.eventType == TableRowMouseEvent.EVENT_MOUSEDOWN
        && event.button == 1) {
      VuzeActivitiesEntry entry = (VuzeActivitiesEntry) event.cell.getDataSource();

      if (entry.canFlipRead()) {
        entry.setRead(!entry.isRead());
        event.cell.invalidate();
      }
    }
  }
View Full Code Here


    }
  }

  // @see org.gudy.azureus2.ui.swt.views.tableitems.ColumnDateSizer#refresh(org.gudy.azureus2.plugins.ui.tables.TableCell, long)
  public void refresh(TableCell cell, long timestamp) {
    VuzeActivitiesEntry entry = (VuzeActivitiesEntry) cell.getDataSource();
    timestamp = entry.getTimestamp();

    super.refresh(cell, timestamp);
  }
View Full Code Here

    sp.printString();
    gc.setFont(null);
  }
 
  private GCStringPrinter setupStringPrinter(GC gc, TableCellSWT cell) {
    VuzeActivitiesEntry entry = (VuzeActivitiesEntry) cell.getDataSource();
    String text = entry.getText();
    Rectangle drawBounds = getDrawBounds(cell);
   
    if (!entry.isRead()) {
      if (font == null) {
        FontData[] fontData = gc.getFont().getFontData();
        fontData[0].setStyle(SWT.BOLD);
        font = new Font(gc.getDevice(), fontData);
      }
View Full Code Here

    return sp;
  }

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

    cell.setSortValue(entry.getText());
  }
View Full Code Here

  // @see org.gudy.azureus2.plugins.ui.tables.TableCellMouseListener#cellMouseTrigger(org.gudy.azureus2.plugins.ui.tables.TableCellMouseEvent)
  public void cellMouseTrigger(TableCellMouseEvent event) {
    String tooltip = null;
    boolean invalidateAndRefresh = false;

    VuzeActivitiesEntry entry = (VuzeActivitiesEntry) event.cell.getDataSource();
    //Rectangle bounds = getDrawBounds((TableCellSWT) event.cell);
    Rectangle bounds = ((TableCellSWT) event.cell).getBounds();

    String text = entry.getText();

    GC gc = new GC(Display.getDefault());
    GCStringPrinter sp = null;
    try {
      sp = setupStringPrinter(gc, (TableCellSWT) event.cell);
    } catch (Exception e) {
      Debug.out(e);
    } finally {
      gc.dispose();
    }

    if (sp != null) {
      URLInfo hitUrl = sp.getHitUrl(event.x + bounds.x, event.y + bounds.y);
      int newCursor;
      if (hitUrl != null) {
        boolean ourUrl = UrlFilter.getInstance().urlCanRPC(hitUrl.url)
            || hitUrl.url.startsWith("/") || hitUrl.url.startsWith("#");
        if (event.eventType == TableCellMouseEvent.EVENT_MOUSEDOWN) {
          if (!ourUrl) {
            Utils.launch(hitUrl.url);
          } else {
            UIFunctionsSWT uif = UIFunctionsManagerSWT.getUIFunctionsSWT();
            if (uif != null) {
              String target = hitUrl.target;
              if (target == null) {
                target = ContentNetworkUtils.getTarget(entry.getContentNetwork());
              }
              uif.viewURL(hitUrl.url, target, "column.activity.text");
              return;
            }
          }
View Full Code Here

      btnReadAll.addSelectionListener(new SWTSkinButtonUtility.ButtonListenerAdapter() {
        public void pressed(SWTSkinButtonUtility buttonUtility,
            SWTSkinObject skinObject, int stateMask) {
          VuzeActivitiesEntry[] allEntries = VuzeActivitiesManager.getAllEntries();
          for (int i = 0; i < allEntries.length; i++) {
            VuzeActivitiesEntry entry = allEntries[i];
            entry.setRead(true);
          }
        }
      });
    }
View Full Code Here

TOP

Related Classes of com.aelitis.azureus.activities.VuzeActivitiesEntry

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.