Uses of Class
java.awt.Color
-
Packages that use Color Package Description java.awt Contains all of the classes for creating user interfaces and for painting graphics and images. -
-
Uses of Color in java.awt
Subclasses of Color in java.awt Modifier and Type Class and Description classSystemColorA class to encapsulate symbolic colors representing the color of native GUI objects on a system.Fields in java.awt declared as Color Modifier and Type Field and Description static ColorColor. blackThe color black.static ColorColor. BLACKThe color black.static ColorColor. blueThe color blue.static ColorColor. BLUEThe color blue.static ColorColor. cyanThe color cyan.static ColorColor. CYANThe color cyan.static ColorColor. DARK_GRAYThe color dark gray.static ColorColor. darkGrayThe color dark gray.static ColorColor. grayThe color gray.static ColorColor. GRAYThe color gray.static ColorColor. greenThe color green.static ColorColor. GREENThe color green.static ColorColor. LIGHT_GRAYThe color light gray.static ColorColor. lightGrayThe color light gray.static ColorColor. magentaThe color magenta.static ColorColor. MAGENTAThe color magenta.static ColorColor. orangeThe color orange.static ColorColor. ORANGEThe color orange.static ColorColor. pinkThe color pink.static ColorColor. PINKThe color pink.static ColorColor. redThe color red.static ColorColor. REDThe color red.static ColorColor. whiteThe color white.static ColorColor. WHITEThe color white.static ColorColor. yellowThe color yellow.static ColorColor. YELLOWThe color yellow.Methods in java.awt that return Color Modifier and Type Method and Description ColorColor. brighter()Creates a newColorthat is a brighter version of thisColor.ColorColor. darker()Creates a newColorthat is a darker version of thisColor.static ColorColor. decode(java.lang.String nm)Converts aStringto an integer and returns the specified opaqueColor.ColorWindow. getBackground()Gets the background color of this window.ColorTextComponent. getBackground()Gets the background color of this text component.ColorMenuComponent.AccessibleAWTMenuComponent. getBackground()Gets the background color of this object.ColorList.AccessibleAWTList.AccessibleAWTListChild. getBackground()Get the background color of this object.abstract ColorGraphics2D. getBackground()Returns the background color used for clearing a region.ColorComponent. getBackground()Gets the background color of this component.ColorComponent.AccessibleAWTComponent. getBackground()Gets the background color of this object.abstract ColorGraphics. getColor()Gets this graphics context's current color.static ColorColor. getColor(java.lang.String nm)Finds a color in the system properties.static ColorColor. getColor(java.lang.String nm, Color v)Finds a color in the system properties.static ColorColor. getColor(java.lang.String nm, int v)Finds a color in the system properties.ColorGradientPaint. getColor1()Returns the color C1 anchored by the point P1.ColorGradientPaint. getColor2()Returns the color C2 anchored by the point P2.Color[]MultipleGradientPaint. getColors()Returns a copy of the array of colors used by this gradient.ColorMenuComponent.AccessibleAWTMenuComponent. getForeground()Gets the foreground color of this object.ColorList.AccessibleAWTList.AccessibleAWTListChild. getForeground()Get the foreground color of this object.ColorComponent. getForeground()Gets the foreground color of this component.ColorComponent.AccessibleAWTComponent. getForeground()Gets the foreground color of this object.static ColorColor. getHSBColor(float h, float s, float b)Creates aColorobject based on the specified values for the HSB color model.ColorRobot. getPixelColor(int x, int y)Returns the color of a pixel at the given screen coordinates.Methods in java.awt with parameters of type Color Modifier and Type Method and Description abstract booleanGraphics. drawImage(Image img, int x, int y, Color bgcolor, java.awt.image.ImageObserver observer)Draws as much of the specified image as is currently available.abstract booleanGraphics. drawImage(Image img, int x, int y, int width, int height, Color bgcolor, java.awt.image.ImageObserver observer)Draws as much of the specified image as has already been scaled to fit inside the specified rectangle.abstract booleanGraphics. drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bgcolor, java.awt.image.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 ColorColor. getColor(java.lang.String nm, Color v)Finds a color in the system properties.voidWindow. setBackground(Color bgColor)Sets the background color of this window.voidTextComponent. setBackground(Color c)Sets the background color of this text component.voidMenuComponent.AccessibleAWTMenuComponent. setBackground(Color c)Sets the background color of this object.voidList.AccessibleAWTList.AccessibleAWTListChild. setBackground(Color c)Set the background color of this object.abstract voidGraphics2D. setBackground(Color color)Sets the background color for theGraphics2Dcontext.voidFrame. setBackground(Color bgColor)Sets the background color of this window.voidDialog. setBackground(Color bgColor)Sets the background color of this window.voidComponent. setBackground(Color c)Sets the background color of this component.voidComponent.AccessibleAWTComponent. setBackground(Color c)Sets the background color of this object.abstract voidGraphics. setColor(Color c)Sets this graphics context's current color to the specified color.voidMenuComponent.AccessibleAWTMenuComponent. setForeground(Color c)Sets the foreground color of this object.voidList.AccessibleAWTList.AccessibleAWTListChild. setForeground(Color c)Set the foreground color of this object.voidComponent. setForeground(Color c)Sets the foreground color of this component.voidComponent.AccessibleAWTComponent. setForeground(Color c)Sets the foreground color of this object.abstract voidGraphics. 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.Constructors in java.awt with parameters of type Color Constructor and Description GradientPaint(float x1, float y1, Color color1, float x2, float y2, Color color2)Constructs a simple acyclicGradientPaintobject.GradientPaint(float x1, float y1, Color color1, float x2, float y2, Color color2, boolean cyclic)Constructs either a cyclic or acyclicGradientPaintobject depending on thebooleanparameter.GradientPaint(java.awt.geom.Point2D pt1, Color color1, java.awt.geom.Point2D pt2, Color color2)Constructs a simple acyclicGradientPaintobject.GradientPaint(java.awt.geom.Point2D pt1, Color color1, java.awt.geom.Point2D pt2, Color color2, boolean cyclic)Constructs either a cyclic or acyclicGradientPaintobject depending on thebooleanparameter.LinearGradientPaint(float startX, float startY, float endX, float endY, float[] fractions, Color[] colors)Constructs aLinearGradientPaintwith a defaultNO_CYCLErepeating method andSRGBcolor space.LinearGradientPaint(float startX, float startY, float endX, float endY, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod)Constructs aLinearGradientPaintwith a defaultSRGBcolor space.LinearGradientPaint(java.awt.geom.Point2D start, java.awt.geom.Point2D end, float[] fractions, Color[] colors)Constructs aLinearGradientPaintwith a defaultNO_CYCLErepeating method andSRGBcolor space.LinearGradientPaint(java.awt.geom.Point2D start, java.awt.geom.Point2D end, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod)Constructs aLinearGradientPaintwith a defaultSRGBcolor space.LinearGradientPaint(java.awt.geom.Point2D start, java.awt.geom.Point2D end, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod, MultipleGradientPaint.ColorSpaceType colorSpace, java.awt.geom.AffineTransform gradientTransform)Constructs aLinearGradientPaint.RadialGradientPaint(float cx, float cy, float radius, float[] fractions, Color[] colors)Constructs aRadialGradientPaintwith a defaultNO_CYCLErepeating method andSRGBcolor space, using the center as the focus point.RadialGradientPaint(float cx, float cy, float radius, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod)Constructs aRadialGradientPaintwith a defaultSRGBcolor 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 aRadialGradientPaintwith a defaultSRGBcolor space.RadialGradientPaint(java.awt.geom.Point2D center, float radius, float[] fractions, Color[] colors)Constructs aRadialGradientPaintwith a defaultNO_CYCLErepeating method andSRGBcolor space, using the center as the focus point.RadialGradientPaint(java.awt.geom.Point2D center, float radius, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod)Constructs aRadialGradientPaintwith a defaultSRGBcolor space, using the center as the focus point.RadialGradientPaint(java.awt.geom.Point2D center, float radius, java.awt.geom.Point2D focus, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod)Constructs aRadialGradientPaintwith a defaultSRGBcolor space.RadialGradientPaint(java.awt.geom.Point2D center, float radius, java.awt.geom.Point2D focus, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod, MultipleGradientPaint.ColorSpaceType colorSpace, java.awt.geom.AffineTransform gradientTransform)Constructs aRadialGradientPaint.RadialGradientPaint(java.awt.geom.Rectangle2D gradientBounds, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod)Constructs aRadialGradientPaintwith a defaultSRGBcolor space.
-
