Java Platform 1.2
Beta 4

Uses of Class
java.awt.Color

Packages that use Color
com.sun.java.accessibility   
com.sun.java.swing Provides a set of "lightweight" (all-Java
com.sun.java.swing.border Provides classes and interface for drawing specialized borders around a Swing component.  
com.sun.java.swing.plaf Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.  
com.sun.java.swing.table Provides classes and interfaces for dealing with java.awt.swing. 
com.sun.java.swing.text Provides classes and interfaces that deal with editable and noneditable text components.  
com.sun.java.swing.text.html Provides the class (HTMLEditorKit) and supporting classes for creating HTML text editors.  
com.sun.java.swing.tree Provides classes and interfaces for dealing with java.awt.swing. 
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.  
 

Uses of Color in com.sun.java.accessibility
 

Methods in com.sun.java.accessibility that return Color
 Color AccessibleComponent.getBackground()
          Get the background color of this object.
 Color AccessibleComponent.getForeground()
          Get the foreground color of this object.
 

Methods in com.sun.java.accessibility with parameters of type Color
 void AccessibleComponent.setBackground(Color c)
          Set the background color of this object.
 void AccessibleComponent.setForeground(Color c)
          Set the foreground color of this object.
 

Uses of Color in com.sun.java.swing
 

Fields in com.sun.java.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 com.sun.java.swing that return Color
 Color JComponent.AccessibleJComponent.getBackground()
          Get the background color of this object.
 Color JComponent.AccessibleJComponent.getForeground()
          Get the foreground color of this object.
 Color JFrame.AccessibleJFrame.getBackground()
          Get the background color of this object.
 Color JFrame.AccessibleJFrame.getForeground()
          Get the foreground color of this object.
 Color JWindow.AccessibleJWindow.getBackground()
          Get the background color of this object.
 Color JWindow.AccessibleJWindow.getForeground()
          Get the foreground color of this object.
 Color CellRendererPane.AccessibleCellRendererPane.getBackground()
          Get the background color of this object.
 Color CellRendererPane.AccessibleCellRendererPane.getForeground()
          Get the foreground color of this object.
static Color UIManager.getColor(Object key)
           
 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 JTable.AccessibleJTable.AccessibleJTableCell.getBackground()
          Get the background color of this object.
 Color JTable.AccessibleJTable.AccessibleJTableCell.getForeground()
          Get the foreground color of this object.
 Color JTree.AccessibleJTree.AccessibleJTreeNode.getBackground()
          Get the background color of this object.
 Color JTree.AccessibleJTree.AccessibleJTreeNode.getForeground()
          Get the foreground color of this object.
 Color JDialog.AccessibleJDialog.getBackground()
          Get the background color of this object.
 Color JDialog.AccessibleJDialog.getForeground()
          Get the foreground color of this object.
static Color DebugGraphics.flashColor()
          Returns the Color used to flash drawing operations.
 Color DebugGraphics.getColor()
          Returns the Color used for text drawing operations.
static Color JColorChooser.showDialog(Component component, String title, Color initialColor)
          Shows a modal color-chooser dialog and blocks until the dialog is hidden.
 Color JColorChooser.getColor()
          Gets the current color value from the color chooser.
 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 JInternalFrame.getBackground()
          Get the background color of this object.
 Color JInternalFrame.getForeground()
          Get the foreground color of this object.
 Color JApplet.AccessibleJApplet.getBackground()
          Get the background color of this object.
 Color JApplet.AccessibleJApplet.getForeground()
          Get the foreground color of this object.
 Color Box.Filler.AccessibleBoxFiller.getBackground()
          Gets the background color of this object.
 Color Box.Filler.AccessibleBoxFiller.getForeground()
          Gets the foreground color of this object.
 Color Box.AccessibleBox.getBackground()
          Gets the background color of this object.
 Color Box.AccessibleBox.getForeground()
          Gets the foreground color of this object.
 Color UIDefaults.getColor(Object key)
          If the value of key is a Color return it, otherwise return null.
 Color JList.getSelectionForeground()
          Returns the foreground color.
 Color JList.getSelectionBackground()
          Returns the background color for selected cells.
 Color JList.AccessibleJList.AccessibleJListChild.getBackground()
           
 Color JList.AccessibleJList.AccessibleJListChild.getForeground()
           
 

Methods in com.sun.java.swing with parameters of type Color
 void JComponent.AccessibleJComponent.setBackground(Color c)
          Set the background color of this object.
 void JComponent.AccessibleJComponent.setForeground(Color c)
          Set the foreground color of this object.
 void JFrame.AccessibleJFrame.setBackground(Color c)
          Set the background color of this object.
 void JFrame.AccessibleJFrame.setForeground(Color c)
          Set the foreground color of this object.
static Border BorderFactory.createLineBorder(Color color)
           
static Border BorderFactory.createLineBorder(Color color, int thickness)
           
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 TitledBorder BorderFactory.createTitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor)
           
static MatteBorder BorderFactory.createMatteBorder(int top, int left, int bottom, int right, Color color)
           
 void JWindow.AccessibleJWindow.setBackground(Color c)
          Set the background color of this object.
 void JWindow.AccessibleJWindow.setForeground(Color c)
          Set the foreground color of this object.
 void CellRendererPane.AccessibleCellRendererPane.setBackground(Color c)
          Set the background color of this object.
 void CellRendererPane.AccessibleCellRendererPane.setForeground(Color c)
          Set the foreground color of this object.
 void JTable.setGridColor(Color newColor)
          Sets the color used to draw grid lines to color and redisplays the receiver.
 void JTable.setSelectionForeground(Color selectionForeground)
          Set the foreground color for selected cells.
 void JTable.setSelectionBackground(Color selectionBackground)
          Set the background color for selected cells.
 void JTable.AccessibleJTable.AccessibleJTableCell.setBackground(Color c)
          Set the background color of this object.
 void JTable.AccessibleJTable.AccessibleJTableCell.setForeground(Color c)
          Set the foreground color of this object.
 void JTree.AccessibleJTree.AccessibleJTreeNode.setBackground(Color c)
          Set the background color of this object.
 void JTree.AccessibleJTree.AccessibleJTreeNode.setForeground(Color c)
           
 void JDialog.AccessibleJDialog.setBackground(Color c)
          Set the background color of this object.
 void JDialog.AccessibleJDialog.setForeground(Color c)
          Set the foreground color of this object.
static void DebugGraphics.setFlashColor(Color flashColor)
          Sets the Color used to flash drawing operations.
 void DebugGraphics.setColor(Color aColor)
          Sets the color to be used for drawing and filling lines and shapes.
 void DebugGraphics.setXORMode(Color aColor)
           
 boolean DebugGraphics.drawImage(Image img, int x, int y, Color bgcolor, ImageObserver observer)
           
 boolean DebugGraphics.drawImage(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer)
           
 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)
           
static Color JColorChooser.showDialog(Component component, String title, Color initialColor)
          Shows a modal color-chooser dialog and blocks until the dialog is hidden.
 void JColorChooser.setColor(Color color)
          Sets the current color of the color chooser to the specified color.
 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 JInternalFrame.setBackground(Color c)
          Set the background color of this object.
 void JInternalFrame.setForeground(Color c)
          Set the foreground color of this object.
 void JApplet.AccessibleJApplet.setBackground(Color c)
          Set the background color of this object.
 void JApplet.AccessibleJApplet.setForeground(Color c)
          Set the foreground color of this object.
 void Box.Filler.AccessibleBoxFiller.setBackground(Color c)
          Sets the background color of this object.
 void Box.Filler.AccessibleBoxFiller.setForeground(Color c)
          Sets the foreground color of this object.
 void Box.AccessibleBox.setBackground(Color c)
          Sets the background color of this object.
 void Box.AccessibleBox.setForeground(Color c)
          Sets the foreground color of this object.
 void JList.setSelectionForeground(Color selectionForeground)
          Set the foreground color for selected cells.
 void JList.setSelectionBackground(Color selectionBackground)
          Set the background color for selected cells.
 void JList.AccessibleJList.AccessibleJListChild.setBackground(Color c)
           
 void JList.AccessibleJList.AccessibleJListChild.setForeground(Color c)
           
 

Constructors in com.sun.java.swing with parameters of type Color
JColorChooser.JColorChooser(Color initialColor)
          Creates a color chooser pane with the specified initial color.
 

Uses of Color in com.sun.java.swing.border
 

Fields in com.sun.java.swing.border declared as Color
protected  Color BevelBorder.highlightOuter
           
protected  Color BevelBorder.highlightInner
           
protected  Color BevelBorder.shadowInner
           
protected  Color BevelBorder.shadowOuter
           
protected  Color EtchedBorder.highlight
           
protected  Color EtchedBorder.shadow
           
protected  Color LineBorder.lineColor
           
protected  Color MatteBorder.color
           
protected  Color TitledBorder.titleColor
           
 

Methods in com.sun.java.swing.border that return Color
 Color BevelBorder.getHighlightOuterColor(Component c)
          Returns the outer highlight color of the bevel border.
 Color BevelBorder.getHighlightInnerColor(Component c)
          Returns the inner highlight color of the bevel border.
 Color BevelBorder.getShadowInnerColor(Component c)
          Returns the inner shadow color of the bevel border.
 Color BevelBorder.getShadowOuterColor(Component c)
          Returns the outer shadow color of the bevel border.
 Color EtchedBorder.getHighlightColor(Component c)
          Returns the highlight color of the etched border.
 Color EtchedBorder.getShadowColor(Component c)
          Returns the shadow color of the etched border.
 Color LineBorder.getLineColor()
          Returns the color of the border.
 Color TitledBorder.getTitleColor()
          Returns the title-color of the titled border.
 

Methods in com.sun.java.swing.border with parameters of type Color
 void TitledBorder.setTitleColor(Color titleColor)
          Sets the title-color of the titled border.
 

Constructors in com.sun.java.swing.border with parameters of type Color
BevelBorder.BevelBorder(int bevelType, Color highlight, Color shadow)
          Creates a bevel border with the specified type, highlight and shadow colors.
BevelBorder.BevelBorder(int bevelType, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner)
          Creates a bevel border with the specified type, highlight shadow colors.
SoftBevelBorder.SoftBevelBorder(int bevelType, Color highlight, Color shadow)
          Creates a bevel border with the specified type, highlight and shadow colors.
SoftBevelBorder.SoftBevelBorder(int bevelType, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner)
          Creates a bevel border with the specified type, highlight shadow colors.
EtchedBorder.EtchedBorder(Color highlight, Color shadow)
          Creates a lowered etched border with the specified highlight and shadow colors.
EtchedBorder.EtchedBorder(int etchType, Color highlight, Color shadow)
          Creates an etched border with the specified etch-type, highlight and shadow colors.
LineBorder.LineBorder(Color color)
          Creates a line border with the specified color and a thickness = 1.
LineBorder.LineBorder(Color color, int thickness)
          Creates a line border with the specified color and thickness.
MatteBorder.MatteBorder(int top, int left, int bottom, int right, Color color)
          Creates a matte border with the specified insets and color.
TitledBorder.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 com.sun.java.swing.plaf
 

Subclasses of Color in com.sun.java.swing.plaf
  ColorUIResource
           
 

Constructors in com.sun.java.swing.plaf with parameters of type Color
ColorUIResource.ColorUIResource(Color c)
           
BorderUIResource.LineBorderUIResource.BorderUIResource.LineBorderUIResource(Color color)
           
BorderUIResource.LineBorderUIResource.BorderUIResource.LineBorderUIResource(Color color, int thickness)
           
BorderUIResource.BevelBorderUIResource.BorderUIResource.BevelBorderUIResource(int bevelType, Color highlight, Color shadow)
           
BorderUIResource.BevelBorderUIResource.BorderUIResource.BevelBorderUIResource(int bevelType, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner)
           
BorderUIResource.EtchedBorderUIResource.BorderUIResource.EtchedBorderUIResource(Color highlight, Color shadow)
           
BorderUIResource.EtchedBorderUIResource.BorderUIResource.EtchedBorderUIResource(int etchType, Color highlight, Color shadow)
           
BorderUIResource.MatteBorderUIResource.BorderUIResource.MatteBorderUIResource(int top, int left, int bottom, int right, Color color)
           
BorderUIResource.TitledBorderUIResource.BorderUIResource.TitledBorderUIResource(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor)
           
 

Uses of Color in com.sun.java.swing.table
 

Methods in com.sun.java.swing.table that return Color
 Color JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getBackground()
           
 Color JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getForeground()
           
 

Methods in com.sun.java.swing.table with parameters of type Color
 void JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.setBackground(Color c)
           
 void JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.setForeground(Color c)
           
 void DefaultTableCellRenderer.setForeground(Color c)
           
 void DefaultTableCellRenderer.setBackground(Color c)
           
 

Uses of Color in com.sun.java.swing.text
 

Methods in com.sun.java.swing.text that return Color
 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.
 Color DefaultHighlighter.DefaultHighlightPainter.getColor()
          Returns the color of the highlight.
 Color DefaultStyledDocument.getForeground(AttributeSet attr)
          Gets the foreground color from an attribute set.
 Color DefaultStyledDocument.getBackground(AttributeSet attr)
          Gets the background color from an attribute set.
 Color StyleContext.getForeground(AttributeSet attr)
          Takes a set of attributes and turn it into a foreground color specification.
 Color StyleContext.getBackground(AttributeSet attr)
          Takes a set of attributes and turn it into a background color specification.
 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.
static Color StyleConstants.getForeground(AttributeSet a)
          Gets the foreground color setting from the attribute list.
static Color StyleConstants.getBackground(AttributeSet a)
          Gets the background color setting from the attribute list.
 

Methods in com.sun.java.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.
static void StyleConstants.setForeground(MutableAttributeSet a, Color fg)
          Sets the foreground color.
static void StyleConstants.setBackground(MutableAttributeSet a, Color fg)
          Sets the background color.
 

Constructors in com.sun.java.swing.text with parameters of type Color
DefaultHighlighter.DefaultHighlightPainter.DefaultHighlighter.DefaultHighlightPainter(Color c)
          Constructs a new highlight painter.
StyledEditorKit.ForegroundAction.StyledEditorKit.ForegroundAction(String nm, Color fg)
          Creates a new ForegroundAction.
 

Uses of Color in com.sun.java.swing.text.html
 

Methods in com.sun.java.swing.text.html that return Color
 Color StyleSheet.getForeground(AttributeSet a)
          Takes a set of attributes and turn it into a foreground color specification.
 Color StyleSheet.getBackground(AttributeSet a)
          Takes a set of attributes and turn it into a background color specification.
 Color StyleSheet.stringToColor(String str)
          Convert a color string "RED" or "#NNNNNN" to a Color.
 

Uses of Color in com.sun.java.swing.tree
 

Fields in com.sun.java.swing.tree declared as Color
protected  Color DefaultTreeCellEditor.borderSelectionColor
          True if the border selection color should be drawn.
protected  Color DefaultTreeCellRenderer.textSelectionColor
          Color to use for the foreground for selected nodes.
protected  Color DefaultTreeCellRenderer.textNonSelectionColor
          Color to use for the foreground for non-selected nodes.
protected  Color DefaultTreeCellRenderer.backgroundSelectionColor
          Color to use for the background when a node is selected.
protected  Color DefaultTreeCellRenderer.backgroundNonSelectionColor
          Color to use for the background when the node isn't selected.
protected  Color DefaultTreeCellRenderer.borderSelectionColor
          Color to use for the background when the node isn't selected.
 

Methods in com.sun.java.swing.tree that return Color
 Color DefaultTreeCellEditor.getBorderSelectionColor()
          Returns the color the border is drawn.
 Color DefaultTreeCellRenderer.getTextSelectionColor()
          Returns the color the text is drawn with when the node is selected.
 Color DefaultTreeCellRenderer.getTextNonSelectionColor()
          Returns the color the text is drawn with when the node isn't selected.
 Color DefaultTreeCellRenderer.getBackgroundSelectionColor()
          Returns the color to use for the background if node is selected.
 Color DefaultTreeCellRenderer.getBackgroundNonSelectionColor()
          Returns the background color to be used for non selected nodes.
 Color DefaultTreeCellRenderer.getBorderSelectionColor()
          Returns the color the border is drawn.
 

Methods in com.sun.java.swing.tree with parameters of type Color
 void DefaultTreeCellEditor.setBorderSelectionColor(Color newColor)
          Sets the color to use for the border.
 void DefaultTreeCellRenderer.setTextSelectionColor(Color newColor)
          Sets the color the text is drawn with when the node is selected.
 void DefaultTreeCellRenderer.setTextNonSelectionColor(Color newColor)
          Sets the color the text is drawn with when the node isn't selected.
 void DefaultTreeCellRenderer.setBackgroundSelectionColor(Color newColor)
          Sets the color to use for the background if node is selected.
 void DefaultTreeCellRenderer.setBackgroundNonSelectionColor(Color newColor)
          Sets the background color to be used for non selected nodes.
 void DefaultTreeCellRenderer.setBorderSelectionColor(Color newColor)
          Sets the color to use for the border.
 void DefaultTreeCellRenderer.setBackground(Color color)
          Subclassed to only accept the color if it isn't a ColorUIResource.
 

Uses of Color in java.awt
 

Subclasses of Color in java.awt
  SystemColor
          A class to encapsulate symbolic colors representing the color of GUI objects on a system.
 

Fields in java.awt declared as Color
static Color Color.white
          The color white.
static Color Color.lightGray
          The color light gray.
static Color Color.gray
          The color gray.
static Color Color.darkGray
          The color dark gray.
static Color Color.black
          The color black.
static Color Color.red
          The color red.
static Color Color.pink
          The color pink.
static Color Color.orange
          The color orange.
static Color Color.yellow
          The color yellow.
static Color Color.green
          The color green.
static Color Color.magenta
          The color magenta.
static Color Color.cyan
          The color cyan.
static Color Color.blue
          The color blue.
 

Methods in java.awt that return Color
 Color Component.getForeground()
          Gets the foreground color of this component.
 Color Component.getBackground()
          Gets the background color of this component.
abstract  Color Graphics.getColor()
          Gets this graphics context's current color.
 Color Color.brighter()
          Creates a brighter version of this color.
 Color Color.darker()
          Creates a darker version of this color.
static Color Color.decode(String nm)
          Converts a string to an integer and returns the specified opaque color.
static Color Color.getColor(String nm)
          Finds a color in the system properties.
static Color Color.getColor(String nm, Color v)
          Finds a color in the system properties.
static Color Color.getColor(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 values supplied for the HSB color model.
abstract  Color Graphics2D.getBackground()
          Returns the background color used for clearing a region.
 

Methods in java.awt with parameters of type Color
 void Component.setForeground(Color c)
          Sets the foreground color of this component.
 void Component.setBackground(Color c)
          Sets the background color of this component.
abstract  void Graphics.setColor(Color c)
          Sets this graphics context's current color to the specified color.
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.
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.
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 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.
static Color Color.getColor(String nm, Color v)
          Finds a color in the system properties.
abstract  void Graphics2D.setBackground(Color color)
          Sets the background color in this context used for clearing a region.
 

Constructors in java.awt with parameters of type Color
GradientPaint.GradientPaint(float x1, float y1, Color color1, float x2, float y2, Color color2)
          Constructs a simple acyclic GradientPaint object.
GradientPaint.GradientPaint(Point2D pt1, Color color1, Point2D pt2, Color color2)
          Constructs a simple acyclic GradientPaint object.
GradientPaint.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.GradientPaint(Point2D pt1, Color color1, Point2D pt2, Color color2, boolean cyclic)
          Constructs either a cyclic or acyclic GradientPaint object depending on the boolean parameter.
 


Java Platform 1.2
Beta 4

Submit a bug or feature
Submit comments/suggestions about new javadoc look
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.
This documentation was generated with a post-Beta4 version of Javadoc.