Uses of Class
java.awt.Color
Package
Description
Provides a collection of interfaces and classes that compose the Java Accessibility
Utilities.
Contains all of the classes for creating user interfaces and for painting
graphics and images.
Defines a contract between user-interface components and an assistive
technology that provides access to those components.
Provides a set of "lightweight" (all-Java language) components
that, to the maximum degree possible, work the same on all platforms.
Provides classes and interface for drawing specialized borders around a Swing
component.
Contains classes and interfaces used by the
JColorChooser
component.Provides one interface and many abstract classes that Swing uses to provide
its pluggable look-and-feel capabilities.
Provides user interface objects built according to the Basic look and feel.
Provides user interface objects built according to the Java look and feel
(once codenamed Metal), which is the default look and feel.
Provides user interface objects built according to the cross-platform Nimbus
look and feel.
Synth is a skinnable look and feel in which all painting is delegated.
Provides classes and interfaces for dealing with
javax.swing.JTable
.Provides classes and interfaces that deal with editable and noneditable text
components.
Provides the class
HTMLEditorKit
and supporting classes for creating
HTML text editors.Provides classes and interfaces for dealing with
javax.swing.JTree
.-
Uses of Color in com.sun.java.accessibility.util
Modifier and TypeMethodDescriptionTranslator.getBackground()
Get the backgroundColor
of this object.Translator.getForeground()
Get the foregroundColor
of this object.Modifier and TypeMethodDescriptionvoid
Translator.setBackground
(Color c) Set the backgroundColor
of this object.void
Translator.setForeground
(Color c) Set the foregroundColor
of this object. -
Uses of Color in java.awt
Modifier and TypeClassDescriptionfinal class
A class to encapsulate symbolic colors representing the color of native GUI objects on a system.Modifier and TypeFieldDescriptionstatic final Color
Color.black
The color black.static final Color
Color.BLACK
The color black.static final Color
Color.blue
The color blue.static final Color
Color.BLUE
The color blue.static final Color
Color.cyan
The color cyan.static final Color
Color.CYAN
The color cyan.static final Color
Color.DARK_GRAY
The color dark gray.static final Color
Color.darkGray
The color dark gray.static final Color
Color.gray
The color gray.static final Color
Color.GRAY
The color gray.static final Color
Color.green
The color green.static final Color
Color.GREEN
The color green.static final Color
Color.LIGHT_GRAY
The color light gray.static final Color
Color.lightGray
The color light gray.static final Color
Color.magenta
The color magenta.static final Color
Color.MAGENTA
The color magenta.static final Color
Color.orange
The color orange.static final Color
Color.ORANGE
The color orange.static final Color
Color.pink
The color pink.static final Color
Color.PINK
The color pink.static final Color
Color.red
The color red.static final Color
Color.RED
The color red.static final Color
Color.white
The color white.static final Color
Color.WHITE
The color white.static final Color
Color.yellow
The color yellow.static final Color
Color.YELLOW
The color yellow.Modifier and TypeMethodDescriptionColor.brighter()
Creates a newColor
that is a brighter version of thisColor
.Color.darker()
Creates a newColor
that is a darker version of thisColor
.static Color
Converts aString
to an integer and returns the specified opaqueColor
.Component.AccessibleAWTComponent.getBackground()
Gets the background color of this object.Component.getBackground()
Gets the background color of this component.abstract Color
Graphics2D.getBackground()
Returns the background color used for clearing a region.List.AccessibleAWTList.AccessibleAWTListChild.getBackground()
Get the background color of this object.MenuComponent.AccessibleAWTMenuComponent.getBackground()
Gets the background color of this object.TextComponent.getBackground()
Gets the background color of this text component.Window.getBackground()
Gets the background color of this window.static Color
Finds a color in the system properties.static Color
Finds a color in the system properties.static Color
Finds a color in the system properties.abstract Color
Graphics.getColor()
Gets this graphics context's current color.GradientPaint.getColor1()
Returns the color C1 anchored by the point P1.GradientPaint.getColor2()
Returns the color C2 anchored by the point P2.final Color[]
MultipleGradientPaint.getColors()
Returns a copy of the array of colors used by this gradient.Component.AccessibleAWTComponent.getForeground()
Gets the foreground color of this object.Component.getForeground()
Gets the foreground color of this component.List.AccessibleAWTList.AccessibleAWTListChild.getForeground()
Get the foreground color of this object.MenuComponent.AccessibleAWTMenuComponent.getForeground()
Gets the foreground color of this object.static Color
Color.getHSBColor
(float h, float s, float b) Creates aColor
object based on the specified values for the HSB color model.Robot.getPixelColor
(int x, int y) Returns the color of a pixel at the given screen coordinates.Modifier and TypeMethodDescriptionabstract 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) Draws as much of the specified area of the specified image as is currently available, scaling it on the fly to fit inside the specified area of the destination drawable surface.abstract boolean
Graphics.drawImage
(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer) Draws as much of the specified image as has already been scaled to fit inside the specified rectangle.abstract boolean
Graphics.drawImage
(Image img, int x, int y, Color bgcolor, ImageObserver observer) Draws as much of the specified image as is currently available.static Color
Finds a color in the system properties.void
Component.AccessibleAWTComponent.setBackground
(Color c) Sets the background color of this object.void
Component.setBackground
(Color c) Sets the background color of this component.abstract void
Graphics2D.setBackground
(Color color) Sets the background color for theGraphics2D
context.void
List.AccessibleAWTList.AccessibleAWTListChild.setBackground
(Color c) Set the background color of this object.void
MenuComponent.AccessibleAWTMenuComponent.setBackground
(Color c) Sets the background color of this object.void
TextComponent.setBackground
(Color c) Sets the background color of this text component.void
Window.setBackground
(Color bgColor) Sets the background color of this window.abstract void
Sets this graphics context's current color to the specified color.void
Component.AccessibleAWTComponent.setForeground
(Color c) Sets the foreground color of this object.void
Component.setForeground
(Color c) Sets the foreground color of this component.void
List.AccessibleAWTList.AccessibleAWTListChild.setForeground
(Color c) Set the foreground color of this object.void
MenuComponent.AccessibleAWTMenuComponent.setForeground
(Color c) Sets the foreground color of this object.abstract void
Graphics.setXORMode
(Color c1) Sets the paint mode of this graphics context to alternate between this graphics context's current color and the new specified color.ModifierConstructorDescriptionGradientPaint
(float x1, float y1, Color color1, float x2, float y2, Color color2) Constructs a simple acyclicGradientPaint
object.GradientPaint
(float x1, float y1, Color color1, float x2, float y2, Color color2, boolean cyclic) Constructs either a cyclic or acyclicGradientPaint
object depending on theboolean
parameter.GradientPaint
(Point2D pt1, Color color1, Point2D pt2, Color color2) Constructs a simple acyclicGradientPaint
object.GradientPaint
(Point2D pt1, Color color1, Point2D pt2, Color color2, boolean cyclic) Constructs either a cyclic or acyclicGradientPaint
object depending on theboolean
parameter.LinearGradientPaint
(float startX, float startY, float endX, float endY, float[] fractions, Color[] colors) Constructs aLinearGradientPaint
with a defaultNO_CYCLE
repeating method andSRGB
color space.LinearGradientPaint
(float startX, float startY, float endX, float endY, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod) Constructs aLinearGradientPaint
with a defaultSRGB
color space.LinearGradientPaint
(Point2D start, Point2D end, float[] fractions, Color[] colors) Constructs aLinearGradientPaint
with a defaultNO_CYCLE
repeating method andSRGB
color space.LinearGradientPaint
(Point2D start, Point2D end, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod) Constructs aLinearGradientPaint
with a defaultSRGB
color space.LinearGradientPaint
(Point2D start, Point2D end, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod, MultipleGradientPaint.ColorSpaceType colorSpace, AffineTransform gradientTransform) Constructs aLinearGradientPaint
.RadialGradientPaint
(float cx, float cy, float radius, float[] fractions, Color[] colors) Constructs aRadialGradientPaint
with a defaultNO_CYCLE
repeating method andSRGB
color space, using the center as the focus point.RadialGradientPaint
(float cx, float cy, float radius, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod) Constructs aRadialGradientPaint
with a defaultSRGB
color space, using the center as the focus point.RadialGradientPaint
(float cx, float cy, float radius, float fx, float fy, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod) Constructs aRadialGradientPaint
with a defaultSRGB
color space.RadialGradientPaint
(Point2D center, float radius, float[] fractions, Color[] colors) Constructs aRadialGradientPaint
with a defaultNO_CYCLE
repeating method andSRGB
color space, using the center as the focus point.RadialGradientPaint
(Point2D center, float radius, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod) Constructs aRadialGradientPaint
with a defaultSRGB
color space, using the center as the focus point.RadialGradientPaint
(Point2D center, float radius, Point2D focus, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod) Constructs aRadialGradientPaint
with a defaultSRGB
color space.RadialGradientPaint
(Point2D center, float radius, Point2D focus, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod, MultipleGradientPaint.ColorSpaceType colorSpace, AffineTransform gradientTransform) Constructs aRadialGradientPaint
.RadialGradientPaint
(Rectangle2D gradientBounds, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod) Constructs aRadialGradientPaint
with a defaultSRGB
color space. -
Uses of Color in javax.accessibility
Modifier and TypeMethodDescriptionAccessibleComponent.getBackground()
Gets the background color of this object.AccessibleComponent.getForeground()
Gets the foreground color of this object.Modifier and TypeMethodDescriptionvoid
AccessibleComponent.setBackground
(Color c) Sets the background color of this object.void
AccessibleComponent.setForeground
(Color c) Sets the foreground color of this object. -
Uses of Color in javax.swing
Modifier and TypeFieldDescriptionprotected Color
JTable.gridColor
The color of the grid.protected Color
JTable.selectionBackground
The background color of selected cells.protected Color
JTable.selectionForeground
The foreground color of selected cells.Modifier and TypeMethodDescriptionstatic Color
DebugGraphics.flashColor()
Returns the Color used to flash drawing operations.JList.AccessibleJList.AccessibleJListChild.getBackground()
JTable.AccessibleJTable.AccessibleJTableCell.getBackground()
Gets the background color of this object.JTree.AccessibleJTree.AccessibleJTreeNode.getBackground()
Get the background color of this object.JTabbedPane.getBackgroundAt
(int index) Returns the tab background color atindex
.DebugGraphics.getColor()
Returns the Color used for text drawing operations.JColorChooser.getColor()
Gets the current color value from the color chooser.If the value ofkey
is aColor
return it, otherwise returnnull
.If the value ofkey
for the givenLocale
is aColor
return it, otherwise returnnull
.static Color
Returns a color from the defaults.static Color
Returns a color from the defaults that is appropriate for the given locale.JList.AccessibleJList.AccessibleJListChild.getForeground()
JTable.AccessibleJTable.AccessibleJTableCell.getForeground()
Gets the foreground color of this object.JTree.AccessibleJTree.AccessibleJTreeNode.getForeground()
Get the foreground color of this object.JTabbedPane.getForegroundAt
(int index) Returns the tab foreground color atindex
.JTable.getGridColor()
Returns the color used to draw grid lines.JList.getSelectionBackground()
Returns the color used to draw the background of selected items.JTable.getSelectionBackground()
Returns the background color for selected cells.JList.getSelectionForeground()
Returns the color used to draw the foreground of selected items.JTable.getSelectionForeground()
Returns the foreground color for selected cells.static Color
JColorChooser.showDialog
(Component component, String title, Color initialColor) Shows a modal color-chooser dialog and blocks until the dialog is hidden.static Color
JColorChooser.showDialog
(Component component, String title, Color initialColor, boolean colorTransparencySelectionEnabled) Shows a modal color-chooser dialog and blocks until the dialog is hidden.Modifier and TypeMethodDescriptionstatic Border
BorderFactory.createBevelBorder
(int type, Color highlight, Color shadow) Creates a beveled border of the specified type, using the specified highlighting and shadowing.static Border
BorderFactory.createBevelBorder
(int type, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner) Creates a beveled border of the specified type, using the specified colors for the inner and outer highlight and shadow areas.static Border
BorderFactory.createEtchedBorder
(int type, Color highlight, Color shadow) Creates a border with an "etched" look using the specified highlighting and shading colors.static Border
BorderFactory.createEtchedBorder
(Color highlight, Color shadow) Creates a border with an "etched" look using the specified highlighting and shading colors.static Border
BorderFactory.createLineBorder
(Color color) Creates a line border with the specified color.static Border
BorderFactory.createLineBorder
(Color color, int thickness) Creates a line border with the specified color and width.static Border
BorderFactory.createLineBorder
(Color color, int thickness, boolean rounded) Creates a line border with the specified color, thickness, and corner shape.static MatteBorder
BorderFactory.createMatteBorder
(int top, int left, int bottom, int right, Color color) Creates a matte-look border using a solid color.static Border
BorderFactory.createSoftBevelBorder
(int type, Color highlight, Color shadow) Creates a beveled border of the specified type with softened corners, using the specified highlighting and shadowing.static Border
BorderFactory.createSoftBevelBorder
(int type, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner) Creates a beveled border of the specified type with softened corners, using the specified colors for the inner and outer edges of the highlight and the shadow areas.static TitledBorder
BorderFactory.createTitledBorder
(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor) Adds a title to an existing border, with the specified positioning, font and color.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) OverridesGraphics.drawImage
.boolean
DebugGraphics.drawImage
(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer) OverridesGraphics.drawImage
.boolean
DebugGraphics.drawImage
(Image img, int x, int y, Color bgcolor, ImageObserver observer) OverridesGraphics.drawImage
.void
JComponent.setBackground
(Color bg) Sets the background color of this component.void
JList.AccessibleJList.AccessibleJListChild.setBackground
(Color c) void
JTable.AccessibleJTable.AccessibleJTableCell.setBackground
(Color c) Sets the background color of this object.void
JTree.AccessibleJTree.AccessibleJTreeNode.setBackground
(Color c) Set the background color of this object.void
JTabbedPane.setBackgroundAt
(int index, Color background) Sets the background color atindex
tobackground
which can benull
, in which case the tab's background color will default to the background color of thetabbedpane
.void
Sets the color to be used for drawing and filling lines and shapes.void
Sets the current color of the color chooser to the specified color.static void
DebugGraphics.setFlashColor
(Color flashColor) Sets the Color used to flash drawing operations.void
JComponent.setForeground
(Color fg) Sets the foreground color of this component.void
JList.AccessibleJList.AccessibleJListChild.setForeground
(Color c) void
JTable.AccessibleJTable.AccessibleJTableCell.setForeground
(Color c) Sets the foreground color of this object.void
JTree.AccessibleJTree.AccessibleJTreeNode.setForeground
(Color c) void
JTabbedPane.setForegroundAt
(int index, Color foreground) Sets the foreground color atindex
toforeground
which can benull
, in which case the tab's foreground color will default to the foreground color of thistabbedpane
.void
JTable.setGridColor
(Color gridColor) Sets the color used to draw grid lines togridColor
and redisplays.void
JList.setSelectionBackground
(Color selectionBackground) Sets the color used to draw the background of selected items, which cell renderers can use fill selected cells.void
JTable.setSelectionBackground
(Color selectionBackground) Sets the background color for selected cells.void
JList.setSelectionForeground
(Color selectionForeground) Sets the color used to draw the foreground of selected items, which cell renderers can use to render text and graphics.void
JTable.setSelectionForeground
(Color selectionForeground) Sets the foreground color for selected cells.void
DebugGraphics.setXORMode
(Color aColor) OverridesGraphics.setXORMode
.static Color
JColorChooser.showDialog
(Component component, String title, Color initialColor) Shows a modal color-chooser dialog and blocks until the dialog is hidden.static Color
JColorChooser.showDialog
(Component component, String title, Color initialColor, boolean colorTransparencySelectionEnabled) Shows a modal color-chooser dialog and blocks until the dialog is hidden.ModifierConstructorDescriptionJColorChooser
(Color initialColor) Creates a color chooser pane with the specified initial color. -
Uses of Color in javax.swing.border
Modifier and TypeFieldDescriptionprotected Color
MatteBorder.color
The color rendered for the border.protected Color
EtchedBorder.highlight
The color to use for the etched highlight.protected Color
BevelBorder.highlightInner
The color to use for the bevel inner highlight.protected Color
BevelBorder.highlightOuter
The color to use for the bevel outer highlight.protected Color
LineBorder.lineColor
Color of the border.protected Color
EtchedBorder.shadow
The color to use for the etched shadow.protected Color
BevelBorder.shadowInner
The color to use for the bevel inner shadow.protected Color
BevelBorder.shadowOuter
the color to use for the bevel outer shadowprotected Color
TitledBorder.titleColor
The color of the title.Modifier and TypeMethodDescriptionEtchedBorder.getHighlightColor()
Returns the highlight color of the etched border.EtchedBorder.getHighlightColor
(Component c) Returns the highlight color of the etched border when rendered on the specified component.BevelBorder.getHighlightInnerColor()
Returns the inner highlight color of the bevel border.BevelBorder.getHighlightInnerColor
(Component c) Returns the inner highlight color of the bevel border when rendered on the specified component.BevelBorder.getHighlightOuterColor()
Returns the outer highlight color of the bevel border.BevelBorder.getHighlightOuterColor
(Component c) Returns the outer highlight color of the bevel border when rendered on the specified component.LineBorder.getLineColor()
Returns the color of the border.MatteBorder.getMatteColor()
Returns the color used for tiling the border or null if a tile icon is being used.EtchedBorder.getShadowColor()
Returns the shadow color of the etched border.EtchedBorder.getShadowColor
(Component c) Returns the shadow color of the etched border when rendered on the specified component.BevelBorder.getShadowInnerColor()
Returns the inner shadow color of the bevel border.BevelBorder.getShadowInnerColor
(Component c) Returns the inner shadow color of the bevel border when rendered on the specified component.BevelBorder.getShadowOuterColor()
Returns the outer shadow color of the bevel border.BevelBorder.getShadowOuterColor
(Component c) Returns the outer shadow color of the bevel border when rendered on the specified component.TitledBorder.getTitleColor()
Returns the title-color of the titled border.Modifier and TypeMethodDescriptionvoid
TitledBorder.setTitleColor
(Color titleColor) Sets the title-color of the titled border.ModifierConstructorDescriptionBevelBorder
(int bevelType, Color highlight, Color shadow) Creates a bevel border with the specified type, highlight and shadow colors.BevelBorder
(int bevelType, Color highlightOuterColor, Color highlightInnerColor, Color shadowOuterColor, Color shadowInnerColor) Creates a bevel border with the specified type, highlight and shadow colors.EtchedBorder
(int etchType, Color highlight, Color shadow) Creates an etched border with the specified etch-type, highlight and shadow colors.EtchedBorder
(Color highlight, Color shadow) Creates a lowered etched border with the specified highlight and shadow colors.LineBorder
(Color color) Creates a line border with the specified color and a thickness = 1.LineBorder
(Color color, int thickness) Creates a line border with the specified color and thickness.LineBorder
(Color color, int thickness, boolean roundedCorners) Creates a line border with the specified color, thickness, and corner shape.MatteBorder
(int top, int left, int bottom, int right, Color matteColor) Creates a matte border with the specified insets and color.MatteBorder
(Insets borderInsets, Color matteColor) Creates a matte border with the specified insets and color.SoftBevelBorder
(int bevelType, Color highlight, Color shadow) Creates a bevel border with the specified type, highlight and shadow colors.SoftBevelBorder
(int bevelType, Color highlightOuterColor, Color highlightInnerColor, Color shadowOuterColor, Color shadowInnerColor) Creates a bevel border with the specified type, highlight shadow colors.TitledBorder
(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor) Creates a TitledBorder instance with the specified border, title, title-justification, title-position, title-font, and title-color. -
Uses of Color in javax.swing.colorchooser
Modifier and TypeMethodDescriptionprotected Color
AbstractColorChooserPanel.getColorFromModel()
Returns the color that is currently selected.ColorSelectionModel.getSelectedColor()
Returns the selectedColor
which should be non-null
.DefaultColorSelectionModel.getSelectedColor()
Returns the selectedColor
which should be non-null
.Modifier and TypeMethodDescriptionvoid
ColorSelectionModel.setSelectedColor
(Color color) Sets the selected color tocolor
.void
DefaultColorSelectionModel.setSelectedColor
(Color color) Sets the selected color tocolor
.ModifierConstructorDescriptionDefaultColorSelectionModel
(Color color) Creates aDefaultColorSelectionModel
with the current color set tocolor
, which should be non-null
. -
Uses of Color in javax.swing.plaf
Modifier and TypeClassDescriptionclass
A subclass of Color that implements UIResource.ModifierConstructorDescriptionBevelBorderUIResource
(int bevelType, Color highlight, Color shadow) Constructs aBevelBorderUIResource
.BevelBorderUIResource
(int bevelType, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner) Constructs aBevelBorderUIResource
.Constructs aColorUIResource
.EtchedBorderUIResource
(int etchType, Color highlight, Color shadow) Constructs anEtchedBorderUIResource
.EtchedBorderUIResource
(Color highlight, Color shadow) Constructs anEtchedBorderUIResource
.LineBorderUIResource
(Color color) Constructs aLineBorderUIResource
.LineBorderUIResource
(Color color, int thickness) Constructs aLineBorderUIResource
.MatteBorderUIResource
(int top, int left, int bottom, int right, Color color) Constructs aMatteBorderUIResource
.TitledBorderUIResource
(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor) Constructs aTitledBorderUIResource
. -
Uses of Color in javax.swing.plaf.basic
Modifier and TypeFieldDescriptionprotected Color
BasicMenuItemUI.acceleratorForeground
The color of the accelerator foreground.protected Color
BasicMenuItemUI.acceleratorSelectionForeground
The color of the accelerator selection.protected Color
BasicBorders.ButtonBorder.darkShadow
The color of dark shadow.protected Color
BasicBorders.FieldBorder.darkShadow
The color of dark shadow.protected Color
BasicTabbedPaneUI.darkShadow
Dark shadow colorprotected Color
BasicMenuItemUI.disabledForeground
The color of the disabled foreground.protected Color
BasicToolBarUI.dockingBorderColor
The color of the docking border.protected Color
BasicToolBarUI.dockingColor
The background color of the docking border.protected Color
BasicToolBarUI.floatingBorderColor
The color of the not docking border.protected Color
BasicToolBarUI.floatingColor
The background color of the not docking border.protected Color
BasicTabbedPaneUI.focus
Focus colorprotected Color
BasicBorders.ButtonBorder.highlight
The color of highlight.protected Color
BasicBorders.FieldBorder.highlight
The color of highlight.protected Color
BasicBorders.SplitPaneBorder.highlight
The color of highlightprotected Color
BasicSeparatorUI.highlight
The color of the highlighting.protected Color
BasicTabbedPaneUI.highlight
Highlight colorprotected Color
BasicBorders.ButtonBorder.lightHighlight
The color of light highlight.protected Color
BasicBorders.FieldBorder.lightHighlight
The color of light highlight.protected Color
BasicTabbedPaneUI.lightHighlight
Light highlight colorprotected Color
BasicInternalFrameTitlePane.notSelectedTextColor
The color of a not selected text.protected Color
BasicInternalFrameTitlePane.notSelectedTitleColor
The color of a not selected title.protected Color
BasicInternalFrameTitlePane.selectedTextColor
The color of a selected text.protected Color
BasicInternalFrameTitlePane.selectedTitleColor
The color of a selected title.protected Color
BasicMenuItemUI.selectionBackground
The color of the selection background.protected Color
BasicMenuItemUI.selectionForeground
The color of the selection foreground.protected Color
BasicBorders.ButtonBorder.shadow
The color of shadow.protected Color
BasicBorders.FieldBorder.shadow
The color of shadow.protected Color
BasicBorders.SplitPaneBorder.shadow
The color of shadowprotected Color
BasicSeparatorUI.shadow
The color of the shadow.protected Color
BasicTabbedPaneUI.shadow
Shadow colorprotected Color
BasicScrollBarUI.thumbColor
Thumb colorprotected Color
BasicScrollBarUI.thumbDarkShadowColor
Thumb dark shadow colorprotected Color
BasicScrollBarUI.thumbHighlightColor
Thumb highlight colorprotected Color
BasicScrollBarUI.thumbLightShadowColor
Thumb light shadow colorprotected Color
BasicScrollBarUI.trackColor
Track colorprotected Color
BasicScrollBarUI.trackHighlightColor
Track highlight colorModifier and TypeMethodDescriptionBasicToolBarUI.DragWindow.getBorderColor()
Returns the border color.BasicToolBarUI.getDockingColor()
Gets the color displayed when over a docking areaBasicToolBarUI.getFloatingColor()
Gets the color displayed when over a floating areaprotected Color
BasicSliderUI.getFocusColor()
Returns the focus color.protected Color
BasicTreeUI.getHashColor()
Returns the hash color.protected Color
BasicSliderUI.getHighlightColor()
Returns the highlight color.protected Color
BasicProgressBarUI.getSelectionBackground()
The "selectionBackground" is the color of the text when it is painted over an unfilled area of the progress bar.protected Color
BasicProgressBarUI.getSelectionForeground()
The "selectionForeground" is the color of the text when it is painted over a filled area of the progress bar.protected Color
BasicSliderUI.getShadowColor()
Returns the shadow color.Modifier and TypeMethodDescriptionstatic 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) Draws a bezel.static void
BasicGraphicsUtils.drawEtchedRect
(Graphics g, int x, int y, int w, int h, Color shadow, Color darkShadow, Color highlight, Color lightHighlight) Draws an etched rectangle.static void
BasicGraphicsUtils.drawGroove
(Graphics g, int x, int y, int w, int h, Color shadow, Color highlight) Draws a groove.static void
BasicGraphicsUtils.drawLoweredBezel
(Graphics g, int x, int y, int w, int h, Color shadow, Color darkShadow, Color highlight, Color lightHighlight) Draws a lowered bezel.protected void
BasicMenuItemUI.paintBackground
(Graphics g, JMenuItem menuItem, Color bgColor) Draws the background of the menu item.protected void
BasicMenuItemUI.paintMenuItem
(Graphics g, JComponent c, Icon checkIcon, Icon arrowIcon, Color background, Color foreground, int defaultTextIconGap) Paints a menu item.void
BasicToolBarUI.DragWindow.setBorderColor
(Color c) Sets the border color.void
BasicToolBarUI.setDockingColor
(Color c) Sets the color displayed when over a docking areavoid
BasicToolBarUI.setFloatingColor
(Color c) Sets the color displayed when over a floating areaprotected void
BasicTreeUI.setHashColor
(Color color) Sets the hash color.ModifierConstructorDescriptionBasicArrowButton
(int direction, Color background, Color shadow, Color darkShadow, Color highlight) Creates aBasicArrowButton
whose arrow is drawn in the specified direction and with the specified colors.ButtonBorder
(Color shadow, Color darkShadow, Color highlight, Color lightHighlight) Constructs a new instance of aButtonBorder
.FieldBorder
(Color shadow, Color darkShadow, Color highlight, Color lightHighlight) Constructs a new instance of aFieldBorder
.MenuBarBorder
(Color shadow, Color highlight) Constructs a new instance of aMenuBarBorder
.RadioButtonBorder
(Color shadow, Color darkShadow, Color highlight, Color lightHighlight) Constructs a new instance of aRadioButtonBorder
.RolloverButtonBorder
(Color shadow, Color darkShadow, Color highlight, Color lightHighlight) Constructs a new instance of aRolloverButtonBorder
.SplitPaneBorder
(Color highlight, Color shadow) Constructs a new instance of aSplitPaneBorder
.ToggleButtonBorder
(Color shadow, Color darkShadow, Color highlight, Color lightHighlight) Constructs a new instance of aToggleButtonBorder
. -
Uses of Color in javax.swing.plaf.metal
Modifier and TypeFieldDescriptionprotected static Color
MetalSliderUI.darkShadowColor
The color of dark shadow.protected Color
MetalButtonUI.disabledTextColor
The color of the disabled color.protected Color
MetalRadioButtonUI.disabledTextColor
The color of a disabled text.protected Color
MetalToggleButtonUI.disabledTextColor
The color of a disabled text.protected Color
MetalButtonUI.focusColor
The color of the focused button.protected Color
MetalRadioButtonUI.focusColor
The color of the focused radio button.protected Color
MetalToggleButtonUI.focusColor
The color of a focused toggle button.protected static Color
MetalSliderUI.highlightColor
The color of highlighting.protected Color
MetalButtonUI.selectColor
The color of the selected button.protected Color
MetalRadioButtonUI.selectColor
The color of the selected radio button.protected Color
MetalTabbedPaneUI.selectColor
The color of the selected pane.protected Color
MetalToggleButtonUI.selectColor
The color of a selected button.protected Color
MetalTabbedPaneUI.selectHighlight
The color of the highlight.protected Color
MetalTabbedPaneUI.tabAreaBackground
The color of tab's background.protected static Color
MetalSliderUI.thumbColor
The color of a thumbModifier and TypeMethodDescriptionprotected Color
MetalTabbedPaneUI.getColorForGap
(int currentRun, int x, int y) Returns the color of the gap.protected Color
MetalButtonUI.getDisabledTextColor()
Returns the color of a disabled text.protected Color
MetalRadioButtonUI.getDisabledTextColor()
Returns the color of the disabled text.protected Color
MetalToggleButtonUI.getDisabledTextColor()
Returns the color of a disabled text.protected Color
MetalButtonUI.getFocusColor()
Returns the color of the focused button.protected Color
MetalRadioButtonUI.getFocusColor()
Returns the color of the focusedJRadioButton
.protected Color
MetalToggleButtonUI.getFocusColor()
Returns the color of a focused toggle button.protected Color
MetalButtonUI.getSelectColor()
Returns the color of the selected button.protected Color
MetalRadioButtonUI.getSelectColor()
Returns the color of the selectedJRadioButton
.protected Color
MetalToggleButtonUI.getSelectColor()
Returns the color of a selected button. -
Uses of Color in javax.swing.plaf.nimbus
Modifier and TypeMethodDescriptionprotected final Color
AbstractRegionPainter.decodeColor
(Color color1, Color color2, float midPoint) Decodes and returns a color, which is derived from a offset between two other colors.protected final Color
AbstractRegionPainter.decodeColor
(String key, float hOffset, float sOffset, float bOffset, int aOffset) Decodes and returns a color, which is derived from a base color in UI defaults.protected Color
NimbusStyle.getColorForState
(SynthContext ctx, ColorType type) Returns the color for the specified state.protected final Color
AbstractRegionPainter.getComponentColor
(JComponent c, String property, Color defaultColor, float saturationOffset, float brightnessOffset, int alphaOffset) Get a color property from the given JComponent.protected final Color
NimbusLookAndFeel.getDerivedColor
(Color color1, Color color2, float midPoint) Decodes and returns a color, which is derived from a offset between two other colors.protected final Color
NimbusLookAndFeel.getDerivedColor
(Color color1, Color color2, float midPoint, boolean uiResource) Decodes and returns a color, which is derived from an offset between two other colors.NimbusLookAndFeel.getDerivedColor
(String uiDefaultParentName, float hOffset, float sOffset, float bOffset, int aOffset, boolean uiResource) Get a derived color, derived colors are shared instances and is color value will change when its parent UIDefault color changes.Modifier and TypeMethodDescriptionprotected final Color
AbstractRegionPainter.decodeColor
(Color color1, Color color2, float midPoint) Decodes and returns a color, which is derived from a offset between two other colors.protected final LinearGradientPaint
AbstractRegionPainter.decodeGradient
(float x1, float y1, float x2, float y2, float[] midpoints, Color[] colors) Given parameters for creating a LinearGradientPaint, this method will create and return a linear gradient paint.protected final RadialGradientPaint
AbstractRegionPainter.decodeRadialGradient
(float x, float y, float r, float[] midpoints, Color[] colors) Given parameters for creating a RadialGradientPaint, this method will create and return a radial gradient paint.protected final Color
AbstractRegionPainter.getComponentColor
(JComponent c, String property, Color defaultColor, float saturationOffset, float brightnessOffset, int alphaOffset) Get a color property from the given JComponent.protected final Color
NimbusLookAndFeel.getDerivedColor
(Color color1, Color color2, float midPoint) Decodes and returns a color, which is derived from a offset between two other colors.protected final Color
NimbusLookAndFeel.getDerivedColor
(Color color1, Color color2, float midPoint, boolean uiResource) Decodes and returns a color, which is derived from an offset between two other colors. -
Uses of Color in javax.swing.plaf.synth
Modifier and TypeMethodDescriptionSynthStyle.getColor
(SynthContext context, ColorType type) Returns the color for the specified state.protected abstract Color
SynthStyle.getColorForState
(SynthContext context, ColorType type) Returns the color for the specified state. -
Uses of Color in javax.swing.table
Modifier and TypeMethodDescriptionJTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getBackground()
JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getForeground()
Modifier and TypeMethodDescriptionvoid
DefaultTableCellRenderer.setBackground
(Color c) OverridesJComponent.setBackground
to assign the unselected-background color to the specified color.void
JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.setBackground
(Color c) void
DefaultTableCellRenderer.setForeground
(Color c) OverridesJComponent.setForeground
to assign the unselected-foreground color to the specified color.void
JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.setForeground
(Color c) -
Uses of Color in javax.swing.text
Modifier and TypeMethodDescriptionDefaultStyledDocument.getBackground
(AttributeSet attr) Gets the background color from an attribute set.GlyphView.getBackground()
Fetch the background color to use to render the glyphs.LabelView.getBackground()
Fetches the background color to use to render the glyphs.static Color
StyleConstants.getBackground
(AttributeSet a) Gets the background color setting from the attribute list.StyleContext.getBackground
(AttributeSet attr) Takes a set of attributes and turn it into a background color specification.StyledDocument.getBackground
(AttributeSet attr) Takes a set of attributes and turn it into a background color specification.JTextComponent.getCaretColor()
Fetches the current color used to render the caret.DefaultHighlighter.DefaultHighlightPainter.getColor()
Returns the color of the highlight.JTextComponent.getDisabledTextColor()
Fetches the current color used to render the disabled text.DefaultStyledDocument.getForeground
(AttributeSet attr) Gets the foreground color from an attribute set.GlyphView.getForeground()
Fetch the foreground color to use to render the glyphs.LabelView.getForeground()
Fetches the foreground color to use to render the glyphs.static Color
StyleConstants.getForeground
(AttributeSet a) Gets the foreground color setting from the attribute list.StyleContext.getForeground
(AttributeSet attr) Takes a set of attributes and turn it into a foreground color specification.StyledDocument.getForeground
(AttributeSet attr) Takes a set of attributes and turn it into a foreground color specification.JTextComponent.getSelectedTextColor()
Fetches the current color used to render the selected text.JTextComponent.getSelectionColor()
Fetches the current color used to render the selection.Modifier and TypeMethodDescriptionprotected void
LabelView.setBackground
(Color bg) Sets the background color for the view.static void
StyleConstants.setBackground
(MutableAttributeSet a, Color fg) Sets the background color.void
JTextComponent.setCaretColor
(Color c) Sets the current color used to render the caret.void
JTextComponent.setDisabledTextColor
(Color c) Sets the current color used to render the disabled text.static void
StyleConstants.setForeground
(MutableAttributeSet a, Color fg) Sets the foreground color.void
JTextComponent.setSelectedTextColor
(Color c) Sets the current color used to render the selected text.void
JTextComponent.setSelectionColor
(Color c) Sets the current color used to render the selection.ModifierConstructorDescriptionConstructs a new highlight painter.ForegroundAction
(String nm, Color fg) Creates a new ForegroundAction. -
Uses of Color in javax.swing.text.html
Modifier and TypeMethodDescriptionStyleSheet.getBackground
(AttributeSet a) Takes a set of attributes and turn it into a background color specification.StyleSheet.getForeground
(AttributeSet a) Takes a set of attributes and turn it into a foreground color specification.StyleSheet.stringToColor
(String string) Converts a color string such as "RED" or "#NNNNNN" to a Color. -
Uses of Color in javax.swing.tree
Modifier and TypeFieldDescriptionprotected Color
DefaultTreeCellRenderer.backgroundNonSelectionColor
Color to use for the background when the node isn't selected.protected Color
DefaultTreeCellRenderer.backgroundSelectionColor
Color to use for the background when a node is selected.protected Color
DefaultTreeCellEditor.borderSelectionColor
True if the border selection color should be drawn.protected Color
DefaultTreeCellRenderer.borderSelectionColor
Color to use for the focus indicator when the node has focus.protected Color
DefaultTreeCellRenderer.textNonSelectionColor
Color to use for the foreground for non-selected nodes.protected Color
DefaultTreeCellRenderer.textSelectionColor
Color to use for the foreground for selected nodes.Modifier and TypeMethodDescriptionDefaultTreeCellRenderer.getBackgroundNonSelectionColor()
Returns the background color to be used for non selected nodes.DefaultTreeCellRenderer.getBackgroundSelectionColor()
Returns the color to use for the background if node is selected.DefaultTreeCellEditor.getBorderSelectionColor()
Returns the color the border is drawn.DefaultTreeCellRenderer.getBorderSelectionColor()
Returns the color the border is drawn.DefaultTreeCellRenderer.getTextNonSelectionColor()
Returns the color the text is drawn with when the node isn't selected.DefaultTreeCellRenderer.getTextSelectionColor()
Returns the color the text is drawn with when the node is selected.Modifier and TypeMethodDescriptionvoid
DefaultTreeCellRenderer.setBackground
(Color color) Subclassed to mapColorUIResource
s to null.void
DefaultTreeCellRenderer.setBackgroundNonSelectionColor
(Color newColor) Sets the background color to be used for non selected nodes.void
DefaultTreeCellRenderer.setBackgroundSelectionColor
(Color newColor) Sets the color to use for the background if node is selected.void
DefaultTreeCellEditor.setBorderSelectionColor
(Color newColor) Sets the color to use for the border.void
DefaultTreeCellRenderer.setBorderSelectionColor
(Color newColor) Sets the color to use for the border.void
DefaultTreeCellRenderer.setTextNonSelectionColor
(Color newColor) Sets the color the text is drawn with when the node isn't selected.void
DefaultTreeCellRenderer.setTextSelectionColor
(Color newColor) Sets the color the text is drawn with when the node is selected.