当前位置: 首页>>代码示例>>Java>>正文


Java ColorSelector.getColorValue方法代码示例

本文整理汇总了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();
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:18,代码来源:DialogMap2ColorEditor.java

示例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);
	}
}
 
开发者ID:Spacecraft-Code,项目名称:SPELL,代码行数:12,代码来源:GUIColorsPreferencePage.java

示例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);
	}
}
 
开发者ID:Spacecraft-Code,项目名称:SPELL,代码行数:12,代码来源:StatusColorsPreferencePage.java

示例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);
	}
}
 
开发者ID:Spacecraft-Code,项目名称:SPELL,代码行数:12,代码来源:ProcedureColorsPreferencePage.java

示例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;
}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:15,代码来源:DialogMPProfile.java


注:本文中的org.eclipse.jface.preference.ColorSelector.getColorValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。