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

x33g5p2x  于2022-01-28 转载在 其他  
字(1.2k)|赞(0)|评价(0)|浏览(148)

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

RGB.toString介绍

[英]Returns a string containing a concise, human-readable description of the receiver.
[中]

代码示例

代码示例来源:origin: org.apache.directory.studio/ldapbrowser.common

/**
 * Use this method to get SWT colors. A ColorRegistry is used to manage
 * the RGB->Color mapping.
 * <p>
 * Note: Don't dispose the returned color. It is disposed automatically
 * when the plugin is stopped.
 *
 * @param rgb
 *                the rgb color data
 * @return The SWT Color
 */
public Color getColor( RGB rgb )
{
  if ( !colorRegistry.hasValueFor( rgb.toString() ) )
  {
    colorRegistry.put( rgb.toString(), rgb );
  }
  return colorRegistry.get( rgb.toString() );
}

代码示例来源:origin: org.apache.directory.studio/ldifeditor

/**
 * Use this method to get SWT colors. A ColorRegistry is used to manage
 * the RGB->Color mapping.
 * <p>
 * Note: Don't dispose the returned color. It is disposed automatically
 * when the plugin is stopped.
 * 
 * @param rgb
 *                the rgb color data
 * @return The SWT Color
 */
public Color getColor( RGB rgb )
{
  if ( !colorRegistry.hasValueFor( rgb.toString() ) )
  {
    colorRegistry.put( rgb.toString(), rgb );
  }
  return colorRegistry.get( rgb.toString() );
}

相关文章