namedrgb.java
来自「利用它可以做出非常漂亮的swt界面,包含的组件有PShelf Plist」· Java 代码 · 共 50 行
JAVA
50 行
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 + =
减小字号Ctrl + -
显示快捷键?