Uses of Class java.awt.Color

Uses in package javax.swing.border

Constructors with parameter type java.awt.Color

BevelBorder.BevelBorder(int bevelType, Color highlight, Color shadow)
Constructs a BevelBorder given its appearance type and two colors for its highlight and shadow.
BevelBorder.BevelBorder(int bevelType, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner)
Constructs a BevelBorder given its appearance type and all colors.
EtchedBorder.EtchedBorder(int etchType, Color highlight, Color shadow)
Constructs an EtchedBorder with the specified appearance, explicitly selecting the colors that will be used for highlight and shadow.
EtchedBorder.EtchedBorder(Color highlight, Color shadow)
Constructs a lowered EtchedBorder, explicitly selecting the colors that will be used for highlight and shadow.
Constructs a LineBorder given its color.
LineBorder.LineBorder(Color color, int thickness)
Constructs a LineBorder given its color and thickness.
LineBorder.LineBorder(Color color, int thickness, boolean roundedCorners)
Constructs a LineBorder given its color, thickness, and whether it has rounded corners.
MatteBorder.MatteBorder(int top, int left, int bottom, int right, Color matteColor)
Constructs a MatteBorder given the width on each side and a fill color.
MatteBorder.MatteBorder(Insets borderInsets, Color matteColor)
Constructs a MatteBorder given its insets and fill color.
SoftBevelBorder.SoftBevelBorder(int bevelType, Color highlight, Color shadow)
Constructs a SoftBevelBorder given its appearance type and two colors for its highlight and shadow.
SoftBevelBorder.SoftBevelBorder(int bevelType, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner)
Constructs a SoftBevelBorder given its appearance type and all colors.
TitledBorder.TitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor)
Constructs a TitledBorder given its border, title text, horizontal alignment, vertical position, font, and color.

Fields of type java.awt.Color

Color
The color that is used for filling the border, or null if the border is filled with repetitions of a tile icon.
Color
The highlight color, or null to indicate that the color shall be derived from the background of the enclosed component.
Color
The inner highlight color, or null to indicate that the color shall be derived from the background of the component whose border is being painted.
Color
The outer highlight color, or null to indicate that the color shall be derived from the background of the component whose border is being painted.
Color
The color of the line.
Color
The shadow color, or null to indicate that the color shall be derived from the background of the enclosed component.
Color
The inner shadow color, or null to indicate that the color shall be derived from the background of the component whose border is being painted.
Color
The outer shadow color, or null to indicate that the color shall be derived from the background of the component whose border is being painted.
Color
The color for displaying the title text.

Methods with parameter type java.awt.Color

void
Sets the color for displaying the title text.

Methods with return type java.awt.Color

Color
Returns the color that will be used for highlighted parts when painting the border, or null if that color will be derived from the background of the enclosed Component.
Color
Determines the color that will be used for highlighted parts when painting the border around a given component.
Color
Returns the color that will be used for the inner side of highlighted edges when painting the border, or null if that color will be derived from the background of the enclosed Component.
Color
Determines the color that will be used for the inner side of highlighted edges when painting the border.
Color
Returns the color that will be used for the outer side of highlighted edges when painting the border, or null if that color will be derived from the background of the enclosed Component.
Color
Determines the color that will be used for the outer side of highlighted edges when painting the border.
Color
Returns the color of the line.
Color
Returns the color that is used for filling the border, or null if the border is filled with repetitions of a tile icon.
Color
Returns the color that will be used for shadowed parts when painting the border, or null if that color will be derived from the background of the enclosed Component.
Color
Determines the color that will be used for shadowed parts when painting the border around a given component.
Color
Returns the color that will be used for the inner side of shadowed edges when painting the border, or null if that color will be derived from the background of the enclosed Component.
Color
Determines the color that will be used for the inner side of shadowed edges when painting the border.
Color
Returns the color that will be used for the outer side of shadowed edges when painting the border, or null if that color will be derived from the background of the enclosed Component.
Color
Determines the color that will be used for the outer side of shadowed edges when painting the border.
Color
Retrieves the color for displaying the title text.

Uses in package javax.swing.plaf.metal

Fields of type java.awt.Color

Color
The shadow color used for drawing the track rect when the slider is enabled.
Color
The color for disabled button labels.
Color
Used to draw disabled text.
Color
The color for disabled button labels.
Color
The color used to draw the focus rectangle around the text and/or icon.
Color
Used to draw the focus rectangle.
Color
The color for the focus border.
Color
The highlight color used for drawing the track rect when the slider is enabled.
Color
The background color for the button when it is pressed.
Color
Used to fill the icon when the button is pressed.
Color
The color for the selected tab.
Color
The color that indicates a selected button.
Color
The color for a highlighted selected tab.
Color
The background color used for the tab area.
Color
The thumb color (unused, because an icon is used to draw the thumb).

Methods with return type java.awt.Color

Color
MetalTabbedPaneUI.getColorForGap(int currentRun, int x, int y)
Returns the color for the gap.
Color
Returns the color for the text label of disabled buttons.
Color
Returns the color for the JRadioButton's text when the button is disabled.
Color
Returns the color for the text label of disabled buttons.
Color
Returns the color for the focus border.
Color
Returns the color used to draw the focus rectangle when the JRadioButton has the focus.
Color
Returns the color for the focus border.
Color
Returns the color that indicates a selected button.
Color
Returns the color used to fill the JRadioButton's icon when the button is pressed.
Color
Returns the color that indicates a selected button.

Uses in package java.awt.peer

Methods with parameter type java.awt.Color

void
Sets the background color of the component.
void
Sets the foreground color of the component.

Uses in package java.awt

Classes derived from java.awt.Color

class
This class contains the various "system colors" in use by the native windowing system.

Constructors with parameter type java.awt.Color

GradientPaint.GradientPaint(float x1, float y1, Color c1, float x2, float y2, Color c2)
Creates a new acyclic GradientPaint.
GradientPaint.GradientPaint(float x1, float y1, Color c1, float x2, float y2, Color c2, boolean cyclic)
Creates a new cyclic or acyclic GradientPaint.
Creates a new acyclic GradientPaint.
GradientPaint.GradientPaint(Point2D p1, Color c1, Point2D p2, Color c2, boolean cyclic)
Creates a new cyclic or acyclic GradientPaint.

Fields of type java.awt.Color

Color
Constant for the color black: R=0, G=0, B=0.
Color
Constant for the color blue: R=0, G=0, B=255.
Color
Constant for the color cyan: R=0, G=255, B=255.
Color
Constant for the color dark gray: R=64, G=64, B=64.
Color
Constant for the color gray: R=128, G=128, B=128.
Color
Constant for the color green: R=0, G=255, B=0.
Color
Constant for the color light gray: R=192, G=192, B=192.
Color
Constant for the color magenta: R=255, G=0, B=255.
Color
Constant for the color orange: R=255, G=200, B=0.
Color
Constant for the color pink: R=255, G=175, B=175.
Color
Constant for the color red: R=255, G=0, B=0.
Color
Constant for the color white: R=255, G=255, B=255.
Color
Constant for the color yellow: R=255, G=255, B=0.
Color
Constant for the color black: R=0, G=0, B=0.
Color
Constant for the color blue: R=0, G=0, B=255.
Color
Constant for the color cyan: R=0, G=255, B=255.
Color
Constant for the color dark gray: R=64, G=64, B=64.
Color
Constant for the color gray: R=128, G=128, B=128.
Color
Constant for the color green: R=0, G=255, B=0.
Color
Constant for the color light gray: R=192, G=192, B=192.
Color
Constant for the color magenta: R=255, G=0, B=255.
Color
Constant for the color orange: R=255, G=200, B=0.
Color
Constant for the color pink: R=255, G=175, B=175.
Color
Constant for the color red: R=255, G=0, B=0.
Color
Constant for the color white: R=255, G=255, B=255.
Color
Constant for the color yellow: R=255, G=255, B=0.

Methods with parameter type java.awt.Color

boolean
Graphics.drawImage(Image image, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bgcolor, ImageObserver observer)
FIXME: Write Javadocs for this when you understand it.
boolean
Graphics.drawImage(Image image, int x, int y, int width, int height, Color bgcolor, ImageObserver observer)
Draws all of the image that is available and returns.
boolean
Graphics.drawImage(Image image, int x, int y, Color bgcolor, ImageObserver observer)
Draws all of the image that is available and returns.
Color
Color.getColor(String prop, Color defcolor)
Returns a new instance of Color from the value of the system property named by the specified string.
void
Sets this component's background color to the specified color.
void
Sets the background color.
void
Sets the background color (used by the Graphics.clearRect(int,int,int,int) method).
void
Sets the background color of the component to that specified.
void
Sets the current color for this object.
void
Sets this component's foreground color to the specified color.
void
Sets the foreground color.
void
Sets the foreground color of the component to that specified.
void
Sets this context info "XOR" mode, where the targe pixles are XOR-ed when drawn on.

Methods with return type java.awt.Color

Color
Returns a brighter version of this color.
Color
Returns a darker version of this color.
Color
Converts the specified string to a number, using Integer.decode, and creates a new instance of Color from the value.
Color
Returns this component's background color.
Color
Gets the background color.
Color
Returns the color used by the Graphics.clearRect(int,int,int,int) method.
Color
Returns the background color of the component, or null if this property is unsupported.
Color
Returns the current color for this object.
Color
Returns a new instance of Color from the value of the system property named by the specified string.
Color
Color.getColor(String prop, int defrgb)
Returns a new instance of Color from the value of the system property named by the specified string.
Color
Color.getColor(String prop, Color defcolor)
Returns a new instance of Color from the value of the system property named by the specified string.
Color
Returns the first color.
Color
Returns the second color.
Color
Returns this component's foreground color.
Color
Gets the foreground color.
Color
Returns the foreground color of the component, or null if this property is unsupported.
Color
Color.getHSBColor(float hue, float saturation, float brightness)
Returns a new instance of Color based on the specified HSB values.
Color
Robot.getPixelColor(int x, int y)
Return the color of the pixel at the given screen coordinates.

Uses in package javax.swing.table

Methods with parameter type java.awt.Color

void
Assign the unselected-background.
void
Set the background color of this component to the specified color.
void
Assign the unselected-foreground.
void
Set the foreground color of this component.

Methods with return type java.awt.Color

Color
Get the background color of this component.
Color
Get the foreground color of this component.

Uses in package javax.swing.plaf

Classes derived from java.awt.Color

class
A Color that is marked as UIResource, which indicates that the color has been installed by a pluggable LookAndFeel.

Constructors with parameter type java.awt.Color

Constructs a BevelBorderUIResource given its appearance type and two colors for its highlight and shadow.
BorderUIResource.BevelBorderUIResource.BevelBorderUIResource(int bevelType, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner)
Constructs a BevelBorderUIResource given its appearance type and all its colors.
Constructs a ColorUIResource, using the intensities of another color.
Constructs an EtchedBorderUIResource with the specified appearance, explicitly selecting the colors that will be used for highlight and shadow.
Constructs a lowered EtchedBorderUIResource, explicitly selecting the colors that will be used for highlight and shadow.
Constructs a LineBorderUIResource given its color.
Constructs a LineBorder given its color and thickness.
BorderUIResource.MatteBorderUIResource.MatteBorderUIResource(int top, int left, int bottom, int right, Color color)
Constructs a MatteBorderUIResource given the width on each side and a fill color.
BorderUIResource.TitledBorderUIResource.TitledBorderUIResource(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor)
Constructs a TitledBorder given its border, title text, horizontal alignment, vertical position, font, and color.

Uses in package javax.swing.text.html

Methods with return type java.awt.Color

Color
Takes a set of attributes and turns it into a background color specification.
Color
Takes a set of attributes and turns it into a foreground color specification.
Color
Convert the color string represenation into java.awt.Color.

Uses in package javax.swing.tree

Fields of type java.awt.Color

Color
The background color for non-selected cells.
Color
The background color for selected cells.
Color
True if the border selection color should be drawn.
Color
The border color for selected tree cells.
Color
The color used for text in non-selected cells.
Color
The color used for text in selected cells.

Methods with parameter type java.awt.Color

void
Sets the background color.
void
Sets the background color for tree cells that are not selected.
void
Sets the background color for tree cells that are selected.
void
Sets the color to use for the border.
void
Sets the border color for tree cells that are selected.
void
Sets the text color for tree cells that are not selected.
void
Sets the text color for tree cells that are selected.

Methods with return type java.awt.Color

Color
Returns the background color for tree cells that are not selected.
Color
Returns the background color for tree cells that are selected.
Color
Returns the color the border is drawn.
Color
Returns the border color for tree cells that are selected.
Color
Returns the text color for tree cells that are not selected.
Color
Returns the text color for tree cells that are selected.

Uses in package javax.swing.plaf.basic

Constructors with parameter type java.awt.Color

BasicArrowButton.BasicArrowButton(int direction, Color background, Color shadow, Color darkShadow, Color highlight)
Creates a new BasicArrowButton object with the given colors and direction.
BasicBorders.ButtonBorder.ButtonBorder(Color shadow, Color darkShadow, Color highlight, Color lightHighlight)
Constructs a new border for drawing a button in the Basic look and feel.
BasicBorders.FieldBorder.FieldBorder(Color shadow, Color darkShadow, Color highlight, Color lightHighlight)
Constructs a new border for drawing a text field in the Basic look and feel.
Constructs a new MenuBarBorder for drawing a JMenuBar in the Basic look and feel.
BasicBorders.RadioButtonBorder.RadioButtonBorder(Color shadow, Color darkShadow, Color highlight, Color lightHighlight)
Constructs a new border for drawing a JRadioButton in the Basic look and feel.
BasicBorders.RolloverButtonBorder.RolloverButtonBorder(Color shadow, Color darkShadow, Color highlight, Color lightHighlight)
Constructs a new border for drawing a roll-over button in the Basic look and feel.
Constructs a new border for drawing a JSplitPane in the Basic look and feel.
BasicBorders.ToggleButtonBorder.ToggleButtonBorder(Color shadow, Color darkShadow, Color highlight, Color lightHighlight)
Constructs a new border for drawing a JToggleButton in the Basic look and feel.

Fields of type java.awt.Color

Color
Color to be used when displaying menu item's accelerator.
Color
Color to be used when displaying menu item's accelerator when menu item is selected.
Color
The color for drawing the dark shaded parts of the border.
Color
The color for drawing the inner half of the top and left edges.
Color
The outer bottom and right edge color for both the tab and content border.
Color
Color of the text when menu item is disabled
Color
The color of the border when it is dockable.
Color
The background color of the JToolBar when it is dockable.
Color
The color of the border when it is not dockable.
Color
The background color of the JToolBar when it is not dockable.
Color
The color of the focus outline on the selected tab.
Color
The color for drawing the highlighted parts of the border.
Color
The color for drawing the inner half of the bottom and right edges.
Color
The color for drawing the bottom and right edges of the border.
Color
The highlight color.
Color
FIXME: find a use for this.
Color
The color for drawing the bright highlighted parts of the border.
Color
The color for drawing the outer half of the bottom and right edges.
Color
The top and left edge color for both the tab and content border.
Color
The text color of the TitlePane when the JInternalFrame is not selected.
Color
The background color of the TitlePane when the JInternalFrame is not selected.
Color
The text color of the titlePane when the JInternalFrame is selected.
Color
The background color of the TitlePane when the JInternalFrame is selected.
Color
Color of text that is used when menu item is selected
Color
Color of the text that is used when menu item is selected.
Color
The color for drawing the shaded parts of the border.
Color
The color for drawing the outer half of the top and left edges.
Color
The color for drawing the top and left edges of the border.
Color
The shadow color.
Color
The inner bottom and right edge color for the tab and content border.
Color
The color of the thumb.
Color
The outer shadow of the thumb.
Color
The top and left edge color for the thumb.
Color
The outer light shadow for the thumb.
Color
The color of the track.
Color
The color that is used when the mouse press occurs in the track.

Methods with parameter type java.awt.Color

void
BasicGraphicsUtils.drawBezel(Graphics g, int x, int y, int width, int height, boolean isPressed, boolean isDefault, Color shadow, Color darkShadow, Color highlight, Color lightHighlight)
Draws a border that is suitable for buttons of the Basic look and feel.
void
BasicGraphicsUtils.drawEtchedRect(Graphics g, int x, int y, int width, int height, Color shadow, Color darkShadow, Color highlight, Color lightHighlight)
Draws a rectangle that appears etched into the surface, given four colors that are used for drawing.
void
BasicGraphicsUtils.drawGroove(Graphics g, int x, int y, int width, int height, Color shadow, Color highlight)
Draws a rectangle that appears etched into the surface, given two colors that are used for drawing.
void
BasicGraphicsUtils.drawLoweredBezel(Graphics g, int x, int y, int width, int height, Color shadow, Color darkShadow, Color highlight, Color lightHighlight)
Draws a rectangle that appears lowered into the surface, given four colors that are used for drawing.
void
Paints background of the menu item
void
BasicMenuItemUI.paintMenuItem(Graphics g, JComponent c, Icon checkIcon, Icon arrowIcon, Color background, Color foreground, int defaultTextIconGap)
Paints specified menu item
void
This method changes the border color.
void
This method sets the docking color.
void
This method sets the color displayed when the JToolBar is not in a dockable area.
void
Sets the Hash color.

Methods with return type java.awt.Color

Color
The color that the border should be.
Color
This method returns the docking color.
Color
This method returns the Color which is displayed when over a floating area.
Color
Gets the focus color to be used for this slider.
Color
Returns the Hash color.
Color
Gets the highlight color to be used for this slider.
Color
This method returns the Color that the text is shown in when the bar is not over the text.
Color
This method returns the Color that the text is shown in when the bar is over the text.
Color
Gets the shadow color to be used for this slider.

Uses in package javax.accessibility

Methods with parameter type java.awt.Color

void
Set the background color of this component to the specified color.
void
Set the foreground color of this component.

Methods with return type java.awt.Color

Color
Get the background color of this component.
Color
Get the foreground color of this component.

Uses in package javax.swing.colorchooser

Constructors with parameter type java.awt.Color

Creates a new color selection model with a given selected color.

Methods with parameter type java.awt.Color

void
Sets the selected color.
void
This method sets the color.

Methods with return type java.awt.Color

Color
This method returns the current color stored in the model for this chooser panel.
Color
Returns the selected color.
Color
Returns the selected color.

Uses in package javax.swing.plaf.synth

Methods with return type java.awt.Color

Color
Color

Uses in package javax.swing.text

Constructors with parameter type java.awt.Color

Creates a new instance of ForegroundAction to set the foreground color to fg.

Methods with parameter type java.awt.Color

void
Sets the background color for the glyphs.
void
Adds a background attribute to the specified set.
void
void
void
Adds a foreground color attribute to the specified set.
void
void

Methods with return type java.awt.Color

Color
Returns the background color which should be used to paint the text.
Color
Returns the background color for the glyphs.
Color
Extracts a background color from a set of attributes.
Color
Returns the background color specified in the given attributes, or Color.BLACK if no background color is specified.
Color
Color
getBackground
Color
Color
Color
Color
Returns the foreground color which should be used to paint the text.
Color
Returns the foreground color for the glyphs.
Color
Extracts a foreground color from a set of attributes.
Color
Returns the foreground color specified in the given attributes, or Color.BLACK if no foreground color is specified.
Color
Color
getForeground
Color
Color

Uses in package javax.swing

Constructors with parameter type java.awt.Color

This method creates a new JColorChooser with the given initial color.

Fields of type java.awt.Color

Color
The color to paint the grid lines of the table, when either showHorizontalLines or showVerticalLines is set.
Color
The color to paint the background of selected cells.
Color
The color to paint the foreground of selected cells.

Methods with parameter type java.awt.Color

Border
BorderFactory.createBevelBorder(int type, Color highlight, Color shadow)
Create a beveled border of the specified type, using the specified highlighting and shadowing.
Border
BorderFactory.createBevelBorder(int type, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner)
Create a beveled border of the specified type, using the specified colors for the inner and outer highlight and shadow areas.
Border
BorderFactory.createEtchedBorder(int etchType, Color highlight, Color shadow)
Create a border with an "etched" look using the specified highlighting and shading colors.
Border
Create a border with an "etched" look using the specified highlighting and shading colors.
Border
Creates a line border withe the specified color.
Border
BorderFactory.createLineBorder(Color color, int thickness)
Creates a line border withe the specified color and width.
MatteBorder
BorderFactory.createMatteBorder(int top, int left, int bottom, int right, Color color)
Create a matte-look border using a solid color.
TitledBorder
BorderFactory.createTitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor)
Add a title to an existing border, specifying the text of the title along with its positioning, font, and color.
boolean
DebugGraphics.drawImage(Image image, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color background, ImageObserver observer)
drawImage
boolean
DebugGraphics.drawImage(Image image, int x, int y, int width, int height, Color background, ImageObserver observer)
drawImage
boolean
DebugGraphics.drawImage(Image image, int x, int y, Color background, ImageObserver observer)
drawImage
void
Set the value of the background property.
void
Calling this method has no effect, since the background color cannot be set on list children individually.
void
Sets the background of the cell.
void
Set the background color of this object.
void
JTabbedPane.setBackgroundAt(int index, Color background)
This method sets the background color of the tab.
void
Sets the color to draw stuff with.
void
This method sets the current color for the JColorChooser.
void
setFlashColor
void
Set the value of the foreground property.
void
Calling this method has no effect, since the foreground color cannot be set on list children individually.
void
Sets the foreground of the cell.
void
Sets the foreground color of this object.
void
JTabbedPane.setForegroundAt(int index, Color foreground)
This method sets the foreground color of the tab.
void
Set the value of the gridColor property.
void
Sets the value of the selectionBackground property.
void
Set the value of the selectionBackground property.

Fire a PropertyChangeEvent with name SELECTION_BACKGROUND_CHANGED_PROPERTY to registered listeners, if selectionBackground changed.

void
Sets the value of the selectionForeground property.
void
Set the value of the selectionForeground property.

Fire a PropertyChangeEvent with name SELECTION_FOREGROUND_CHANGED_PROPERTY to registered listeners, if selectionForeground changed.

void
setXORMode
Color
JColorChooser.showDialog(Component component, String title, Color initial)
This method shows a JColorChooser inside a JDialog.

Methods with return type java.awt.Color

Color
flashColor
Color
Returns the background color for this list child.
Color
Returns the background color of this cell.
Color
Get the background color of this object.
Color
This method returns the background color for the tab.
Color
Returns the color used for drawing.
Color
This method returns the current color for the JColorChooser.
Color
Returns a color entry for the default locale.
Color
Returns a drawing color from the defaults table.
Color
Returns a color entry for a specic locale.
Color
Returns a drawing color from the defaults table.
Color
Returns the foreground color for this list child.
Color
Returns the foreground color of the table cell.
Color
Get the foreground color of this object.
Color
This method returns the foreground color for the tab.
Color
Get the value of the gridColor property.
Color
Gets the value of the selectionBackground property.
Color
Get the value of the selectionBackground property.
Color
Gets the value of the selectionForeground property.
Color
Get the value of the selectionForeground property.
Color
JColorChooser.showDialog(Component component, String title, Color initial)
This method shows a JColorChooser inside a JDialog.