/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setColor ( RGB newColor )
{
RGB oldColor = color;
color = newColor;
if ( eNotificationRequired () )
eNotify ( new ENotificationImpl ( this, Notification.SET, ChartPackage.LINE_PROPERTIES__COLOR, oldColor, color ) );
}
java类org.eclipse.swt.graphics.RGB的实例源码
LinePropertiesImpl.java 文件源码
项目:neoscada
阅读 22
收藏 0
点赞 0
评论 0
ChartImpl.java 文件源码
项目:neoscada
阅读 23
收藏 0
点赞 0
评论 0
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setBackgroundColor ( RGB newBackgroundColor )
{
RGB oldBackgroundColor = backgroundColor;
backgroundColor = newBackgroundColor;
if ( eNotificationRequired () )
eNotify ( new ENotificationImpl ( this, Notification.SET, ChartPackage.CHART__BACKGROUND_COLOR, oldBackgroundColor, backgroundColor ) );
}
ChartFactoryImpl.java 文件源码
项目:neoscada
阅读 23
收藏 0
点赞 0
评论 0
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object createFromString ( EDataType eDataType, String initialValue )
{
switch ( eDataType.getClassifierID () )
{
case ChartPackage.PROFILE_SWITCHER_TYPE:
return createProfileSwitcherTypeFromString ( eDataType, initialValue );
case ChartPackage.RGB:
return createRGBFromString ( eDataType, initialValue );
default:
throw new IllegalArgumentException ( "The datatype '" + eDataType.getName () + "' is not a valid classifier" ); //$NON-NLS-1$ //$NON-NLS-2$
}
}
ChartFactoryImpl.java 文件源码
项目:neoscada
阅读 24
收藏 0
点赞 0
评论 0
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated NOT
*/
public String convertRGBToString ( final EDataType eDataType, final Object instanceValue )
{
final RGB rgb = (RGB)instanceValue;
if ( rgb == null )
{
return null;
}
return String.format ( "#%02X%02X%02X", rgb.red, rgb.green, rgb.blue ); //$NON-NLS-1$
}
TransitionEditPart.java 文件源码
项目:bdf2
阅读 25
收藏 0
点赞 0
评论 0
@Override
protected IFigure createFigure() {
final PolylineConnection connection = new PolylineConnection();
connection.setConnectionRouter(new BendpointConnectionRouter());
PolygonDecoration decoration = new PolygonDecoration();
decoration.setTemplate(new PointList(new int[]{0, 0, -2, 2, -2, 0, -2, -2, 0, 0}));
RGB rgb=Activator.getPreference().getTransitionColor();
decoration.setBackgroundColor(new Color(null,rgb));
connection.setTargetDecoration(decoration);
connection.setAntialias(SWT.ON);
connection.setForegroundColor(new Color(null,rgb));
return connection;
}
PrintProcessor.java 文件源码
项目:neoscada
阅读 24
收藏 0
点赞 0
评论 0
private void drawChart ( final Device device, final GC gc, final double minX, final double maxX, final Calendar startTimestamp, final Calendar endTimestamp )
{
final Rectangle bounds = device.getBounds ();
final Color color = new Color ( device, new RGB ( 0, 0, 0 ) );
final Rectangle drawBounds = new Rectangle ( bounds.x + 10, bounds.y + 10, bounds.width - 20, bounds.height - 20 );
gc.setForeground ( color );
gc.drawRectangle ( drawBounds );
for ( final Map.Entry<String, List<Double>> row : this.values.entrySet () )
{
drawRow ( device, gc, row.getKey (), row.getValue (), drawBounds, minX, maxX );
}
}
VisualInterfaceViewer.java 文件源码
项目:neoscada
阅读 34
收藏 0
点赞 0
评论 0
private void applyColor ( final Symbol symbol )
{
final RGB color = org.eclipse.scada.vi.ui.draw2d.primitives.Helper.makeColor ( symbol.getBackgroundColor () );
if ( color != null )
{
this.canvas.setBackground ( this.manager.createColor ( color ) );
}
}
ColorUtil.java 文件源码
项目:eclipse-bash-editor
阅读 35
收藏 0
点赞 0
评论 0
public static String convertToHexColor(RGB rgb) {
if (rgb == null) {
return null;
}
String hex = String.format("#%02x%02x%02x", rgb.red, rgb.green, rgb.blue);
return hex;
}
BashSourceViewerConfiguration.java 文件源码
项目:eclipse-bash-editor
阅读 23
收藏 0
点赞 0
评论 0
public void updateTextScannerDefaultColorToken() {
if (gradleScanner == null) {
return;
}
RGB color = getPreferences().getColor(COLOR_NORMAL_TEXT);
gradleScanner.setDefaultReturnToken(createColorToken(color));
}
Colors.java 文件源码
项目:BiglyBT
阅读 24
收藏 0
点赞 0
评论 0
public AllocateColor(String sName, final Color colorDefault, Color colorOld) {
this.sName = sName;
Utils.execSWTThread(new AERunnable() {
@Override
public void runSupport() {
if (!colorDefault.isDisposed())
AllocateColor.this.rgbDefault = colorDefault.getRGB();
else
AllocateColor.this.rgbDefault = new RGB(0, 0, 0);
}
}, false);
}