📄 namedrgb.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 + -