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

📄 configsectioninterfacecolor.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:   ConfigSectionInterfaceColor.java

package org.gudy.azureus2.ui.swt.views.configsections;

import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.*;
import org.gudy.azureus2.core3.config.COConfigurationManager;
import org.gudy.azureus2.ui.swt.Messages;
import org.gudy.azureus2.ui.swt.config.ColorParameter;
import org.gudy.azureus2.ui.swt.mainwindow.Colors;
import org.gudy.azureus2.ui.swt.plugins.UISWTConfigSection;

public class ConfigSectionInterfaceColor
	implements UISWTConfigSection
{

	private static final String sColorsToOverride[] = {
		"progressBar", "error", "warning", "altRow"
	};
	private Color colorsToOverride[];
	private Button btnColorReset[];

	public ConfigSectionInterfaceColor()
	{
		colorsToOverride = (new Color[] {
			Colors.colorProgressBar, Colors.colorError, Colors.colorWarning, Colors.colorAltRow
		});
		btnColorReset = new Button[sColorsToOverride.length];
	}

	public String configSectionGetParentSection()
	{
		return "style";
	}

	public String configSectionGetName()
	{
		return "color";
	}

	public void configSectionSave()
	{
	}

	public void configSectionDelete()
	{
	}

	public int maxUserMode()
	{
		return 0;
	}

	public Composite configSectionCreate(Composite parent)
	{
		Composite cSection = new Composite(parent, 0);
		cSection.setLayoutData(new GridData(1808));
		GridLayout layout = new GridLayout();
		layout.numColumns = 1;
		cSection.setLayout(layout);
		Composite cArea = new Composite(cSection, 0);
		layout = new GridLayout();
		layout.marginHeight = 0;
		layout.marginWidth = 0;
		layout.numColumns = 2;
		cArea.setLayout(layout);
		cArea.setLayoutData(new GridData());
		Label label = new Label(cArea, 0);
		Messages.setLanguageText(label, "ConfigView.section.color");
		ColorParameter colorScheme = new ColorParameter(cArea, "Color Scheme", 0, 128, 255);
		GridData gridData = new GridData();
		gridData.widthHint = 50;
		colorScheme.setLayoutData(gridData);
		Group cColorOverride = new Group(cArea, 0);
		Messages.setLanguageText(cColorOverride, "ConfigView.section.style.colorOverrides");
		layout = new GridLayout();
		layout.numColumns = 3;
		cColorOverride.setLayout(layout);
		gridData = new GridData(256);
		gridData.horizontalSpan = 2;
		cColorOverride.setLayoutData(gridData);
		for (int i = 0; i < sColorsToOverride.length; i++)
		{
			String sConfigID = (new StringBuilder()).append("Colors.").append(sColorsToOverride[i]).toString();
			label = new Label(cColorOverride, 0);
			Messages.setLanguageText(label, (new StringBuilder()).append("ConfigView.section.style.colorOverride.").append(sColorsToOverride[i]).toString());
			ColorParameter colorParm = new ColorParameter(cColorOverride, sConfigID, colorsToOverride[i].getRed(), colorsToOverride[i].getGreen(), colorsToOverride[i].getBlue()) {

				final ConfigSectionInterfaceColor this$0;

				public void newColorChosen()
				{
					COConfigurationManager.setParameter((new StringBuilder()).append(sParamName).append(".override").toString(), true);
					int i = 0;
					do
					{
						if (i >= ConfigSectionInterfaceColor.sColorsToOverride.length)
							break;
						if (sParamName.equals((new StringBuilder()).append("Colors.").append(ConfigSectionInterfaceColor.sColorsToOverride[i]).toString()))
						{
							btnColorReset[i].setEnabled(true);
							break;
						}
						i++;
					} while (true);
				}

			
			{
				this$0 = ConfigSectionInterfaceColor.this;
				super(x0, x1, x2, x3, x4);
			}
			};
			gridData = new GridData();
			gridData.widthHint = 50;
			colorParm.setLayoutData(gridData);
			btnColorReset[i] = new Button(cColorOverride, 8);
			Messages.setLanguageText(btnColorReset[i], "ConfigView.section.style.colorOverrides.reset");
			btnColorReset[i].setEnabled(COConfigurationManager.getBooleanParameter((new StringBuilder()).append(sConfigID).append(".override").toString(), false));
			btnColorReset[i].setData("ColorName", sConfigID);
			btnColorReset[i].addListener(13, new Listener() {

				final ConfigSectionInterfaceColor this$0;

				public void handleEvent(Event event)
				{
					Button btn = (Button)event.widget;
					String sName = (String)btn.getData("ColorName");
					if (sName != null)
					{
						COConfigurationManager.setParameter((new StringBuilder()).append(sName).append(".override").toString(), false);
						btn.setEnabled(false);
					}
				}

			
			{
				this$0 = ConfigSectionInterfaceColor.this;
				super();
			}
			});
		}

		return cSection;
	}



}

⌨️ 快捷键说明

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