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

📄 logalert.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:   LogAlert.java

package org.gudy.azureus2.core3.logging;

import com.aelitis.azureus.core.util.GeneralUtils;
import java.util.ArrayList;
import org.gudy.azureus2.core3.config.COConfigurationManager;
import org.gudy.azureus2.pluginsimpl.local.PluginCoreUtils;

public class LogAlert
	implements org.gudy.azureus2.plugins.logging.LogAlert
{

	public static final int AT_INFORMATION = 0;
	public static final int AT_WARNING = 1;
	public static final int AT_ERROR = 3;
	public static final boolean REPEATABLE = true;
	public static final boolean UNREPEATABLE = false;
	public int entryType;
	public Throwable err;
	public boolean repeatable;
	public String text;
	public Object relatedTo[];
	public int timeoutSecs;

	public LogAlert(boolean repeatable, int type, String text)
	{
		err = null;
		timeoutSecs = -1;
		entryType = type;
		this.text = text;
		this.repeatable = repeatable;
	}

	public LogAlert(boolean repeatable, int type, String text, int timeoutSecs)
	{
		err = null;
		this.timeoutSecs = -1;
		entryType = type;
		this.text = text;
		this.repeatable = repeatable;
		this.timeoutSecs = timeoutSecs;
	}

	public LogAlert(Object relatedTo[], boolean repeatable, int type, String text)
	{
		this(repeatable, type, text);
		this.relatedTo = relatedTo;
	}

	public LogAlert(Object relatedTo, boolean repeatable, int type, String text)
	{
		this(repeatable, type, text);
		this.relatedTo = (new Object[] {
			relatedTo
		});
	}

	public LogAlert(boolean repeatable, String text, Throwable err)
	{
		this(repeatable, 3, text);
		this.err = err;
	}

	public LogAlert(boolean repeatable, int type, String text, Throwable err)
	{
		this(repeatable, type, text);
		this.err = err;
	}

	public LogAlert(Object relatedTo, boolean repeatable, String text, Throwable err)
	{
		this(repeatable, text, err);
		this.relatedTo = (new Object[] {
			relatedTo
		});
	}

	public int getGivenTimeoutSecs()
	{
		return timeoutSecs;
	}

	public String getText()
	{
		return text;
	}

	public Throwable getError()
	{
		return err;
	}

	public int getType()
	{
		switch (entryType)
		{
		case 0: // '\0'
			return 1;

		case 3: // '\003'
			return 3;

		case 1: // '\001'
			return 2;

		case 2: // '\002'
		default:
			return 1;
		}
	}

	public Object[] getContext()
	{
		if (relatedTo == null)
			return null;
		ArrayList l = new ArrayList();
		for (int i = 0; i < relatedTo.length; i++)
			l.add(PluginCoreUtils.convert(relatedTo[i], false));

		return l.toArray();
	}

	public int getTimeoutSecs()
	{
		if (timeoutSecs != -1)
			return timeoutSecs;
		else
			return COConfigurationManager.getIntParameter("Message Popup Autoclose in Seconds");
	}

	public String getPlainText()
	{
		return GeneralUtils.stripOutHyperlinks(text);
	}
}

⌨️ 快捷键说明

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