本文整理了Java中java.awt.Toolkit.getColorModel()
方法的一些代码示例,展示了Toolkit.getColorModel()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Toolkit.getColorModel()
方法的具体详情如下:
包路径:java.awt.Toolkit
类名称:Toolkit
方法名:getColorModel
[英]Determines the color model of this toolkit's screen.
ColorModel
is an abstract class that encapsulates the ability to translate between the pixel values of an image and its red, green, blue, and alpha components.
This toolkit method is called by the getColorModel
method of the Component
class.
[中]确定此工具包屏幕的颜色模型。ColorModel
是一个抽象类,它封装了在图像的像素值及其红、绿、蓝和阿尔法分量之间进行转换的能力。
这个工具箱方法由Component
类的getColorModel
方法调用。
代码示例来源:origin: UISpec4J/UISpec4J
public ColorModel getColorModel() throws HeadlessException {
return getUnderlyingToolkit().getColorModel();
}
代码示例来源:origin: com.fifesoft.rtext/fife.common
/**
* Checks and answers whether we have a true color system.
*
* @param c the component used to determine the toolkit
* @return true if the component's toolkit has a pixel size >= 24
*/
public static boolean isTrueColor(Component c) {
return c.getToolkit().getColorModel().getPixelSize() >= 24;
}
代码示例来源:origin: net.java.dev.laf-widget/laf-widget
/**
* Checks and answers whether we have a true color system.
*
* @param c
* the component used to determine the toolkit
* @return true if the component's toolkit has a pixel size >= 24
*/
public static boolean isTrueColor(Component c) {
return c.getToolkit().getColorModel().getPixelSize() >= 24;
}
代码示例来源:origin: com.incors/kunstoff-laf
/**
* Returns true if the display uses 24- or 32-bit color depth (= true color)
*/
public static boolean isToolkitTrueColor(Component c) {
int pixelsize = c.getToolkit().getColorModel().getPixelSize();
return pixelsize >= 24;
}
}
内容来源于网络,如有侵权,请联系作者删除!