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

📄 namedrgb.java

📁 利用它可以做出非常漂亮的swt界面,包含的组件有PShelf Plist
💻 JAVA
字号:
package com.swtplus.widgets.combo;

import org.eclipse.swt.graphics.RGB;

/**
 * NamedRGB represents a (you guessed it) named RGB value.  This value object
 * is used in conjunction with the ColorComboStrategy.  
 */
public class NamedRGB {
	
	private RGB rgb;
	private String name;
	
	/**
	 * Creates a NamedRGB with the given name and rgb value.
	 * 
	 * @param name
	 * @param rgb
	 */
	public NamedRGB(String name,RGB rgb) {
		this.rgb = rgb;
		this.name = name;
	}
	
	/**
	 * Returns the name.
	 * 
	 * @return
	 */
	public String getName() {
		return name;
	}
	/**
	 * Returns the RGB.
	 * 
	 * @return
	 */
	public RGB getRGB() {
		return rgb;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		return name + " {" + rgb.red +"," + rgb.green +"," + rgb.blue +"}";
	}

}

⌨️ 快捷键说明

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