org.eclipse.swt.graphics.Color.dispose()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(5.3k)|赞(0)|评价(0)|浏览(190)

本文整理了Java中org.eclipse.swt.graphics.Color.dispose()方法的一些代码示例,展示了Color.dispose()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Color.dispose()方法的具体详情如下:
包路径:org.eclipse.swt.graphics.Color
类名称:Color
方法名:dispose

Color.dispose介绍

暂无

代码示例

代码示例来源:origin: pentaho/pentaho-kettle

public void widgetDisposed( DisposeEvent arg0 ) {
  red.dispose();
  green.dispose();
  blue.dispose();
  white.dispose();
  gray.dispose();
  black.dispose();
 }
} );

代码示例来源:origin: pentaho/pentaho-kettle

void disposeColors() {
 for ( int i = 0; i < colors.length; i++ ) {
  colors[i].dispose();
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

private void disposeColors( Collection<Color> colors ) {
 for ( Color color : colors ) {
  color.dispose();
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

void disposeColors() {
 for ( int i = 0; i < colors.length; i++ ) {
  colors[i].dispose();
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

void disposeColors() {
 for ( int i = 0; i < colors.length; i++ ) {
  colors[i].dispose();
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

/**
 * Free the managed resource if it hasn't already been done and if this is not a system color
 *
 */
public void dispose() {
 // System color and already disposed off colors don't need to be disposed!
 if ( !systemColor && !color.isDisposed() ) {
  color.dispose();
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

public void dispose() {
 fixedFont.dispose();
 graphFont.dispose();
 noteFont.dispose();
 background.dispose();
 graphColor.dispose();
 tabColor.dispose();
 shell.dispose();
}

代码示例来源:origin: pentaho/pentaho-kettle

public void dispose() {
 props.setScreen( new WindowProperty( shell ) );
 fontColor.dispose();
 bgColor.dispose();
 borderColor.dispose();
 if ( font != null && !font.isDisposed() ) {
  font.dispose();
 }
 shell.dispose();
}

代码示例来源: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 widgetDisposed( DisposeEvent arg0 ) {
  kettle_image.dispose();
  kettle_icon.dispose();
  exclamation_image.dispose();
  verFont.dispose();
  licFont.dispose();
  devWarningFont.dispose();
  versionWarningForegroundColor.dispose();
  versionWarningBackgroundColor.dispose();
 }
} );

代码示例来源: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 dispose() {
 gc.dispose();
 if ( transform != null && transform.isDisposed() == false ) {
  transform.dispose();
 }
 for ( Color color : colors ) {
  color.dispose();
 }
 for ( Font font : fonts ) {
  font.dispose();
 }
}

代码示例来源: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 dispose() {
 gc.dispose();
 if ( transform != null && transform.isDisposed() == false ) {
  transform.dispose();
 }
 for ( Color color : colors ) {
  color.dispose();
 }
 for ( Font font : fonts ) {
  font.dispose();
 }
}

代码示例来源: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 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 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();
  }
 }
} );

相关文章