本文整理了Java中org.eclipse.swt.graphics.Color.<init>()
方法的一些代码示例,展示了Color.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Color.<init>()
方法的具体详情如下:
包路径:org.eclipse.swt.graphics.Color
类名称:Color
方法名:<init>
[英]Prevents uninitialized instances from being created outside the package.
[中]防止在包外部创建未初始化的实例。
代码示例来源:origin: pentaho/pentaho-kettle
/**
* Create a new managed color by using the Red Green & Blue values.
*
* @param display
* @param rgb
*/
public ManagedColor( Display display, RGB rgb ) {
this.color = new Color( display, rgb );
this.systemColor = false;
}
代码示例来源:origin: pentaho/pentaho-kettle
/**
* Create a new managed color by using the Red Green & Blue values.
*
* @param display
* @param r
* Red composite
* @param g
* Green composite
* @param b
* Blue composite
*/
public ManagedColor( Display display, int r, int g, int b ) {
this.color = new Color( display, r, g, b );
this.systemColor = false;
}
代码示例来源:origin: pentaho/pentaho-kettle
public Color getColor( int red, int green, int blue ) {
RGB rgb = new RGB( red, green, blue );
Color color = colorMap.get( rgb );
if ( color == null ) {
color = new Color( display, rgb );
colorMap.put( rgb, color );
}
return color;
}
代码示例来源:origin: pentaho/pentaho-kettle
private Color getDisabledColor() {
Device device = Display.getCurrent();
return new Color( device, 188, 188, 188 );
}
代码示例来源:origin: pentaho/pentaho-kettle
private Color getDisabledColor() {
Device device = Display.getCurrent();
return new Color( device, 188, 188, 188 );
}
代码示例来源:origin: pentaho/pentaho-kettle
private Color getColor( int r, int g, int b ) {
Color color = new Color( PropsUI.getDisplay(), new RGB( r, g, b ) );
int index = colors.indexOf( color );
if ( index < 0 ) {
colors.add( color );
} else {
color.dispose();
color = colors.get( index );
}
return color;
}
代码示例来源:origin: pentaho/pentaho-kettle
private Color getColor( int r, int g, int b ) {
Color color = new Color( PropsUI.getDisplay(), new RGB( r, g, b ) );
int index = colors.indexOf( color );
if ( index < 0 ) {
colors.add( color );
} else {
color.dispose();
color = colors.get( index );
}
return color;
}
代码示例来源:origin: pentaho/pentaho-kettle
public void handleEvent( Event event ) {
StyleRange style1 = new StyleRange();
style1.start = 0;
style1.length = 4;
style1.underline = false;
helpLabel.setStyleRange( style1 );
helpLabel.setForeground( new Color( display, 0, 94, 170 ) );
}
} );
代码示例来源:origin: pentaho/pentaho-kettle
public void widgetSelected( SelectionEvent arg0 ) {
tabColor.dispose();
tabColorRGB = new RGB( ConstUI.COLOR_TAB_RED, ConstUI.COLOR_TAB_GREEN, ConstUI.COLOR_TAB_BLUE );
tabColor = new Color( display, tabColorRGB );
wTabColor.setBackground( tabColor );
wTabColor.redraw();
}
} );
代码示例来源:origin: pentaho/pentaho-kettle
public void widgetSelected( SelectionEvent arg0 ) {
background.dispose();
backgroundRGB =
new RGB( ConstUI.COLOR_BACKGROUND_RED, ConstUI.COLOR_BACKGROUND_GREEN, ConstUI.COLOR_BACKGROUND_BLUE );
background = new Color( display, backgroundRGB );
wBGColor.setBackground( background );
wBGColor.redraw();
}
} );
代码示例来源:origin: pentaho/pentaho-kettle
public void widgetSelected( SelectionEvent arg0 ) {
graphColor.dispose();
graphColorRGB = new RGB( ConstUI.COLOR_GRAPH_RED, ConstUI.COLOR_GRAPH_GREEN, ConstUI.COLOR_GRAPH_BLUE );
graphColor = new Color( display, graphColorRGB );
wGrColor.setBackground( graphColor );
wGrColor.redraw();
}
} );
代码示例来源:origin: pentaho/pentaho-kettle
public void getData() {
fixedFontData = props.getFixedFont();
fixedFont = new Font( display, fixedFontData );
graphFontData = props.getGraphFont();
graphFont = new Font( display, graphFontData );
noteFontData = props.getNoteFont();
noteFont = new Font( display, noteFontData );
backgroundRGB = props.getBackgroundRGB();
if ( backgroundRGB == null ) {
backgroundRGB = display.getSystemColor( SWT.COLOR_WIDGET_BACKGROUND ).getRGB();
}
background = new Color( display, backgroundRGB );
graphColorRGB = props.getGraphColorRGB();
graphColor = new Color( display, graphColorRGB );
tabColorRGB = props.getTabColorRGB();
tabColor = new Color( display, tabColorRGB );
}
代码示例来源:origin: pentaho/pentaho-kettle
public void handleEvent( Event event ) {
StyleRange style1 = new StyleRange();
style1.start = 0;
style1.length = 4;
style1.underline = true;
helpLabel.setStyleRange( style1 );
helpLabel.setForeground( new Color( display, 0, 0, 0 ) );
helpLabel.setCursor( new Cursor( display, SWT.CURSOR_HAND ) );
}
} );
代码示例来源:origin: pentaho/pentaho-kettle
private void drawVersionWarning( GC gc, Display display ) {
gc.setBackground( versionWarningBackgroundColor );
gc.setForeground( new Color( display, 65, 65, 65 ) );
// gc.fillRectangle(290, 231, 367, 49);
// gc.drawRectangle(290, 231, 367, 49);
gc.drawImage( exclamation_image, 304, 243 );
gc.setFont( devWarningFont );
gc.drawText( BaseMessages.getString( PKG, "SplashDialog.DevelopmentWarning" ), 335, 241, true );
}
代码示例来源:origin: pentaho/pentaho-kettle
public void widgetSelected( SelectionEvent e ) {
ColorDialog cd = new ColorDialog( shell );
cd.setText( BaseMessages.getString( PKG, "NotePadDialog.Font.Color.Dialog.Label" ) );
cd.setRGB( wBorderColor.getBackground().getRGB() );
RGB newColor = cd.open();
if ( newColor == null ) {
return;
}
borderColor.dispose();
borderColor = new Color( shell.getDisplay(), newColor );
wBorderColor.setBackground( borderColor );
}
} );
代码示例来源:origin: pentaho/pentaho-kettle
public void widgetSelected( SelectionEvent e ) {
ColorDialog cd = new ColorDialog( shell );
cd.setText( BaseMessages.getString( PKG, "NotePadDialog.Font.Color.Dialog.Label" ) );
cd.setRGB( wBackGroundColor.getBackground().getRGB() );
RGB newColor = cd.open();
if ( newColor == null ) {
return;
}
bgColor.dispose();
bgColor = new Color( shell.getDisplay(), newColor );
wBackGroundColor.setBackground( bgColor );
refreshTextNote();
}
} );
代码示例来源:origin: pentaho/pentaho-kettle
public void widgetSelected( SelectionEvent e ) {
ColorDialog cd = new ColorDialog( shell );
cd.setText( BaseMessages.getString( PKG, "NotePadDialog.Font.Color.Dialog.Label" ) );
cd.setRGB( wFontColor.getBackground().getRGB() );
RGB newColor = cd.open();
if ( newColor == null ) {
return;
}
fontColor.dispose();
fontColor = new Color( shell.getDisplay(), newColor );
wFontColor.setBackground( fontColor );
refreshTextNote();
}
} );
代码示例来源:origin: pentaho/pentaho-kettle
public void widgetSelected( SelectionEvent arg0 ) {
ColorDialog cd = new ColorDialog( shell );
cd.setRGB( props.getBackgroundRGB() );
RGB newbg = cd.open();
if ( newbg != null ) {
backgroundRGB = newbg;
background.dispose();
background = new Color( display, backgroundRGB );
wBGColor.setBackground( background );
wBGColor.redraw();
}
}
} );
代码示例来源:origin: pentaho/pentaho-kettle
public void widgetSelected( SelectionEvent arg0 ) {
ColorDialog cd = new ColorDialog( shell );
cd.setRGB( props.getGraphColorRGB() );
RGB newbg = cd.open();
if ( newbg != null ) {
graphColorRGB = newbg;
graphColor.dispose();
graphColor = new Color( display, graphColorRGB );
wGrColor.setBackground( graphColor );
wGrColor.redraw();
}
}
} );
代码示例来源:origin: pentaho/pentaho-kettle
public void widgetSelected( SelectionEvent arg0 ) {
ColorDialog cd = new ColorDialog( shell );
cd.setRGB( props.getTabColorRGB() );
RGB newbg = cd.open();
if ( newbg != null ) {
tabColorRGB = newbg;
tabColor.dispose();
tabColor = new Color( display, tabColorRGB );
wTabColor.setBackground( tabColor );
wTabColor.redraw();
}
}
} );
内容来源于网络,如有侵权,请联系作者删除!