⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 abstracttrackercell.java

📁 java 文件下载器。可自定义
💻 JAVA
字号:
// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space 
// Source File Name:   AbstractTrackerCell.java

package org.gudy.azureus2.ui.swt.views.tableitems.mytorrents;

import java.net.URL;
import org.gudy.azureus2.core3.download.DownloadManager;
import org.gudy.azureus2.core3.download.DownloadManagerTrackerListener;
import org.gudy.azureus2.core3.torrent.TOTorrent;
import org.gudy.azureus2.core3.tracker.client.TRTrackerAnnouncerResponse;
import org.gudy.azureus2.core3.tracker.client.TRTrackerScraperResponse;
import org.gudy.azureus2.plugins.ui.tables.*;

abstract class AbstractTrackerCell
	implements TableCellRefreshListener, TableCellToolTipListener, TableCellDisposeListener, DownloadManagerTrackerListener
{

	TableCell cell;
	DownloadManager dm;

	public AbstractTrackerCell(TableCell cell)
	{
		this.cell = cell;
		cell.addListeners(this);
		dm = (DownloadManager)cell.getDataSource();
		if (dm == null)
		{
			return;
		} else
		{
			dm.addTrackerListener(this);
			return;
		}
	}

	public void announceResult(TRTrackerAnnouncerResponse trtrackerannouncerresponse)
	{
	}

	public boolean checkScrapeResult(TRTrackerScraperResponse response)
	{
		if (response != null)
		{
			TableCell cell_ref = cell;
			if (cell_ref == null)
				return false;
			DownloadManager dm = (DownloadManager)cell.getDataSource();
			if (dm == null || dm != this.dm)
				return false;
			TOTorrent torrent = dm.getTorrent();
			if (torrent == null)
				return false;
			URL announceURL = torrent.getAnnounceURL();
			URL responseURL = response.getURL();
			if (announceURL != responseURL && announceURL != null && responseURL != null && !announceURL.toString().equals(responseURL.toString()))
			{
				return false;
			} else
			{
				cell_ref.invalidate();
				return response.isValid();
			}
		} else
		{
			return false;
		}
	}

	public void refresh(TableCell cell)
	{
		DownloadManager oldDM = dm;
		dm = (DownloadManager)cell.getDataSource();
		if (dm != oldDM)
		{
			if (oldDM != null)
				oldDM.removeTrackerListener(this);
			if (dm != null)
				dm.addTrackerListener(this);
		}
	}

	public void cellHover(TableCell tablecell)
	{
	}

	public void cellHoverComplete(TableCell cell)
	{
		cell.setToolTip(null);
	}

	public void dispose(TableCell cell)
	{
		if (this.dm != null)
			this.dm.removeTrackerListener(this);
		DownloadManager dm = (DownloadManager)cell.getDataSource();
		if (dm != null && dm != this.dm)
			dm.removeTrackerListener(this);
		dm = null;
		cell = null;
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -