Uses of Class
java.awt.Color
Packages that use 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
Methods in com.sun.java.accessibility.util that return ColorModifier and TypeMethodDescriptionTranslator.getBackground()Get the backgroundColorof this object.Translator.getForeground()Get the foregroundColorof this object.Methods in com.sun.java.accessibility.util with parameters of type ColorModifier and TypeMethodDescriptionvoidTranslator.setBackground(Color c) Set the backgroundColorof this object.voidTranslator.setForeground(Color c) Set the foregroundColorof this object. -
Uses of Color in java.awt
Modifier and TypeClassDescriptionfinal classA class to encapsulate symbolic colors representing the color of native GUI objects on a system.Modifier and TypeFieldDescriptionstatic final ColorColor.blackThe color black.static final ColorColor.BLACKThe color black.static final ColorColor.blueThe color blue.static final ColorColor.BLUEThe color blue.static final ColorColor.cyanThe color cyan.static final ColorColor.CYANThe color cyan.static final ColorColor.DARK_GRAYThe color dark gray.static final ColorColor.darkGrayThe color dark gray.static final ColorColor.grayThe color gray.static final ColorColor.GRAYThe color gray.static final ColorColor.greenThe color green.static final ColorColor.GREENThe color green.static final ColorColor.LIGHT_GRAYThe color light gray.static final ColorColor.lightGrayThe color light gray.static final ColorColor.magentaThe color magenta.static final ColorColor.MAGENTAThe color magenta.static final ColorColor.orangeThe color orange.static final ColorColor.ORANGEThe color orange.static final ColorColor.pinkThe color pink.static final ColorColor.PINKThe color pink.static final ColorColor.redThe color red.static final ColorColor.REDThe color red.static final ColorColor.whiteThe color white.static final ColorColor.WHITEThe color white.static final ColorColor.yellowThe color yellow.static final ColorColor.YELLOWThe color yellow.Modifier and TypeMethodDescriptionColor.brighter()Creates a newColorthat is a brighter version of thisColor.Color.darker()Creates a newColorthat is a darker version of thisColor.static ColorConverts aStringto 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 ColorGraphics2D.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 ColorFinds a color in the system properties.static ColorFinds a color in the system properties.static ColorFinds a color in the system properties.abstract ColorGraphics.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 ColorColor.getHSBColor(float h, float s, float b) Creates aColorobject 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 booleanGraphics.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 booleanGraphics.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 booleanGraphics.drawImage(Image img, int x, int y, Color bgcolor, ImageObserver observer) Draws as much of the specified image as is currently available.static ColorFinds a color in the system properties.voidComponent.AccessibleAWTComponent.setBackground(Color c) Sets the background color of this object.voidComponent.setBackground(Color c) Sets the background color of this component.abstract voidGraphics2D.setBackground(Color color) Sets the background color for theGraphics2Dcontext.voidList.AccessibleAWTList.AccessibleAWTListChild.setBackground(Color c) Set the background color of this object.voidMenuComponent.AccessibleAWTMenuComponent.setBackground(Color c) Sets the background color of this object.voidTextComponent.setBackground(Color c) Sets the background color of this text component.voidWindow.setBackground(Color bgColor) Sets the background color of this window.abstract voidSets this graphics context's current color to the specified color.voidComponent.AccessibleAWTComponent.setForeground(Color c) Sets the foreground color of this object.voidComponent.setForeground(Color c) Sets the foreground color of this component.voidList.AccessibleAWTList.AccessibleAWTListChild.setForeground(Color c) Set the foreground color of this object.voidMenuComponent.AccessibleAWTMenuComponent.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.ModifierConstructorDescriptionGradientPaint(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(Point2D pt1, Color color1, Point2D pt2, Color color2) Constructs a simple acyclicGradientPaintobject.GradientPaint(Point2D pt1, Color color1, 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(Point2D start, Point2D end, float[] fractions, Color[] colors) Constructs aLinearGradientPaintwith a defaultNO_CYCLErepeating method andSRGBcolor space.LinearGradientPaint(Point2D start, Point2D end, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod) Constructs aLinearGradientPaintwith a defaultSRGBcolor 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 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(Point2D center, float radius, float[] fractions, Color[] colors) Constructs aRadialGradientPaintwith a defaultNO_CYCLErepeating method andSRGBcolor space, using the center as the focus point.RadialGradientPaint(Point2D center, float radius, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod) Constructs aRadialGradientPaintwith a defaultSRGBcolor space, using the center as the focus point.RadialGradientPaint(Point2D center, float radius, Point2D focus, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod) Constructs aRadialGradientPaintwith a defaultSRGBcolor 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 aRadialGradientPaintwith a defaultSRGBcolor space. -
Uses of Color in javax.accessibility
Methods in javax.accessibility that return ColorModifier and TypeMethodDescriptionAccessibleComponent.getBackground()Gets the background color of this object.AccessibleComponent.getForeground()Gets the foreground color of this object.Methods in javax.accessibility with parameters of type ColorModifier and TypeMethodDescriptionvoidAccessibleComponent.setBackground(Color c) Sets the background color of this object.voidAccessibleComponent.setForeground(Color c) Sets the foreground color of this object. -
Uses of Color in javax.swing
Fields in javax.swing declared as ColorModifier and TypeFieldDescriptionprotected ColorJTable.gridColorThe color of the grid.protected ColorJTable.selectionBackgroundThe background color of selected cells.protected ColorJTable.selectionForegroundThe foreground color of selected cells.Methods in javax.swing that return ColorModifier and TypeMethodDescriptionstatic ColorDebugGraphics.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 ofkeyis aColorreturn it, otherwise returnnull.If the value ofkeyfor the givenLocaleis aColorreturn it, otherwise returnnull.static ColorReturns a color from the defaults.static ColorReturns 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 ColorJColorChooser.showDialog(Component component, String title, Color initialColor) Shows a modal color-chooser dialog and blocks until the dialog is hidden.static ColorJColorChooser.showDialog(Component component, String title, Color initialColor, boolean colorTransparencySelectionEnabled) Shows a modal color-chooser dialog and blocks until the dialog is hidden.Methods in javax.swing with parameters of type ColorModifier and TypeMethodDescriptionstatic BorderBorderFactory.createBevelBorder(int type, Color highlight, Color shadow) Creates a beveled border of the specified type, using the specified highlighting and shadowing.static BorderBorderFactory.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 BorderBorderFactory.createEtchedBorder(int type, Color highlight, Color shadow) Creates a border with an "etched" look using the specified highlighting and shading colors.static BorderBorderFactory.createEtchedBorder(Color highlight, Color shadow) Creates a border with an "etched" look using the specified highlighting and shading colors.static BorderBorderFactory.createLineBorder(Color color) Creates a line border with the specified color.static BorderBorderFactory.createLineBorder(Color color, int thickness) Creates a line border with the specified color and width.static BorderBorderFactory.createLineBorder(Color color, int thickness, boolean rounded) Creates a line border with the specified color, thickness, and corner shape.static MatteBorderBorderFactory.createMatteBorder(int top, int left, int bottom, int right, Color color) Creates a matte-look border using a solid color.static BorderBorderFactory.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 BorderBorderFactory.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 TitledBorderBorderFactory.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.booleanDebugGraphics.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.booleanDebugGraphics.drawImage(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer) OverridesGraphics.drawImage.booleanDebugGraphics.drawImage(Image img, int x, int y, Color bgcolor, ImageObserver observer) OverridesGraphics.drawImage.voidJComponent.setBackground(Color bg) Sets the background color of this component.voidJList.AccessibleJList.AccessibleJListChild.setBackground(Color c) voidJTable.AccessibleJTable.AccessibleJTableCell.setBackground(Color c) Sets the background color of this object.voidJTree.AccessibleJTree.AccessibleJTreeNode.setBackground(Color c) Set the background color of this object.voidJTabbedPane.setBackgroundAt(int index, Color background) Sets the background color atindextobackgroundwhich can benull, in which case the tab's background color will default to the background color of thetabbedpane.voidSets the color to be used for drawing and filling lines and shapes.voidSets the current color of the color chooser to the specified color.static voidDebugGraphics.setFlashColor(Color flashColor) Sets the Color used to flash drawing operations.voidJComponent.setForeground(Color fg) Sets the foreground color of this component.voidJList.AccessibleJList.AccessibleJListChild.setForeground(Color c) voidJTable.AccessibleJTable.AccessibleJTableCell.setForeground(Color c) Sets the foreground color of this object.voidJTree.AccessibleJTree.AccessibleJTreeNode.setForeground(Color c) voidJTabbedPane.setForegroundAt(int index, Color foreground) Sets the foreground color atindextoforegroundwhich can benull, in which case the tab's foreground color will default to the foreground color of thistabbedpane.voidJTable.setGridColor(Color gridColor) Sets the color used to draw grid lines togridColorand redisplays.voidJList.setSelectionBackground(Color selectionBackground) Sets the color used to draw the background of selected items, which cell renderers can use fill selected cells.voidJTable.setSelectionBackground(Color selectionBackground) Sets the background color for selected cells.voidJList.setSelectionForeground(Color selectionForeground) Sets the color used to draw the foreground of selected items, which cell renderers can use to render text and graphics.voidJTable.setSelectionForeground(Color selectionForeground) Sets the foreground color for selected cells.voidDebugGraphics.setXORMode(Color aColor) OverridesGraphics.setXORMode.static ColorJColorChooser.showDialog(Component component, String title, Color initialColor) Shows a modal color-chooser dialog and blocks until the dialog is hidden.static ColorJColorChooser.showDialog(Component component, String title, Color initialColor, boolean colorTransparencySelectionEnabled) Shows a modal color-chooser dialog and blocks until the dialog is hidden.Constructors in javax.swing with parameters of type ColorModifierConstructorDescriptionJColorChooser(Color initialColor) Creates a color chooser pane with the specified initial color. -
Uses of Color in javax.swing.border
Fields in javax.swing.border declared as ColorModifier and TypeFieldDescriptionprotected ColorMatteBorder.colorThe color rendered for the border.protected ColorEtchedBorder.highlightThe color to use for the etched highlight.protected ColorBevelBorder.highlightInnerThe color to use for the bevel inner highlight.protected ColorBevelBorder.highlightOuterThe color to use for the bevel outer highlight.protected ColorLineBorder.lineColorColor of the border.protected ColorEtchedBorder.shadowThe color to use for the etched shadow.protected ColorBevelBorder.shadowInnerThe color to use for the bevel inner shadow.protected ColorBevelBorder.shadowOuterthe color to use for the bevel outer shadowprotected ColorTitledBorder.titleColorThe color of the title.Methods in javax.swing.border that return ColorModifier 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.Methods in javax.swing.border with parameters of type ColorModifier and TypeMethodDescriptionvoidTitledBorder.setTitleColor(Color titleColor) Sets the title-color of the titled border.Constructors in javax.swing.border with parameters of type ColorModifierConstructorDescriptionBevelBorder(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
Methods in javax.swing.colorchooser that return ColorModifier and TypeMethodDescriptionprotected ColorAbstractColorChooserPanel.getColorFromModel()Returns the color that is currently selected.ColorSelectionModel.getSelectedColor()Returns the selectedColorwhich should be non-null.DefaultColorSelectionModel.getSelectedColor()Returns the selectedColorwhich should be non-null.Methods in javax.swing.colorchooser with parameters of type ColorModifier and TypeMethodDescriptionvoidColorSelectionModel.setSelectedColor(Color color) Sets the selected color tocolor.voidDefaultColorSelectionModel.setSelectedColor(Color color) Sets the selected color tocolor.Constructors in javax.swing.colorchooser with parameters of type ColorModifierConstructorDescriptionDefaultColorSelectionModel(Color color) Creates aDefaultColorSelectionModelwith the current color set tocolor, which should be non-null. -
Uses of Color in javax.swing.plaf
Subclasses of Color in javax.swing.plafModifier and TypeClassDescriptionclassA subclass of Color that implements UIResource.Constructors in javax.swing.plaf with parameters of type ColorModifierConstructorDescriptionBevelBorderUIResource(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
Fields in javax.swing.plaf.basic declared as ColorModifier and TypeFieldDescriptionprotected ColorBasicMenuItemUI.acceleratorForegroundThe color of the accelerator foreground.protected ColorBasicMenuItemUI.acceleratorSelectionForegroundThe color of the accelerator selection.protected ColorBasicBorders.ButtonBorder.darkShadowThe color of dark shadow.protected ColorBasicBorders.FieldBorder.darkShadowThe color of dark shadow.protected ColorBasicTabbedPaneUI.darkShadowDark shadow colorprotected ColorBasicMenuItemUI.disabledForegroundThe color of the disabled foreground.protected ColorBasicToolBarUI.dockingBorderColorThe color of the docking border.protected ColorBasicToolBarUI.dockingColorThe background color of the docking border.protected ColorBasicToolBarUI.floatingBorderColorThe color of the not docking border.protected ColorBasicToolBarUI.floatingColorThe background color of the not docking border.protected ColorBasicTabbedPaneUI.focusFocus colorprotected ColorBasicBorders.ButtonBorder.highlightThe color of highlight.protected ColorBasicBorders.FieldBorder.highlightThe color of highlight.protected ColorBasicBorders.SplitPaneBorder.highlightThe color of highlightprotected ColorBasicSeparatorUI.highlightThe color of the highlighting.protected ColorBasicTabbedPaneUI.highlightHighlight colorprotected ColorBasicBorders.ButtonBorder.lightHighlightThe color of light highlight.protected ColorBasicBorders.FieldBorder.lightHighlightThe color of light highlight.protected ColorBasicTabbedPaneUI.lightHighlightLight highlight colorprotected ColorBasicInternalFrameTitlePane.notSelectedTextColorThe color of a not selected text.protected ColorBasicInternalFrameTitlePane.notSelectedTitleColorThe color of a not selected title.protected ColorBasicInternalFrameTitlePane.selectedTextColorThe color of a selected text.protected ColorBasicInternalFrameTitlePane.selectedTitleColorThe color of a selected title.protected ColorBasicMenuItemUI.selectionBackgroundThe color of the selection background.protected ColorBasicMenuItemUI.selectionForegroundThe color of the selection foreground.protected ColorBasicBorders.ButtonBorder.shadowThe color of shadow.protected ColorBasicBorders.FieldBorder.shadowThe color of shadow.protected ColorBasicBorders.SplitPaneBorder.shadowThe color of shadowprotected ColorBasicSeparatorUI.shadowThe color of the shadow.protected ColorBasicTabbedPaneUI.shadowShadow colorprotected ColorBasicScrollBarUI.thumbColorThumb colorprotected ColorBasicScrollBarUI.thumbDarkShadowColorThumb dark shadow colorprotected ColorBasicScrollBarUI.thumbHighlightColorThumb highlight colorprotected ColorBasicScrollBarUI.thumbLightShadowColorThumb light shadow colorprotected ColorBasicScrollBarUI.trackColorTrack colorprotected ColorBasicScrollBarUI.trackHighlightColorTrack highlight colorMethods in javax.swing.plaf.basic that return 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 ColorBasicSliderUI.getFocusColor()Returns the focus color.protected ColorBasicTreeUI.getHashColor()Returns the hash color.protected ColorBasicSliderUI.getHighlightColor()Returns the highlight color.protected ColorBasicProgressBarUI.getSelectionBackground()The "selectionBackground" is the color of the text when it is painted over an unfilled area of the progress bar.protected ColorBasicProgressBarUI.getSelectionForeground()The "selectionForeground" is the color of the text when it is painted over a filled area of the progress bar.protected ColorBasicSliderUI.getShadowColor()Returns the shadow color.Methods in javax.swing.plaf.basic with parameters of type ColorModifier and TypeMethodDescriptionstatic voidBasicGraphicsUtils.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 voidBasicGraphicsUtils.drawEtchedRect(Graphics g, int x, int y, int w, int h, Color shadow, Color darkShadow, Color highlight, Color lightHighlight) Draws an etched rectangle.static voidBasicGraphicsUtils.drawGroove(Graphics g, int x, int y, int w, int h, Color shadow, Color highlight) Draws a groove.static voidBasicGraphicsUtils.drawLoweredBezel(Graphics g, int x, int y, int w, int h, Color shadow, Color darkShadow, Color highlight, Color lightHighlight) Draws a lowered bezel.protected voidBasicMenuItemUI.paintBackground(Graphics g, JMenuItem menuItem, Color bgColor) Draws the background of the menu item.protected voidBasicMenuItemUI.paintMenuItem(Graphics g, JComponent c, Icon checkIcon, Icon arrowIcon, Color background, Color foreground, int defaultTextIconGap) Paints a menu item.voidBasicToolBarUI.DragWindow.setBorderColor(Color c) Sets the border color.voidBasicToolBarUI.setDockingColor(Color c) Sets the color displayed when over a docking areavoidBasicToolBarUI.setFloatingColor(Color c) Sets the color displayed when over a floating areaprotected voidBasicTreeUI.setHashColor(Color color) Sets the hash color.Constructors in javax.swing.plaf.basic with parameters of type ColorModifierConstructorDescriptionBasicArrowButton(int direction, Color background, Color shadow, Color darkShadow, Color highlight) Creates aBasicArrowButtonwhose 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
Fields in javax.swing.plaf.metal declared as ColorModifier and TypeFieldDescriptionprotected static ColorMetalSliderUI.darkShadowColorThe color of dark shadow.protected ColorMetalButtonUI.disabledTextColorThe color of the disabled color.protected ColorMetalRadioButtonUI.disabledTextColorThe color of a disabled text.protected ColorMetalToggleButtonUI.disabledTextColorThe color of a disabled text.protected ColorMetalButtonUI.focusColorThe color of the focused button.protected ColorMetalRadioButtonUI.focusColorThe color of the focused radio button.protected ColorMetalToggleButtonUI.focusColorThe color of a focused toggle button.protected static ColorMetalSliderUI.highlightColorThe color of highlighting.protected ColorMetalButtonUI.selectColorThe color of the selected button.protected ColorMetalRadioButtonUI.selectColorThe color of the selected radio button.protected ColorMetalTabbedPaneUI.selectColorThe color of the selected pane.protected ColorMetalToggleButtonUI.selectColorThe color of a selected button.protected ColorMetalTabbedPaneUI.selectHighlightThe color of the highlight.protected ColorMetalTabbedPaneUI.tabAreaBackgroundThe color of tab's background.protected static ColorMetalSliderUI.thumbColorThe color of a thumbMethods in javax.swing.plaf.metal that return ColorModifier and TypeMethodDescriptionprotected ColorMetalTabbedPaneUI.getColorForGap(int currentRun, int x, int y) Returns the color of the gap.protected ColorMetalButtonUI.getDisabledTextColor()Returns the color of a disabled text.protected ColorMetalRadioButtonUI.getDisabledTextColor()Returns the color of the disabled text.protected ColorMetalToggleButtonUI.getDisabledTextColor()Returns the color of a disabled text.protected ColorMetalButtonUI.getFocusColor()Returns the color of the focused button.protected ColorMetalRadioButtonUI.getFocusColor()Returns the color of the focusedJRadioButton.protected ColorMetalToggleButtonUI.getFocusColor()Returns the color of a focused toggle button.protected ColorMetalButtonUI.getSelectColor()Returns the color of the selected button.protected ColorMetalRadioButtonUI.getSelectColor()Returns the color of the selectedJRadioButton.protected ColorMetalToggleButtonUI.getSelectColor()Returns the color of a selected button. -
Uses of Color in javax.swing.plaf.nimbus
Methods in javax.swing.plaf.nimbus that return ColorModifier and TypeMethodDescriptionprotected final ColorAbstractRegionPainter.decodeColor(Color color1, Color color2, float midPoint) Decodes and returns a color, which is derived from a offset between two other colors.protected final ColorAbstractRegionPainter.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 ColorNimbusStyle.getColorForState(SynthContext ctx, ColorType type) Returns the color for the specified state.protected final ColorAbstractRegionPainter.getComponentColor(JComponent c, String property, Color defaultColor, float saturationOffset, float brightnessOffset, int alphaOffset) Get a color property from the given JComponent.protected final ColorNimbusLookAndFeel.getDerivedColor(Color color1, Color color2, float midPoint) Decodes and returns a color, which is derived from a offset between two other colors.protected final ColorNimbusLookAndFeel.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.Methods in javax.swing.plaf.nimbus with parameters of type ColorModifier and TypeMethodDescriptionprotected final ColorAbstractRegionPainter.decodeColor(Color color1, Color color2, float midPoint) Decodes and returns a color, which is derived from a offset between two other colors.protected final LinearGradientPaintAbstractRegionPainter.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 RadialGradientPaintAbstractRegionPainter.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 ColorAbstractRegionPainter.getComponentColor(JComponent c, String property, Color defaultColor, float saturationOffset, float brightnessOffset, int alphaOffset) Get a color property from the given JComponent.protected final ColorNimbusLookAndFeel.getDerivedColor(Color color1, Color color2, float midPoint) Decodes and returns a color, which is derived from a offset between two other colors.protected final ColorNimbusLookAndFeel.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
Methods in javax.swing.plaf.synth that return ColorModifier and TypeMethodDescriptionSynthStyle.getColor(SynthContext context, ColorType type) Returns the color for the specified state.protected abstract ColorSynthStyle.getColorForState(SynthContext context, ColorType type) Returns the color for the specified state. -
Uses of Color in javax.swing.table
Methods in javax.swing.table that return ColorModifier and TypeMethodDescriptionJTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getBackground()JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getForeground()Methods in javax.swing.table with parameters of type ColorModifier and TypeMethodDescriptionvoidDefaultTableCellRenderer.setBackground(Color c) OverridesJComponent.setBackgroundto assign the unselected-background color to the specified color.voidJTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.setBackground(Color c) voidDefaultTableCellRenderer.setForeground(Color c) OverridesJComponent.setForegroundto assign the unselected-foreground color to the specified color.voidJTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.setForeground(Color c) -
Uses of Color in javax.swing.text
Methods in javax.swing.text that return ColorModifier 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 ColorStyleConstants.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 ColorStyleConstants.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.Methods in javax.swing.text with parameters of type ColorModifier and TypeMethodDescriptionprotected voidLabelView.setBackground(Color bg) Sets the background color for the view.static voidStyleConstants.setBackground(MutableAttributeSet a, Color fg) Sets the background color.voidJTextComponent.setCaretColor(Color c) Sets the current color used to render the caret.voidJTextComponent.setDisabledTextColor(Color c) Sets the current color used to render the disabled text.static voidStyleConstants.setForeground(MutableAttributeSet a, Color fg) Sets the foreground color.voidJTextComponent.setSelectedTextColor(Color c) Sets the current color used to render the selected text.voidJTextComponent.setSelectionColor(Color c) Sets the current color used to render the selection.Constructors in javax.swing.text with parameters of type ColorModifierConstructorDescriptionConstructs a new highlight painter.ForegroundAction(String nm, Color fg) Creates a new ForegroundAction. -
Uses of Color in javax.swing.text.html
Methods in javax.swing.text.html that return ColorModifier 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
Fields in javax.swing.tree declared as ColorModifier and TypeFieldDescriptionprotected ColorDefaultTreeCellRenderer.backgroundNonSelectionColorColor to use for the background when the node isn't selected.protected ColorDefaultTreeCellRenderer.backgroundSelectionColorColor to use for the background when a node is selected.protected ColorDefaultTreeCellEditor.borderSelectionColorTrue if the border selection color should be drawn.protected ColorDefaultTreeCellRenderer.borderSelectionColorColor to use for the focus indicator when the node has focus.protected ColorDefaultTreeCellRenderer.textNonSelectionColorColor to use for the foreground for non-selected nodes.protected ColorDefaultTreeCellRenderer.textSelectionColorColor to use for the foreground for selected nodes.Methods in javax.swing.tree that return ColorModifier 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.Methods in javax.swing.tree with parameters of type ColorModifier and TypeMethodDescriptionvoidDefaultTreeCellRenderer.setBackground(Color color) Subclassed to mapColorUIResources to null.voidDefaultTreeCellRenderer.setBackgroundNonSelectionColor(Color newColor) Sets the background color to be used for non selected nodes.voidDefaultTreeCellRenderer.setBackgroundSelectionColor(Color newColor) Sets the color to use for the background if node is selected.voidDefaultTreeCellEditor.setBorderSelectionColor(Color newColor) Sets the color to use for the border.voidDefaultTreeCellRenderer.setBorderSelectionColor(Color newColor) Sets the color to use for the border.voidDefaultTreeCellRenderer.setTextNonSelectionColor(Color newColor) Sets the color the text is drawn with when the node isn't selected.voidDefaultTreeCellRenderer.setTextSelectionColor(Color newColor) Sets the color the text is drawn with when the node is selected.