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

📄 trackerstatusitem.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:   TrackerStatusItem.java

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

import com.aelitis.azureus.core.util.AZ3Functions;
import org.gudy.azureus2.core3.download.DownloadManager;
import org.gudy.azureus2.core3.tracker.client.TRTrackerAnnouncerResponse;
import org.gudy.azureus2.core3.tracker.client.TRTrackerScraperResponse;
import org.gudy.azureus2.plugins.download.Download;
import org.gudy.azureus2.plugins.ui.tables.*;
import org.gudy.azureus2.ui.swt.views.table.TableCellSWT;
import org.gudy.azureus2.ui.swt.views.table.utils.CoreTableColumn;

// Referenced classes of package org.gudy.azureus2.ui.swt.views.tableitems.mytorrents:
//			TrackerCellUtils, AbstractTrackerCell

public class TrackerStatusItem extends CoreTableColumn
	implements TableCellAddedListener, TableCellToolTipListener, TableCellMouseMoveListener
{
	private class Cell extends AbstractTrackerCell
	{

		final TrackerStatusItem this$0;

		public void refresh(TableCell cell)
		{
			super.refresh(cell);
			String status = dm != null ? dm.getTrackerStatus() : "";
			int nl_pos = status.indexOf('\n');
			if (nl_pos >= 0)
				status = status.substring(0, nl_pos);
			if (cell.setText(status) || !cell.isValid())
				TrackerCellUtils.updateColor(cell, dm, true);
		}

		public void scrapeResult(TRTrackerScraperResponse response)
		{
			checkScrapeResult(response);
		}

		public void announceResult(TRTrackerAnnouncerResponse response)
		{
			cell.invalidate();
		}

		public Cell(TableCell cell)
		{
			this$0 = TrackerStatusItem.this;
			super(cell);
		}
	}


	public static final Class DATASOURCE_TYPE = org/gudy/azureus2/plugins/download/Download;
	public static final String COLUMN_ID = "tracker";

	public TrackerStatusItem(String sTableID)
	{
		super(DATASOURCE_TYPE, "tracker", 1, 90, sTableID);
		setRefreshInterval(15);
	}

	public void fillTableColumnInfo(TableColumnInfo info)
	{
		info.addCategories(new String[] {
			"tracker"
		});
		info.setProficiency((byte)1);
	}

	public void cellAdded(TableCell cell)
	{
		new Cell(cell);
	}

	public void cellMouseTrigger(TableCellMouseEvent event)
	{
		Object ds = event.cell.getDataSource();
		if (!(ds instanceof DownloadManager))
			return;
		DownloadManager dm = (DownloadManager)ds;
		com.aelitis.azureus.core.util.AZ3Functions.provider az3 = AZ3Functions.getProvider();
		if (az3 == null || !az3.canShowCDP(dm))
			return;
		if (!(event.cell instanceof TableCellSWT))
			return;
		TableCellSWT cell = (TableCellSWT)event.cell;
		boolean invalidateAndRefresh = false;
		int newCursor = dm.isUnauthorisedOnTracker() ? 21 : 0;
		int oldCursor = cell.getCursorID();
		if (oldCursor != newCursor)
		{
			invalidateAndRefresh = true;
			cell.setCursorID(newCursor);
		}
		if (event.eventType == 1 && newCursor == 21)
			az3.showCDP(dm, "tracker.unauth");
		if (invalidateAndRefresh)
		{
			cell.invalidate();
			cell.redraw();
		}
	}

	public void cellHover(TableCell cell)
	{
		DownloadManager dm = (DownloadManager)cell.getDataSource();
		cell.setToolTip(TrackerCellUtils.getTooltipText(cell, dm, true));
	}

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

}

⌨️ 快捷键说明

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