软件包 | 描述 |
---|---|
java.awt |
包含创建用户界面和绘制图形和图像的所有类。
|
javax.accessibility |
定义用户界面组件和提供对这些组件的访问的辅助技术之间的一个合同。
|
javax.swing |
提供了一套“轻量级”(所有的java语言)组件,以最大可能的程度,在所有平台上工作。
|
javax.swing.border |
提供用于绘图的类和接口,以绘制一个摆动组件的专门边框。
|
javax.swing.colorchooser |
包含由
JColorChooser 组件使用的类和接口。
|
javax.swing.plaf |
提供一个接口和抽象类的使用许多摆动为可插拔的外观和感觉的能力。
|
javax.swing.plaf.basic |
根据基本的外观和感觉提供内置的用户界面对象。
|
javax.swing.plaf.metal |
提供用户界面对象建立根据java的外观和感觉(一次代号为金属),它是默认的外观和感觉。
|
javax.swing.plaf.nimbus |
提供用户界面对象建立跨平台的灵气的外观和感觉。
|
javax.swing.plaf.synth |
它是一个可更换皮肤的外观和感觉的绘画是授。
|
javax.swing.table |
处理
javax.swing.JTable 提供类和接口。
|
javax.swing.text |
提供类和接口处理编辑和不可编辑的文本组件。
|
javax.swing.text.html |
提供类
HTMLEditorKit 和创建HTML文本编辑器支持类。
|
javax.swing.tree |
处理
javax.swing.JTree 提供类和接口。
|
Modifier and Type | Class and Description |
---|---|
class |
SystemColor
一种封装在系统中表示原生图形对象颜色的符号颜色的类。
|
Modifier and Type | Field and Description |
---|---|
static Color |
Color.black
颜色黑色。
|
static Color |
Color.BLACK
颜色黑色。
|
static Color |
Color.blue
蓝色的颜色。
|
static Color |
Color.BLUE
蓝色的颜色。
|
static Color |
Color.cyan
颜色青色。
|
static Color |
Color.CYAN
颜色青色。
|
static Color |
Color.DARK_GRAY
颜色深灰色。
|
static Color |
Color.darkGray
颜色深灰色。
|
static Color |
Color.gray
颜色灰色。
|
static Color |
Color.GRAY
颜色灰色。
|
static Color |
Color.green
绿色的颜色。
|
static Color |
Color.GREEN
绿色的颜色。
|
static Color |
Color.LIGHT_GRAY
颜色浅灰色。
|
static Color |
Color.lightGray
颜色浅灰色。
|
static Color |
Color.magenta
颜色红色。
|
static Color |
Color.MAGENTA
颜色红色。
|
static Color |
Color.orange
橙色的颜色。
|
static Color |
Color.ORANGE
橙色的颜色。
|
static Color |
Color.pink
粉红色的颜色。
|
static Color |
Color.PINK
粉红色的颜色。
|
static Color |
Color.red
红色的。
|
static Color |
Color.RED
红色的。
|
static Color |
Color.white
白色的颜色。
|
static Color |
Color.WHITE
白色的颜色。
|
static Color |
Color.yellow
颜色黄色。
|
static Color |
Color.YELLOW
颜色黄色。
|
Modifier and Type | Method and Description |
---|---|
Color |
Color.brighter()
创建一个新的
Color 是光明版的这
Color 。
|
Color |
Color.darker()
创建一个新的
Color ,黑版这
Color 。
|
static Color |
Color.decode(String nm)
将
String 整数并返回指定的不透明的
Color 。
|
Color |
List.AccessibleAWTList.AccessibleAWTListChild.getBackground()
获取此对象的背景颜色。
|
abstract Color |
Graphics2D.getBackground()
返回用于清除区域的背景色。
|
Color |
Window.getBackground()
获取此窗口的背景颜色。
|
Color |
TextComponent.getBackground()
获取此文本组件的背景颜色。
|
Color |
MenuComponent.AccessibleAWTMenuComponent.getBackground()
获取此对象的背景颜色。
|
Color |
Component.getBackground()
获取此组件的背景颜色。
|
Color |
Component.AccessibleAWTComponent.getBackground()
获取此对象的背景颜色。
|
abstract Color |
Graphics.getColor()
获取此图形上下文的当前颜色。
|
static Color |
Color.getColor(String nm)
在系统属性中查找颜色。
|
static Color |
Color.getColor(String nm, Color v)
在系统属性中查找颜色。
|
static Color |
Color.getColor(String nm, int v)
在系统属性中查找颜色。
|
Color |
GradientPaint.getColor1()
将颜色C1的点P1锚。
|
Color |
GradientPaint.getColor2()
将颜色C2的点P2锚。
|
Color[] |
MultipleGradientPaint.getColors()
返回此梯度使用的颜色数组的副本。
|
Color |
List.AccessibleAWTList.AccessibleAWTListChild.getForeground()
获取此对象的前景色。
|
Color |
MenuComponent.AccessibleAWTMenuComponent.getForeground()
获取此对象的前景色。
|
Color |
Component.getForeground()
获取此组件的前景色。
|
Color |
Component.AccessibleAWTComponent.getForeground()
获取此对象的前景色。
|
static Color |
Color.getHSBColor(float h, float s, float b)
创建一个基于HSB颜色模型指定的值
Color 对象。
|
Color |
Robot.getPixelColor(int x, int y)
返回给定屏幕坐标下的像素的颜色。
|
Modifier and Type | Method and Description |
---|---|
abstract boolean |
Graphics.drawImage(Image img, int x, int y, Color bgcolor, ImageObserver observer)
提请尽可能多的指定的图像,是目前可用。
|
abstract boolean |
Graphics.drawImage(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer)
绘制已缩放到适合在指定的矩形内的指定图像的大部分区域。
|
abstract boolean |
Graphics.drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bgcolor, ImageObserver observer)
吸引尽可能多的指定区域,指定的图像是目前可用的,缩放在飞放在指定区域的目标的表面。
|
static Color |
Color.getColor(String nm, Color v)
在系统属性中查找颜色。
|
void |
Dialog.setBackground(Color bgColor)
设置此窗口的背景颜色。
|
void |
List.AccessibleAWTList.AccessibleAWTListChild.setBackground(Color c)
设置此对象的背景颜色。
|
abstract void |
Graphics2D.setBackground(Color color)
设置为
Graphics2D 上下文的背景颜色。
|
void |
Window.setBackground(Color bgColor)
设置此窗口的背景颜色。
|
void |
TextComponent.setBackground(Color c)
设置此文本组件的背景颜色。
|
void |
MenuComponent.AccessibleAWTMenuComponent.setBackground(Color c)
设置此对象的背景颜色。
|
void |
Component.setBackground(Color c)
设置此组件的背景颜色。
|
void |
Component.AccessibleAWTComponent.setBackground(Color c)
设置此对象的背景颜色。
|
void |
Frame.setBackground(Color bgColor)
设置此窗口的背景颜色。
|
abstract void |
Graphics.setColor(Color c)
将此图形上下文的当前颜色设置为指定的颜色。
|
void |
List.AccessibleAWTList.AccessibleAWTListChild.setForeground(Color c)
设置此对象的前景色。
|
void |
MenuComponent.AccessibleAWTMenuComponent.setForeground(Color c)
设置此对象的前景色。
|
void |
Component.setForeground(Color c)
设置此组件的前景色。
|
void |
Component.AccessibleAWTComponent.setForeground(Color c)
设置此对象的前景色。
|
abstract void |
Graphics.setXORMode(Color c1)
设置此图形上下文的绘制模式,以在该图形上下文的当前颜色和新指定颜色之间交替进行。
|
Constructor and Description |
---|
GradientPaint(float x1, float y1, Color color1, float x2, float y2, Color color2)
构建一个简单的循环
GradientPaint 对象。
|
GradientPaint(float x1, float y1, Color color1, float x2, float y2, Color color2, boolean cyclic)
构建一个环或无环
GradientPaint 对象根据
boolean 参数。
|
GradientPaint(Point2D pt1, Color color1, Point2D pt2, Color color2)
构建一个简单的循环
GradientPaint 对象。
|
GradientPaint(Point2D pt1, Color color1, Point2D pt2, Color color2, boolean cyclic)
构建一个环或无环
GradientPaint 对象根据
boolean 参数。
|
LinearGradientPaint(float startX, float startY, float endX, float endY, float[] fractions, Color[] colors)
构建一个与默认
NO_CYCLE 重复法和
SRGB 颜色空间
LinearGradientPaint 。
|
LinearGradientPaint(float startX, float startY, float endX, float endY, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod)
构建一个与默认
SRGB 颜色空间
LinearGradientPaint 。
|
LinearGradientPaint(Point2D start, Point2D end, float[] fractions, Color[] colors)
构建一个与默认
NO_CYCLE 重复法和
SRGB 颜色空间
LinearGradientPaint 。
|
LinearGradientPaint(Point2D start, Point2D end, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod)
构建了一个
LinearGradientPaint 用默认的
SRGB 颜色空间。
|
LinearGradientPaint(Point2D start, Point2D end, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod, MultipleGradientPaint.ColorSpaceType colorSpace, AffineTransform gradientTransform)
构建了一个
LinearGradientPaint 。
|
RadialGradientPaint(float cx, float cy, float radius, float[] fractions, Color[] colors)
构建一个与默认
NO_CYCLE 重复法和
SRGB 颜色空间
RadialGradientPaint ,使用中心对焦点。
|
RadialGradientPaint(float cx, float cy, float radius, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod)
构建一个与默认
SRGB 颜色空间
RadialGradientPaint ,使用中心对焦点。
|
RadialGradientPaint(float cx, float cy, float radius, float fx, float fy, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod)
构建一个与默认
SRGB 颜色空间
RadialGradientPaint 。
|
RadialGradientPaint(Point2D center, float radius, float[] fractions, Color[] colors)
构建一个与默认
NO_CYCLE 重复法和
SRGB 颜色空间
RadialGradientPaint ,使用中心对焦点。
|
RadialGradientPaint(Point2D center, float radius, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod)
构建一个与默认
SRGB 颜色空间
RadialGradientPaint ,使用中心对焦点。
|
RadialGradientPaint(Point2D center, float radius, Point2D focus, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod)
构建一个与默认
SRGB 颜色空间
RadialGradientPaint 。
|
RadialGradientPaint(Point2D center, float radius, Point2D focus, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod, MultipleGradientPaint.ColorSpaceType colorSpace, AffineTransform gradientTransform)
构建了一个
RadialGradientPaint 。
|
RadialGradientPaint(Rectangle2D gradientBounds, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod)
构建一个与默认
SRGB 颜色空间
RadialGradientPaint 。
|
Modifier and Type | Method and Description |
---|---|
Color |
AccessibleComponent.getBackground()
获取此对象的背景颜色。
|
Color |
AccessibleComponent.getForeground()
获取此对象的前景色。
|
Modifier and Type | Method and Description |
---|---|
void |
AccessibleComponent.setBackground(Color c)
设置此对象的背景颜色。
|
void |
AccessibleComponent.setForeground(Color c)
设置此对象的前景色。
|
Modifier and Type | Field and Description |
---|---|
protected Color |
JTable.gridColor
网格的颜色。
|
protected Color |
JTable.selectionBackground
选定单元格的背景颜色。
|
protected Color |
JTable.selectionForeground
选定单元格的前景颜色。
|
Modifier and Type | Method and Description |
---|---|
static Color |
DebugGraphics.flashColor()
返回用于绘制操作的颜色。
|
Color |
JList.AccessibleJList.AccessibleJListChild.getBackground() |
Color |
JTree.AccessibleJTree.AccessibleJTreeNode.getBackground()
获取此对象的背景颜色。
|
Color |
JTable.AccessibleJTable.AccessibleJTableCell.getBackground()
获取此对象的背景颜色。
|
Color |
JTabbedPane.getBackgroundAt(int index)
返回
index 标签的背景颜色。
|
Color |
DebugGraphics.getColor()
返回用于文本绘制操作的颜色。
|
Color |
JColorChooser.getColor()
从颜色选择器控件的当前颜色值。
|
Color |
UIDefaults.getColor(Object key)
如果
key 的值是一个
Color 返回,否则返回
null 。
|
static Color |
UIManager.getColor(Object key)
从默认值返回一个颜色。
|
Color |
UIDefaults.getColor(Object key, Locale l)
如果
key 对于给定的
Locale 的值是一个
Color 返回,否则返回
null 。
|
static Color |
UIManager.getColor(Object key, Locale l)
从适当的默认值返回一个颜色,这是适当的给定的语言环境。
|
Color |
JList.AccessibleJList.AccessibleJListChild.getForeground() |
Color |
JTree.AccessibleJTree.AccessibleJTreeNode.getForeground()
获取此对象的前景色。
|
Color |
JTable.AccessibleJTable.AccessibleJTableCell.getForeground()
获取此对象的前景色。
|
Color |
JTabbedPane.getForegroundAt(int index)
返回
index 标签前景颜色。
|
Color |
JTable.getGridColor()
返回用于绘制网格线的颜色。
|
Color |
JList.getSelectionBackground()
返回用于绘制选定项目背景的颜色。
|
Color |
JTable.getSelectionBackground()
返回选定单元格的背景颜色。
|
Color |
JList.getSelectionForeground()
返回用于绘制所选项目的前景的颜色。
|
Color |
JTable.getSelectionForeground()
返回选定单元格的前景色。
|
static Color |
JColorChooser.showDialog(Component component, String title, Color initialColor)
显示一个模态的颜色选择器对话框和块直到对话框被隐藏。
|
Modifier and Type | Method and Description |
---|---|
static Border |
BorderFactory.createBevelBorder(int type, Color highlight, Color shadow)
创建一个斜面的指定类型的边界,使用指定的高亮和阴影。
|
static Border |
BorderFactory.createBevelBorder(int type, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner)
创建一个斜面的指定类型的边界,使用指定的颜色的内部和外部的亮点和阴影区。
|
static Border |
BorderFactory.createEtchedBorder(Color highlight, Color shadow)
创建一个与“蚀刻”外观使用指定的突出和阴影颜色的边框。
|
static Border |
BorderFactory.createEtchedBorder(int type, Color highlight, Color shadow)
创建一个与“蚀刻”外观使用指定的突出和阴影颜色的边框。
|
static Border |
BorderFactory.createLineBorder(Color color)
创建一个边界线与指定的颜色。
|
static Border |
BorderFactory.createLineBorder(Color color, int thickness)
用指定的颜色和宽度创建一个行边界。
|
static Border |
BorderFactory.createLineBorder(Color color, int thickness, boolean rounded)
创建指定颜色、厚度和角形状的线条边框。
|
static MatteBorder |
BorderFactory.createMatteBorder(int top, int left, int bottom, int right, Color color)
使用一个坚实的颜色创建一个磨砂外观边框。
|
static Border |
BorderFactory.createSoftBevelBorder(int type, Color highlight, Color shadow)
创建一个斜面边框指定类型的软角,使用指定的高亮和阴影。
|
static Border |
BorderFactory.createSoftBevelBorder(int type, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner)
创建一个斜面的指定类型的边界与软化的角落,用指定的颜色为亮点的内、外边缘和阴影区。
|
static TitledBorder |
BorderFactory.createTitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor)
添加一个标题到一个现有的边框,用指定的定位,字体和颜色。
|
boolean |
DebugGraphics.drawImage(Image img, int x, int y, Color bgcolor, ImageObserver observer)
覆盖
Graphics.drawImage 。
|
boolean |
DebugGraphics.drawImage(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer)
覆盖
Graphics.drawImage 。
|
boolean |
DebugGraphics.drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bgcolor, ImageObserver observer)
覆盖
Graphics.drawImage 。
|
void |
JComponent.setBackground(Color bg)
设置此组件的背景颜色。
|
void |
JList.AccessibleJList.AccessibleJListChild.setBackground(Color c) |
void |
JTree.AccessibleJTree.AccessibleJTreeNode.setBackground(Color c)
设置此对象的背景颜色。
|
void |
JTable.AccessibleJTable.AccessibleJTableCell.setBackground(Color c)
设置此对象的背景颜色。
|
void |
JTabbedPane.setBackgroundAt(int index, Color background)
套在
index 到
background 可
null 背景颜色,在这种情况下,标签的背景颜色将默认的
tabbedpane 背景颜色。
|
void |
DebugGraphics.setColor(Color aColor)
设置用于绘制和填充线条和形状的颜色。
|
void |
JColorChooser.setColor(Color color)
设置为指定的颜色选择器的当前颜色。
|
static void |
DebugGraphics.setFlashColor(Color flashColor)
设置用于绘制绘制操作的颜色。
|
void |
JComponent.setForeground(Color fg)
设置此组件的前景色。
|
void |
JList.AccessibleJList.AccessibleJListChild.setForeground(Color c) |
void |
JTree.AccessibleJTree.AccessibleJTreeNode.setForeground(Color c) |
void |
JTable.AccessibleJTable.AccessibleJTableCell.setForeground(Color c)
设置此对象的前景色。
|
void |
JTabbedPane.setForegroundAt(int index, Color foreground)
套在
index 到
foreground 可
null 前景颜色,在这种情况下,标签的前景色默认为本
tabbedpane 前景颜色。
|
void |
JTable.setGridColor(Color gridColor)
设置用于绘制网格线的颜色和显示
gridColor 。
|
void |
JList.setSelectionBackground(Color selectionBackground)
设置用于绘制选定项的背景的颜色,它的渲染器可以使用填充选定的单元格。
|
void |
JTable.setSelectionBackground(Color selectionBackground)
设置选定单元格的背景颜色。
|
void |
JList.setSelectionForeground(Color selectionForeground)
设置用于绘制所选项目的前景颜色,它的渲染器可以使用渲染文本和图形。
|
void |
JTable.setSelectionForeground(Color selectionForeground)
设置选定单元格的前景色。
|
void |
DebugGraphics.setXORMode(Color aColor)
覆盖
Graphics.setXORMode 。
|
static Color |
JColorChooser.showDialog(Component component, String title, Color initialColor)
显示一个模态的颜色选择器对话框和块直到对话框被隐藏。
|
Constructor and Description |
---|
JColorChooser(Color initialColor)
创建一个具有指定的初始颜色选择器面板。
|
Modifier and Type | Field and Description |
---|---|
protected Color |
MatteBorder.color |
protected Color |
EtchedBorder.highlight |
protected Color |
BevelBorder.highlightInner |
protected Color |
BevelBorder.highlightOuter |
protected Color |
LineBorder.lineColor |
protected Color |
EtchedBorder.shadow |
protected Color |
BevelBorder.shadowInner |
protected Color |
BevelBorder.shadowOuter |
protected Color |
TitledBorder.titleColor |
Modifier and Type | Method and Description |
---|---|
Color |
EtchedBorder.getHighlightColor()
返回蚀刻边框的突出显示颜色。
|
Color |
EtchedBorder.getHighlightColor(Component c)
当渲染到指定的组件时返回蚀刻边框的突出显示颜色。
|
Color |
BevelBorder.getHighlightInnerColor()
返回斜角边框的内部突出显示颜色。
|
Color |
BevelBorder.getHighlightInnerColor(Component c)
当渲染到指定的组件时,返回斜角边框的内部突出显示颜色。
|
Color |
BevelBorder.getHighlightOuterColor()
返回斜角边框的外部突出显示颜色。
|
Color |
BevelBorder.getHighlightOuterColor(Component c)
当渲染到指定的组件时,返回斜角边框的外部突出显示颜色。
|
Color |
LineBorder.getLineColor()
返回边框的颜色。
|
Color |
MatteBorder.getMatteColor()
返回用于平铺边界或null如果图标所使用的颜色。
|
Color |
EtchedBorder.getShadowColor()
返回蚀刻边框的阴影颜色。
|
Color |
EtchedBorder.getShadowColor(Component c)
当渲染到指定组件时返回蚀刻边框的阴影颜色。
|
Color |
BevelBorder.getShadowInnerColor()
返回斜角边框的内部阴影颜色。
|
Color |
BevelBorder.getShadowInnerColor(Component c)
当渲染到指定的组件时,返回斜角边框的内部阴影颜色。
|
Color |
BevelBorder.getShadowOuterColor()
返回斜角边框的外部阴影颜色。
|
Color |
BevelBorder.getShadowOuterColor(Component c)
当渲染到指定的组件时返回斜角边框的外部阴影颜色。
|
Color |
TitledBorder.getTitleColor()
返回标题为标题的边框颜色。
|
Modifier and Type | Method and Description |
---|---|
void |
TitledBorder.setTitleColor(Color titleColor)
设置标题边框的标题颜色。
|
Constructor and Description |
---|
BevelBorder(int bevelType, Color highlight, Color shadow)
创建指定类型的斜面边框,突出显示颜色和阴影颜色。
|
BevelBorder(int bevelType, Color highlightOuterColor, Color highlightInnerColor, Color shadowOuterColor, Color shadowInnerColor)
创建指定类型的斜面边框,突出显示颜色和阴影颜色。
|
EtchedBorder(Color highlight, Color shadow)
用指定的亮点和阴影颜色创建一个降低的蚀刻边框。
|
EtchedBorder(int etchType, Color highlight, Color shadow)
用指定的蚀刻类型创建一个蚀刻的边框,突出显示和阴影颜色。
|
LineBorder(Color color)
创建一个指定的颜色和厚度= 1的线条边框。
|
LineBorder(Color color, int thickness)
用指定的颜色和厚度创建一个行边界。
|
LineBorder(Color color, int thickness, boolean roundedCorners)
创建指定颜色、厚度和角形状的线条边框。
|
MatteBorder(Insets borderInsets, Color matteColor)
创建一个具有指定的插图和彩色磨砂边框。
|
MatteBorder(int top, int left, int bottom, int right, Color matteColor)
创建一个具有指定的插图和彩色磨砂边框。
|
SoftBevelBorder(int bevelType, Color highlight, Color shadow)
创建指定类型的斜面边框,突出显示颜色和阴影颜色。
|
SoftBevelBorder(int bevelType, Color highlightOuterColor, Color highlightInnerColor, Color shadowOuterColor, Color shadowInnerColor)
用指定的类型创建一个斜面边框,突出显示阴影颜色。
|
TitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor)
创建一个具有指定边界,TitledBorder实例标题,标题对齐,标题的位置,标题的字体、颜色和标题。
|
Modifier and Type | Method and Description |
---|---|
protected Color |
AbstractColorChooserPanel.getColorFromModel()
返回当前选择的颜色。
|
Color |
DefaultColorSelectionModel.getSelectedColor()
返回选定的
Color 应non-
null 。
|
Color |
ColorSelectionModel.getSelectedColor()
返回选定的
Color 应non-
null 。
|
Modifier and Type | Method and Description |
---|---|
void |
DefaultColorSelectionModel.setSelectedColor(Color color)
集
color 选定的颜色。
|
void |
ColorSelectionModel.setSelectedColor(Color color)
集
color 选定的颜色。
|
Constructor and Description |
---|
DefaultColorSelectionModel(Color color)
创建一个
color 设置当前颜色
DefaultColorSelectionModel ,应non-
null 。
|
Modifier and Type | Class and Description |
---|---|
class |
ColorUIResource |
Constructor and Description |
---|
BevelBorderUIResource(int bevelType, Color highlight, Color shadow) |
BevelBorderUIResource(int bevelType, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner) |
ColorUIResource(Color c) |
EtchedBorderUIResource(Color highlight, Color shadow) |
EtchedBorderUIResource(int etchType, Color highlight, Color shadow) |
LineBorderUIResource(Color color) |
LineBorderUIResource(Color color, int thickness) |
MatteBorderUIResource(int top, int left, int bottom, int right, Color color) |
TitledBorderUIResource(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor) |
Modifier and Type | Field and Description |
---|---|
protected Color |
BasicMenuItemUI.acceleratorForeground |
protected Color |
BasicMenuItemUI.acceleratorSelectionForeground |
protected Color |
BasicBorders.ButtonBorder.darkShadow |
protected Color |
BasicBorders.FieldBorder.darkShadow |
protected Color |
BasicTabbedPaneUI.darkShadow |
protected Color |
BasicMenuItemUI.disabledForeground |
protected Color |
BasicToolBarUI.dockingBorderColor |
protected Color |
BasicToolBarUI.dockingColor |
protected Color |
BasicToolBarUI.floatingBorderColor |
protected Color |
BasicToolBarUI.floatingColor |
protected Color |
BasicTabbedPaneUI.focus |
protected Color |
BasicBorders.ButtonBorder.highlight |
protected Color |
BasicBorders.FieldBorder.highlight |
protected Color |
BasicBorders.SplitPaneBorder.highlight |
protected Color |
BasicSeparatorUI.highlight |
protected Color |
BasicTabbedPaneUI.highlight |
protected Color |
BasicBorders.ButtonBorder.lightHighlight |
protected Color |
BasicBorders.FieldBorder.lightHighlight |
protected Color |
BasicTabbedPaneUI.lightHighlight |
protected Color |
BasicInternalFrameTitlePane.notSelectedTextColor |
protected Color |
BasicInternalFrameTitlePane.notSelectedTitleColor |
protected Color |
BasicInternalFrameTitlePane.selectedTextColor |
protected Color |
BasicInternalFrameTitlePane.selectedTitleColor |
protected Color |
BasicMenuItemUI.selectionBackground |
protected Color |
BasicMenuItemUI.selectionForeground |
protected Color |
BasicBorders.ButtonBorder.shadow |
protected Color |
BasicBorders.FieldBorder.shadow |
protected Color |
BasicBorders.SplitPaneBorder.shadow |
protected Color |
BasicSeparatorUI.shadow |
protected Color |
BasicTabbedPaneUI.shadow |
protected Color |
BasicScrollBarUI.thumbColor |
protected Color |
BasicScrollBarUI.thumbDarkShadowColor |
protected Color |
BasicScrollBarUI.thumbHighlightColor |
protected Color |
BasicScrollBarUI.thumbLightShadowColor |
protected Color |
BasicScrollBarUI.trackColor |
protected Color |
BasicScrollBarUI.trackHighlightColor |
Modifier and Type | Method and Description |
---|---|
Color |
BasicToolBarUI.DragWindow.getBorderColor() |
Color |
BasicToolBarUI.getDockingColor()
获取在超过一个停靠区域时显示的颜色
|
Color |
BasicToolBarUI.getFloatingColor()
获取在浮动区域时显示的颜色
|
protected Color |
BasicSliderUI.getFocusColor() |
protected Color |
BasicTreeUI.getHashColor() |
protected Color |
BasicSliderUI.getHighlightColor() |
protected Color |
BasicProgressBarUI.getSelectionBackground()
“选题背景”是文本的颜色,当它是画在进度条未填充的区域。
|
protected Color |
BasicProgressBarUI.getSelectionForeground()
“selectionforeground”是文本的颜色,当它是画在一个填充区域的进度条。
|
protected Color |
BasicSliderUI.getShadowColor() |
Modifier and Type | Method and Description |
---|---|
static void |
BasicGraphicsUtils.drawBezel(Graphics g, int x, int y, int w, int h, boolean isPressed, boolean isDefault, Color shadow, Color darkShadow, Color highlight, Color lightHighlight) |
static void |
BasicGraphicsUtils.drawEtchedRect(Graphics g, int x, int y, int w, int h, Color shadow, Color darkShadow, Color highlight, Color lightHighlight) |
static void |
BasicGraphicsUtils.drawGroove(Graphics g, int x, int y, int w, int h, Color shadow, Color highlight) |
static void |
BasicGraphicsUtils.drawLoweredBezel(Graphics g, int x, int y, int w, int h, Color shadow, Color darkShadow, Color highlight, Color lightHighlight) |
protected void |
BasicMenuItemUI.paintBackground(Graphics g, JMenuItem menuItem, Color bgColor)
绘制菜单项的背景。
|
protected void |
BasicMenuItemUI.paintMenuItem(Graphics g, JComponent c, Icon checkIcon, Icon arrowIcon, Color background, Color foreground, int defaultTextIconGap) |
void |
BasicToolBarUI.DragWindow.setBorderColor(Color c) |
void |
BasicToolBarUI.setDockingColor(Color c)
设置在停靠区域上显示的颜色
|
void |
BasicToolBarUI.setFloatingColor(Color c)
设置在浮动区域上显示的颜色
|
protected void |
BasicTreeUI.setHashColor(Color color) |
Constructor and Description |
---|
BasicArrowButton(int direction, Color background, Color shadow, Color darkShadow, Color highlight)
创建一个
BasicArrowButton 的箭头画在指定的方向,用指定的颜色。
|
ButtonBorder(Color shadow, Color darkShadow, Color highlight, Color lightHighlight) |
FieldBorder(Color shadow, Color darkShadow, Color highlight, Color lightHighlight) |
MenuBarBorder(Color shadow, Color highlight) |
RadioButtonBorder(Color shadow, Color darkShadow, Color highlight, Color lightHighlight) |
RolloverButtonBorder(Color shadow, Color darkShadow, Color highlight, Color lightHighlight) |
SplitPaneBorder(Color highlight, Color shadow) |
ToggleButtonBorder(Color shadow, Color darkShadow, Color highlight, Color lightHighlight) |
Modifier and Type | Field and Description |
---|---|
protected static Color |
MetalSliderUI.darkShadowColor |
protected Color |
MetalButtonUI.disabledTextColor |
protected Color |
MetalToggleButtonUI.disabledTextColor |
protected Color |
MetalRadioButtonUI.disabledTextColor |
protected Color |
MetalButtonUI.focusColor |
protected Color |
MetalToggleButtonUI.focusColor |
protected Color |
MetalRadioButtonUI.focusColor |
protected static Color |
MetalSliderUI.highlightColor |
protected Color |
MetalTabbedPaneUI.selectColor |
protected Color |
MetalButtonUI.selectColor |
protected Color |
MetalToggleButtonUI.selectColor |
protected Color |
MetalRadioButtonUI.selectColor |
protected Color |
MetalTabbedPaneUI.selectHighlight |
protected Color |
MetalTabbedPaneUI.tabAreaBackground |
protected static Color |
MetalSliderUI.thumbColor |
Modifier and Type | Method and Description |
---|---|
protected Color |
MetalTabbedPaneUI.getColorForGap(int currentRun, int x, int y) |
protected Color |
MetalButtonUI.getDisabledTextColor() |
protected Color |
MetalToggleButtonUI.getDisabledTextColor() |
protected Color |
MetalRadioButtonUI.getDisabledTextColor() |
protected Color |
MetalButtonUI.getFocusColor() |
protected Color |
MetalToggleButtonUI.getFocusColor() |
protected Color |
MetalRadioButtonUI.getFocusColor() |
protected Color |
MetalButtonUI.getSelectColor() |
protected Color |
MetalToggleButtonUI.getSelectColor() |
protected Color |
MetalRadioButtonUI.getSelectColor() |
Modifier and Type | Method and Description |
---|---|
protected Color |
AbstractRegionPainter.decodeColor(Color color1, Color color2, float midPoint)
解码并返回一个颜色,这是来自一个偏移的另外两种颜色之间。
|
protected Color |
AbstractRegionPainter.decodeColor(String key, float hOffset, float sOffset, float bOffset, int aOffset)
解码并返回一个颜色,这是来自一个UI默认底色。
|
protected Color |
NimbusStyle.getColorForState(SynthContext ctx, ColorType type)
返回指定状态的颜色。
|
protected Color |
AbstractRegionPainter.getComponentColor(JComponent c, String property, Color defaultColor, float saturationOffset, float brightnessOffset, int alphaOffset)
从给定的组件得到颜色属性。
|
protected Color |
NimbusLookAndFeel.getDerivedColor(Color color1, Color color2, float midPoint)
解码并返回一个颜色,这是来自一个偏移的另外两种颜色之间。
|
protected Color |
NimbusLookAndFeel.getDerivedColor(Color color1, Color color2, float midPoint, boolean uiResource)
解码并返回一个颜色,这是来自两个其他颜色之间的偏移量。
|
Color |
NimbusLookAndFeel.getDerivedColor(String uiDefaultParentName, float hOffset, float sOffset, float bOffset, int aOffset, boolean uiResource)
获得衍生的颜色,得到颜色是共享的实例和颜色值会改变时,其母uidefault颜色变化。
|
Modifier and Type | Method and Description |
---|---|
protected Color |
AbstractRegionPainter.decodeColor(Color color1, Color color2, float midPoint)
解码并返回一个颜色,这是来自一个偏移的另外两种颜色之间。
|
protected LinearGradientPaint |
AbstractRegionPainter.decodeGradient(float x1, float y1, float x2, float y2, float[] midpoints, Color[] colors)
创建一个lineargradientpaint给定参数,此方法将创建并返回一个线性渐变油漆。
|
protected RadialGradientPaint |
AbstractRegionPainter.decodeRadialGradient(float x, float y, float r, float[] midpoints, Color[] colors)
创建RadialGradientPaint给出的参数,此方法将创建并返回一个径向渐变油漆。
|
protected Color |
AbstractRegionPainter.getComponentColor(JComponent c, String property, Color defaultColor, float saturationOffset, float brightnessOffset, int alphaOffset)
从给定的组件得到颜色属性。
|
protected Color |
NimbusLookAndFeel.getDerivedColor(Color color1, Color color2, float midPoint)
解码并返回一个颜色,这是来自一个偏移的另外两种颜色之间。
|
protected Color |
NimbusLookAndFeel.getDerivedColor(Color color1, Color color2, float midPoint, boolean uiResource)
解码并返回一个颜色,这是来自两个其他颜色之间的偏移量。
|
Modifier and Type | Method and Description |
---|---|
Color |
SynthStyle.getColor(SynthContext context, ColorType type)
返回指定状态的颜色。
|
protected abstract Color |
SynthStyle.getColorForState(SynthContext context, ColorType type)
返回指定状态的颜色。
|
Modifier and Type | Method and Description |
---|---|
Color |
JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getBackground() |
Color |
JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getForeground() |
Modifier and Type | Method and Description |
---|---|
void |
DefaultTableCellRenderer.setBackground(Color c)
覆盖
JComponent.setBackground 将选中的背景颜色为指定的颜色。
|
void |
JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.setBackground(Color c) |
void |
DefaultTableCellRenderer.setForeground(Color c)
覆盖
JComponent.setForeground 将选中的前景颜色为指定的颜色。
|
void |
JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.setForeground(Color c) |
Modifier and Type | Method and Description |
---|---|
Color |
GlyphView.getBackground()
把背景颜色来呈现的符号。
|
Color |
LabelView.getBackground()
把背景颜色来呈现的符号。
|
static Color |
StyleConstants.getBackground(AttributeSet a)
从属性列表中获取背景颜色设置。
|
Color |
StyledDocument.getBackground(AttributeSet attr)
需要一组属性,并将其变成一个背景颜色规范。
|
Color |
DefaultStyledDocument.getBackground(AttributeSet attr)
从属性集获取背景颜色。
|
Color |
StyleContext.getBackground(AttributeSet attr)
需要一组属性,并将其变成一个背景颜色规范。
|
Color |
JTextComponent.getCaretColor()
获取用于渲染插入当前的颜色。
|
Color |
DefaultHighlighter.DefaultHighlightPainter.getColor()
返回高亮显示的颜色。
|
Color |
JTextComponent.getDisabledTextColor()
获取用于渲染禁用的文本的颜色。
|
Color |
GlyphView.getForeground()
把前景颜色来呈现的符号。
|
Color |
LabelView.getForeground()
把前景颜色来呈现的符号。
|
static Color |
StyleConstants.getForeground(AttributeSet a)
从属性列表中获取前景色设置。
|
Color |
StyledDocument.getForeground(AttributeSet attr)
需要一组属性,并将其变成一个前景颜色规范。
|
Color |
DefaultStyledDocument.getForeground(AttributeSet attr)
从属性集获取前景颜色。
|
Color |
StyleContext.getForeground(AttributeSet attr)
需要一组属性,并将其变成一个前景颜色规范。
|
Color |
JTextComponent.getSelectedTextColor()
获取用于使选定的文本的颜色。
|
Color |
JTextComponent.getSelectionColor()
获取用于渲染选择当前颜色。
|
Modifier and Type | Method and Description |
---|---|
protected void |
LabelView.setBackground(Color bg)
设置视图的背景颜色。
|
static void |
StyleConstants.setBackground(MutableAttributeSet a, Color fg)
设置背景颜色。
|
void |
JTextComponent.setCaretColor(Color c)
设置用于插入当前的颜色渲染。
|
void |
JTextComponent.setDisabledTextColor(Color c)
设置用于呈现禁用文本的当前颜色。
|
static void |
StyleConstants.setForeground(MutableAttributeSet a, Color fg)
设置前台颜色。
|
void |
JTextComponent.setSelectedTextColor(Color c)
设置用于呈现所选文本的当前颜色。
|
void |
JTextComponent.setSelectionColor(Color c)
设置用于呈现选择的当前颜色。
|
Constructor and Description |
---|
DefaultHighlightPainter(Color c)
构建一个新的亮点画家。
|
ForegroundAction(String nm, Color fg)
创建一个新的foregroundaction。
|
Modifier and Type | Method and Description |
---|---|
Color |
StyleSheet.getBackground(AttributeSet a)
需要一组属性,并将其变成一个背景颜色规范。
|
Color |
StyleSheet.getForeground(AttributeSet a)
需要一组属性,并将其变成一个前景颜色规范。
|
Color |
StyleSheet.stringToColor(String string)
将一个彩色字符串如“红”或“# nnnnnn”色彩。
|
Modifier and Type | Field and Description |
---|---|
protected Color |
DefaultTreeCellRenderer.backgroundNonSelectionColor
当节点没有选择时,要使用的背景颜色。
|
protected Color |
DefaultTreeCellRenderer.backgroundSelectionColor
当选择一个节点时使用的背景颜色。
|
protected Color |
DefaultTreeCellRenderer.borderSelectionColor
颜色用于焦点指示器时,节点有焦点。
|
protected Color |
DefaultTreeCellEditor.borderSelectionColor
如果要绘制边框选择颜色,则为。
|
protected Color |
DefaultTreeCellRenderer.textNonSelectionColor
用于非选择节点的前景的颜色。
|
protected Color |
DefaultTreeCellRenderer.textSelectionColor
用于选择节点的前景的颜色。
|
Modifier and Type | Method and Description |
---|---|
Color |
DefaultTreeCellRenderer.getBackgroundNonSelectionColor()
返回用于非选择节点的背景颜色。
|
Color |
DefaultTreeCellRenderer.getBackgroundSelectionColor()
返回用于背景的颜色,如果节点选择。
|
Color |
DefaultTreeCellRenderer.getBorderSelectionColor()
返回绘制边框的颜色。
|
Color |
DefaultTreeCellEditor.getBorderSelectionColor()
返回绘制边框的颜色。
|
Color |
DefaultTreeCellRenderer.getTextNonSelectionColor()
返回在未选择节点时绘制的文本颜色。
|
Color |
DefaultTreeCellRenderer.getTextSelectionColor()
返回选择节点时绘制的颜色的颜色。
|
Modifier and Type | Method and Description |
---|---|
void |
DefaultTreeCellRenderer.setBackground(Color color)
子图的
ColorUIResource s空。
|
void |
DefaultTreeCellRenderer.setBackgroundNonSelectionColor(Color newColor)
设置用于非选定节点的背景颜色。
|
void |
DefaultTreeCellRenderer.setBackgroundSelectionColor(Color newColor)
设置要选择的背景的颜色设置为背景。
|
void |
DefaultTreeCellRenderer.setBorderSelectionColor(Color newColor)
设置边框的颜色。
|
void |
DefaultTreeCellEditor.setBorderSelectionColor(Color newColor)
设置边框的颜色。
|
void |
DefaultTreeCellRenderer.setTextNonSelectionColor(Color newColor)
设置颜色,当节点没有选择时绘制文本。
|
void |
DefaultTreeCellRenderer.setTextSelectionColor(Color newColor)
设置颜色,当节点被选中时,文本绘制。
|
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.