|
JSR-209 (Final Approval Ballot) | ||||||||||
| PREV NEXT | FRAMES NO FRAMES | ||||||||||
| Packages that use Color | |
| java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images. |
| javax.swing | Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms. |
| javax.swing.border | Provides classes and interface for drawing specialized borders around a Swing component. |
| javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components. |
| Uses of Color in java.awt |
| Fields in java.awt declared as Color | |
static Color |
Color.white
The color white. |
static Color |
Color.WHITE
The color white. |
static Color |
Color.lightGray
The color light gray. |
static Color |
Color.LIGHT_GRAY
The color light gray. |
static Color |
Color.gray
The color gray. |
static Color |
Color.GRAY
The color gray. |
static Color |
Color.darkGray
The color dark gray. |
static Color |
Color.DARK_GRAY
The color dark gray. |
static Color |
Color.black
The color black. |
static Color |
Color.BLACK
The color black. |
static Color |
Color.red
The color red. |
static Color |
Color.RED
The color red. |
static Color |
Color.pink
The color pink. |
static Color |
Color.PINK
The color pink. |
static Color |
Color.orange
The color orange. |
static Color |
Color.ORANGE
The color orange. |
static Color |
Color.yellow
The color yellow. |
static Color |
Color.YELLOW
The color yellow. |
static Color |
Color.green
The color green. |
static Color |
Color.GREEN
The color green. |
static Color |
Color.magenta
The color magenta. |
static Color |
Color.MAGENTA
The color magenta. |
static Color |
Color.cyan
The color cyan. |
static Color |
Color.CYAN
The color cyan. |
static Color |
Color.blue
The color blue. |
static Color |
Color.BLUE
The color blue. |
| Methods in java.awt that return Color | |
Color |
GradientPaint.getColor1()
Returns the color C1 anchored by the point P1. |
Color |
GradientPaint.getColor2()
Returns the color C2 anchored by the point P2. |
abstract Color |
Graphics2D.getBackground()
Returns the background color used for clearing a region. |
Color |
Color.brighter()
Creates a new Color that is a brighter version of this
Color. |
Color |
Color.darker()
Creates a new Color that is a darker version of this
Color. |
static Color |
Color.decode(java.lang.String nm)
Converts a String to an integer and returns the
specified opaque Color. |
static Color |
Color.getColor(java.lang.String nm)
Finds a color in the system properties. |
static Color |
Color.getColor(java.lang.String nm,
Color v)
Finds a color in the system properties. |
static Color |
Color.getColor(java.lang.String nm,
int v)
Finds a color in the system properties. |
static Color |
Color.getHSBColor(float h,
float s,
float b)
Creates a Color object based on the specified values
for the HSB color model. |
| Methods in java.awt with parameters of type Color | |
abstract void |
Graphics2D.setBackground(Color color)
Sets the background color for the Graphics2D context. |
static Color |
Color.getColor(java.lang.String nm,
Color v)
Finds a color in the system properties. |
| Constructors in java.awt with parameters of type Color | |
GradientPaint(float x1,
float y1,
Color color1,
float x2,
float y2,
Color color2)
Constructs a simple acyclic GradientPaint object. |
|
GradientPaint(Point2D pt1,
Color color1,
Point2D pt2,
Color color2)
Constructs a simple acyclic GradientPaint object. |
|
GradientPaint(float x1,
float y1,
Color color1,
float x2,
float y2,
Color color2,
boolean cyclic)
Constructs either a cyclic or acyclic GradientPaint
object depending on the boolean parameter. |
|
GradientPaint(Point2D pt1,
Color color1,
Point2D pt2,
Color color2,
boolean cyclic)
Constructs either a cyclic or acyclic GradientPaint
object depending on the boolean parameter. |
|
| Uses of Color in javax.swing |
| Fields in javax.swing declared as Color | |
protected Color |
JTable.gridColor
The color of the grid. |
protected Color |
JTable.selectionForeground
The foreground color of selected cells. |
protected Color |
JTable.selectionBackground
The background color of selected cells. |
| Methods in javax.swing that return Color | |
Color |
JTable.getGridColor()
Returns the color used to draw grid lines. |
Color |
JTable.getSelectionForeground()
Returns the foreground color for selected cells. |
Color |
JTable.getSelectionBackground()
Returns the background color for selected cells. |
Color |
JTabbedPane.getBackgroundAt(int index)
Returns the tab background color at index. |
Color |
JTabbedPane.getForegroundAt(int index)
Returns the tab foreground color at index. |
Color |
JList.getSelectionForeground()
Returns the selection foreground color. |
Color |
JList.getSelectionBackground()
Returns the background color for selected cells. |
| Methods in javax.swing with parameters of type Color | |
void |
JTable.setGridColor(Color gridColor)
Sets the color used to draw grid lines to gridColor and redisplays. |
void |
JTable.setSelectionForeground(Color selectionForeground)
Sets the foreground color for selected cells. |
void |
JTable.setSelectionBackground(Color selectionBackground)
Sets the background color for selected cells. |
void |
JTabbedPane.setBackgroundAt(int index,
Color background)
Sets the background color at index to
background
which can be null, in which case the tab's background color
will default to the background color of the tabbedpane. |
void |
JTabbedPane.setForegroundAt(int index,
Color foreground)
Sets the foreground color at index to
foreground which can be
null, in which case the tab's foreground color
will default to the foreground color of this tabbedpane. |
void |
JComponent.setForeground(Color fg)
Sets the foreground color of this component. |
void |
JComponent.setBackground(Color bg)
Sets the background color of this component. |
void |
JList.setSelectionForeground(Color selectionForeground)
Sets the foreground color for selected cells. |
void |
JList.setSelectionBackground(Color selectionBackground)
Sets the background color for selected cells. |
static Border |
BorderFactory.createLineBorder(Color color)
Creates a line border withe the specified color. |
static Border |
BorderFactory.createLineBorder(Color color,
int thickness)
Creates a line border with the specified color and width. |
static 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(Color highlight,
Color shadow)
Creates a border with an "etched" look using the specified highlighting and shading colors. |
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 TitledBorder |
BorderFactory.createTitledBorder(Border border,
java.lang.String title,
int titleJustification,
int titlePosition,
Font titleFont,
Color titleColor)
Adds a title to an existing border, specifying the text of the title along with its positioning, font, and color. |
static MatteBorder |
BorderFactory.createMatteBorder(int top,
int left,
int bottom,
int right,
Color color)
Creates a matte-look border using a solid color. |
| Uses of Color in javax.swing.border |
| Fields in javax.swing.border declared as Color | |
protected Color |
TitledBorder.titleColor
|
protected Color |
LineBorder.lineColor
|
protected Color |
MatteBorder.color
|
protected Color |
EtchedBorder.highlight
|
protected Color |
EtchedBorder.shadow
|
protected Color |
BevelBorder.highlightOuter
|
protected Color |
BevelBorder.highlightInner
|
protected Color |
BevelBorder.shadowInner
|
protected Color |
BevelBorder.shadowOuter
|
| Methods in javax.swing.border that return Color | |
Color |
TitledBorder.getTitleColor()
Returns the title-color of the titled border. |
Color |
LineBorder.getLineColor()
Returns the color of the border. |
Color |
MatteBorder.getMatteColor()
Returns the color used for tiling the border or null if a tile icon is being used. |
Color |
EtchedBorder.getHighlightColor(java.awt.Component c)
Returns the highlight color of the etched border when rendered on the specified component. |
Color |
EtchedBorder.getHighlightColor()
Returns the highlight color of the etched border. |
Color |
EtchedBorder.getShadowColor(java.awt.Component c)
Returns the shadow color of the etched border when rendered on the specified component. |
Color |
EtchedBorder.getShadowColor()
Returns the shadow color of the etched border. |
Color |
BevelBorder.getHighlightOuterColor(java.awt.Component c)
Returns the outer highlight color of the bevel border when rendered on the specified component. |
Color |
BevelBorder.getHighlightInnerColor(java.awt.Component c)
Returns the inner highlight color of the bevel border when rendered on the specified component. |
Color |
BevelBorder.getShadowInnerColor(java.awt.Component c)
Returns the inner shadow color of the bevel border when rendered on the specified component. |
Color |
BevelBorder.getShadowOuterColor(java.awt.Component c)
Returns the outer shadow color of the bevel border when rendered on the specified component. |
Color |
BevelBorder.getHighlightOuterColor()
Returns the outer highlight color of the bevel border. |
Color |
BevelBorder.getHighlightInnerColor()
Returns the inner highlight color of the bevel border. |
Color |
BevelBorder.getShadowInnerColor()
Returns the inner shadow color of the bevel border. |
Color |
BevelBorder.getShadowOuterColor()
Returns the outer shadow color of the bevel border. |
| Methods in javax.swing.border with parameters of type Color | |
void |
TitledBorder.setTitleColor(Color titleColor)
Sets the title-color of the titled border. |
| Constructors in javax.swing.border with parameters of type Color | |
TitledBorder(Border border,
java.lang.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. |
|
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(java.awt.Insets borderInsets,
Color matteColor)
Creates a matte border with the specified insets and color. |
|
EtchedBorder(Color highlight,
Color shadow)
Creates a lowered etched border with the specified highlight and shadow colors. |
|
EtchedBorder(int etchType,
Color highlight,
Color shadow)
Creates an etched border with the specified etch-type, highlight and shadow colors. |
|
BevelBorder(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 shadow colors. |
|
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. |
|
| Uses of Color in javax.swing.text |
| Methods in javax.swing.text that return Color | |
Color |
StyledDocument.getForeground(AttributeSet attr)
Takes a set of attributes and turn it into a foreground color specification. |
Color |
StyledDocument.getBackground(AttributeSet attr)
Takes a set of attributes and turn it into a background color specification. |
Color |
JTextComponent.getCaretColor()
Fetches the current color used to render the caret. |
Color |
JTextComponent.getSelectionColor()
Fetches the current color used to render the selection. |
Color |
JTextComponent.getSelectedTextColor()
Fetches the current color used to render the selected text. |
Color |
JTextComponent.getDisabledTextColor()
Fetches the current color used to render the selected text. |
| Methods in javax.swing.text with parameters of type Color | |
void |
JTextComponent.setCaretColor(Color c)
Sets the current color used to render the caret. |
void |
JTextComponent.setSelectionColor(Color c)
Sets the current color used to render the selection. |
void |
JTextComponent.setSelectedTextColor(Color c)
Sets the current color used to render the selected text. |
void |
JTextComponent.setDisabledTextColor(Color c)
Sets the current color used to render the disabled text. |
|
JSR-209 (Final Approval Ballot) | ||||||||||
| PREV NEXT | FRAMES NO FRAMES | ||||||||||