本文整理汇总了Java中org.eclipse.jface.preference.ColorSelector.getColorValue方法的典型用法代码示例。如果您正苦于以下问题:Java ColorSelector.getColorValue方法的具体用法?Java ColorSelector.getColorValue怎么用?Java ColorSelector.getColorValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jface.preference.ColorSelector
的用法示例。
在下文中一共展示了ColorSelector.getColorValue方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onSelectColor
import org.eclipse.jface.preference.ColorSelector; //导入方法依赖的package包/类
private void onSelectColor(final ColorSelector colorSelector, final int valueColorIndex) {
// update model
final ColorValue colorValue = _mapColorWorkingCopy.getColorValues()[4 - valueColorIndex];
final RGB selectedRGB = colorSelector.getColorValue();
colorValue.red = selectedRGB.red;
colorValue.green = selectedRGB.green;
colorValue.blue = selectedRGB.blue;
updateUI();
updateUI_LegendImage();
updateModelFromUI();
doLiveUpdate();
}
示例2: performApply
import org.eclipse.jface.preference.ColorSelector; //导入方法依赖的package包/类
@Override
public void performApply()
{
IConfigurationManager conf = getConfigurationManager();
for (GuiColorKey key : GuiColorKey.values())
{
ColorSelector selector = m_colorSelectors[key.ordinal()];
RGB rgb = selector.getColorValue();
conf.setGuiColor(key, rgb);
}
}
示例3: performApply
import org.eclipse.jface.preference.ColorSelector; //导入方法依赖的package包/类
@Override
public void performApply()
{
IConfigurationManager conf = getConfigurationManager();
for (StatusColorKey key : StatusColorKey.values())
{
ColorSelector selector = m_colorSelectors[key.ordinal()];
RGB rgb = selector.getColorValue();
conf.setColor(key.getPreferenceName(), rgb);
}
}
示例4: performApply
import org.eclipse.jface.preference.ColorSelector; //导入方法依赖的package包/类
@Override
public void performApply()
{
IConfigurationManager conf = getConfigurationManager();
for (ExecutorStatus key : ExecutorStatus.values())
{
ColorSelector selector = m_colorSelectors[key.ordinal()];
RGB rgb = selector.getColorValue();
conf.setColor(ProcColorKey.getPreferenceName(key), rgb);
}
}
示例5: getColorValue
import org.eclipse.jface.preference.ColorSelector; //导入方法依赖的package包/类
/**
* @param colorSelector
* @return Returns the color value of the {@link ColorSelector} or -1 when the color is black
*/
private int getColorValue(final ColorSelector colorSelector) {
final RGB rgb = colorSelector.getColorValue();
colorSelector.getButton().setToolTipText(rgb.toString());
final int colorValue = ((rgb.red & 0xFF) << 0) | ((rgb.green & 0xFF) << 8) | ((rgb.blue & 0xFF) << 16);
return colorValue == 0 ? -1 : colorValue;
}