クラスjava.awt.Color
の使用
Colorを使用するパッケージ
パッケージ
説明
Java Accessibility Utilitiesを構成するインタフェースとクラスの集合を提供します。
ユーザー・インタフェースの作成およびグラフィックスとイメージのペイント用のすべてのクラスを含みます。
ユーザー・インタフェース・コンポーネントとそれらのコンポーネントへのアクセスを提供するユーザー補助テクノロジの間の規約を定義します。
すべてのプラットフォーム上で可能なかぎり同じように機能する「軽量」(Java共通言語)コンポーネントのセットを提供します。
Swingコンポーネントの周囲に各種ボーダーを描画するためのクラスおよびインタフェースを提供します。
JColorChooserコンポーネントによって使用されるクラスとインタフェースが含まれています。1つのインタフェースおよび多くのabstractクラスを提供しており、Swingはプラグイン可能なLook & Feel機能を提供するためにこれらを利用します。
基本Look & Feelに従って構築されたユーザー・インタフェース・オブジェクトを提供します。
デフォルトのLook & FeelであるJava Look & Feel (以前のコード名はMetal)に従って構築されたユーザー・インタフェース・オブジェクトを提供します。
クロス・プラットフォームのNimbus Look & Feelに従って構築されたユーザー・インタフェース・オブジェクトを提供します。
Synthは、すべてのペイントが委譲されるスキン設定可能なLook & Feelです。
javax.swing.JTableを処理するためのクラスとインタフェースを提供します。編集可能なテキスト・コンポーネントと編集不能なテキスト・コンポーネントを処理するクラスとインタフェースを提供します。
HTMLテキスト・エディタを作成するためのクラス
HTMLEditorKitとサポート・クラスを提供します。javax.swing.JTreeを処理するためのクラスとインタフェースを提供します。-
com.sun.java.accessibility.utilでのColorの使用
修飾子と型メソッド説明Translator.getBackground()このオブジェクトのバックグラウンドColorを取得します。Translator.getForeground()このオブジェクトのフォアグラウンドColorを取得します。型Colorのパラメータを持つcom.sun.java.accessibility.utilのメソッド修飾子と型メソッド説明voidTranslator.setBackground(Color c) このオブジェクトのバックグラウンドColorを設定します。voidTranslator.setForeground(Color c) このオブジェクトのフォアグラウンドColorを設定します。 -
java.awtでのColorの使用
修飾子と型フィールド説明static final ColorColor.black黒を表します。static final ColorColor.BLACK黒を表します。static final ColorColor.blue青を表します。static final ColorColor.BLUE青を表します。static final ColorColor.cyanシアンを表します。static final ColorColor.CYANシアンを表します。static final ColorColor.DARK_GRAYダーク・グレーを表します。static final ColorColor.darkGrayダーク・グレーを表します。static final ColorColor.grayグレーを表します。static final ColorColor.GRAYグレーを表します。static final ColorColor.green緑を表します。static final ColorColor.GREEN緑を表します。static final ColorColor.LIGHT_GRAYライト・グレーを表します。static final ColorColor.lightGrayライト・グレーを表します。static final ColorColor.magentaマゼンタを表します。static final ColorColor.MAGENTAマゼンタを表します。static final ColorColor.orangeオレンジを表します。static final ColorColor.ORANGEオレンジを表します。static final ColorColor.pinkピンクを表します。static final ColorColor.PINKピンクを表します。static final ColorColor.red赤を表します。static final ColorColor.RED赤を表します。static final ColorColor.white白を表します。static final ColorColor.WHITE白を表します。static final ColorColor.yellow黄を表します。static final ColorColor.YELLOW黄を表します。修飾子と型メソッド説明Color.brighter()このColorをより明るくした新しいColorを作成します。Color.darker()このColorをより暗くした新しいColorを作成します。static ColorStringを整数に変換し、指定された不透明なColorを返します。Component.AccessibleAWTComponent.getBackground()このオブジェクトのバックグラウンド・カラーを取得します。Component.getBackground()このコンポーネントのバックグラウンド・カラーを取得します。abstract ColorGraphics2D.getBackground()領域をクリアするのに使うバックグラウンド・カラーを返します。List.AccessibleAWTList.AccessibleAWTListChild.getBackground()このオブジェクトのバックグラウンド・カラーを取得します。MenuComponent.AccessibleAWTMenuComponent.getBackground()このオブジェクトのバックグラウンド・カラーを取得します。TextComponent.getBackground()このテキスト・コンポーネントのバックグラウンド・カラーを返します。Window.getBackground()このウィンドウのバックグラウンド・カラーを取得します。static Colorシステム・プロパティの色を検索します。static Colorシステム・プロパティの色を検索します。static Colorシステム・プロパティの色を検索します。abstract ColorGraphics.getColor()このグラフィックス・コンテキストの現在の色を返します。GradientPaint.getColor1()点P1によって固定された色C1を返します。GradientPaint.getColor2()点P2によって固定された色C2を返します。final Color[]MultipleGradientPaint.getColors()このグラデーションで使用される色の配列のコピーを返します。Component.AccessibleAWTComponent.getForeground()このオブジェクトのフォアグラウンド・カラーを取得します。Component.getForeground()このコンポーネントのフォアグラウンド・カラーを取得します。List.AccessibleAWTList.AccessibleAWTListChild.getForeground()このオブジェクトのフォアグラウンド・カラーを返します。MenuComponent.AccessibleAWTMenuComponent.getForeground()このオブジェクトのフォアグラウンド・カラーを取得します。static ColorColor.getHSBColor(float h, float s, float b) HSBカラー・モデルに指定された値に基づいて、Colorオブジェクトを作成します。Robot.getPixelColor(int x, int y) 指定されたスクリーン座標でピクセルの色を返します。修飾子と型メソッド説明abstract booleanGraphics.drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bgcolor, ImageObserver observer) 指定されたイメージのうち、現在利用可能で、描画先表面の指定された領域内に収まるように処理中にスケーリングされた部分を描画します。abstract booleanGraphics.drawImage(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer) 指定されたイメージのうち、指定された矩形内に収まるようにスケーリングされた部分を描画します。abstract booleanGraphics.drawImage(Image img, int x, int y, Color bgcolor, ImageObserver observer) 指定されたイメージのうち、現在利用可能な部分を描画します。static Colorシステム・プロパティの色を検索します。voidComponent.AccessibleAWTComponent.setBackground(Color c) このオブジェクトのバックグラウンド・カラーを設定します。voidComponent.setBackground(Color c) このコンポーネントのバックグラウンド・カラーを設定します。abstract voidGraphics2D.setBackground(Color color) Graphics2Dコンテキストの背景色を設定します。voidList.AccessibleAWTList.AccessibleAWTListChild.setBackground(Color c) このオブジェクトのバックグラウンド・カラーを設定します。voidMenuComponent.AccessibleAWTMenuComponent.setBackground(Color c) このオブジェクトのバックグラウンド・カラーを設定します。voidTextComponent.setBackground(Color c) このテキスト・コンポーネントのバックグラウンド・カラーを設定します。voidWindow.setBackground(Color bgColor) このウィンドウの背景色を設定します。abstract voidこのグラフィックス・コンテキストの現在の色を、指定された色に設定します。voidComponent.AccessibleAWTComponent.setForeground(Color c) このオブジェクトのフォアグラウンド・カラーを設定します。voidComponent.setForeground(Color c) このコンポーネントのフォアグラウンド・カラーを設定します。voidList.AccessibleAWTList.AccessibleAWTListChild.setForeground(Color c) オブジェクトのフォアグラウンド・カラーを設定します。voidMenuComponent.AccessibleAWTMenuComponent.setForeground(Color c) このオブジェクトのフォアグラウンド・カラーを設定します。abstract voidGraphics.setXORMode(Color c1) このグラフィックス・コンテキストの現在の色と新しく指定された色を切り替えるように、グラフィックス・コンテキストのペイント・モードを設定します。修飾子コンストラクタ説明GradientPaint(float x1, float y1, Color color1, float x2, float y2, Color color2) 単純な非循環式のGradientPaintオブジェクトを構築します。GradientPaint(float x1, float y1, Color color1, float x2, float y2, Color color2, boolean cyclic) booleanパラメータに応じて、循環式または非循環式のどちらかのGradientPaintオブジェクトを構築します。GradientPaint(Point2D pt1, Color color1, Point2D pt2, Color color2) 単純な非循環式のGradientPaintオブジェクトを構築します。GradientPaint(Point2D pt1, Color color1, Point2D pt2, Color color2, boolean cyclic) booleanパラメータに応じて、循環式または非循環式のどちらかのGradientPaintオブジェクトを構築します。LinearGradientPaint(float startX, float startY, float endX, float endY, float[] fractions, Color[] colors) デフォルトのNO_CYCLE繰返しメソッドとSRGBカラー・スペースでLinearGradientPaintを構築します。LinearGradientPaint(float startX, float startY, float endX, float endY, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod) デフォルトのSRGBカラー・スペースでLinearGradientPaintを構築します。LinearGradientPaint(Point2D start, Point2D end, float[] fractions, Color[] colors) デフォルトのNO_CYCLE繰返しメソッドとSRGBカラー・スペースでLinearGradientPaintを構築します。LinearGradientPaint(Point2D start, Point2D end, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod) デフォルトのSRGBカラー・スペースでLinearGradientPaintを構築します。LinearGradientPaint(Point2D start, Point2D end, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod, MultipleGradientPaint.ColorSpaceType colorSpace, AffineTransform gradientTransform) LinearGradientPaintを構築します。RadialGradientPaint(float cx, float cy, float radius, float[] fractions, Color[] colors) 中心を焦点として使用して、デフォルトのNO_CYCLE繰返しメソッドとSRGBカラー・スペースでRadialGradientPaintを構築します。RadialGradientPaint(float cx, float cy, float radius, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod) 中心を焦点として使用して、デフォルトのSRGBカラー・スペースでRadialGradientPaintを構築します。RadialGradientPaint(float cx, float cy, float radius, float fx, float fy, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod) デフォルトのSRGBカラー・スペースでRadialGradientPaintを構築します。RadialGradientPaint(Point2D center, float radius, float[] fractions, Color[] colors) 中心を焦点として使用して、デフォルトのNO_CYCLE繰返しメソッドとSRGBカラー・スペースでRadialGradientPaintを構築します。RadialGradientPaint(Point2D center, float radius, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod) 中心を焦点として使用して、デフォルトのSRGBカラー・スペースでRadialGradientPaintを構築します。RadialGradientPaint(Point2D center, float radius, Point2D focus, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod) デフォルトのSRGBカラー・スペースでRadialGradientPaintを構築します。RadialGradientPaint(Point2D center, float radius, Point2D focus, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod, MultipleGradientPaint.ColorSpaceType colorSpace, AffineTransform gradientTransform) RadialGradientPaintを構築します。RadialGradientPaint(Rectangle2D gradientBounds, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod) デフォルトのSRGBカラー・スペースでRadialGradientPaintを構築します。 -
javax.accessibilityでのColorの使用
Colorを返すjavax.accessibilityのメソッド修飾子と型メソッド説明AccessibleComponent.getBackground()このオブジェクトのバックグラウンド・カラーを取得します。AccessibleComponent.getForeground()このオブジェクトのフォアグラウンド・カラーを取得します。Color型のパラメータを持つjavax.accessibilityのメソッド修飾子と型メソッド説明voidAccessibleComponent.setBackground(Color c) このオブジェクトのバックグラウンド・カラーを設定します。voidAccessibleComponent.setForeground(Color c) このオブジェクトのフォアグラウンド・カラーを設定します。 -
javax.swingでのColorの使用
Colorとして宣言されているjavax.swingのフィールド修飾子と型フィールド説明protected ColorJTable.gridColorグリッドの色です。protected ColorJTable.selectionBackground選択されたセルのバックグラウンド・カラー。protected ColorJTable.selectionForeground選択されたセルのフォアグラウンド・カラー。Colorを返すjavax.swingのメソッド修飾子と型メソッド説明static ColorDebugGraphics.flashColor()描画処理をフラッシュするのに使う色を返します。JList.AccessibleJList.AccessibleJListChild.getBackground()JTable.AccessibleJTable.AccessibleJTableCell.getBackground()このオブジェクトのバックグラウンド・カラーを取得します。JTree.AccessibleJTree.AccessibleJTreeNode.getBackground()このオブジェクトのバックグラウンド・カラーを取得します。JTabbedPane.getBackgroundAt(int index) indexのタブのバックグラウンド・カラーを返します。DebugGraphics.getColor()テキスト描画処理に使う色を返します。JColorChooser.getColor()カラー・チューザから現在の色値を取得します。keyの値がColorである場合はそれを返し、それ以外の場合はnullを返します。指定されたLocaleのkeyの値がColorである場合はそれを返し、それ以外の場合はnullを返します。static Colorデフォルトから色を返します。static Colorデフォルトから、指定されたロケールに適した色を返します。JList.AccessibleJList.AccessibleJListChild.getForeground()JTable.AccessibleJTable.AccessibleJTableCell.getForeground()このオブジェクトのフォアグラウンド・カラーを取得します。JTree.AccessibleJTree.AccessibleJTreeNode.getForeground()このオブジェクトのフォアグラウンド・カラーを返します。JTabbedPane.getForegroundAt(int index) indexのタブのフォアグラウンド・カラーを返します。JTable.getGridColor()グリッド線の描画に使用する色を返します。JList.getSelectionBackground()選択された項目のバックグラウンドの描画に使用する色を返します。JTable.getSelectionBackground()選択されたセルのバックグラウンド・カラーを返します。JList.getSelectionForeground()選択された項目のフォアグラウンドの描画に使用する色を返します。JTable.getSelectionForeground()選択されているセルのフォアグラウンド・カラーを返します。static ColorJColorChooser.showDialog(Component component, String title, Color initialColor) モーダルなカラー・チューザ・ダイアログを表示し、ダイアログが隠されるまでブロックします。static ColorJColorChooser.showDialog(Component component, String title, Color initialColor, boolean colorTransparencySelectionEnabled) モーダルなカラー・チューザ・ダイアログを表示し、ダイアログが隠されるまでブロックします。Color型のパラメータを持つjavax.swingのメソッド修飾子と型メソッド説明static BorderBorderFactory.createBevelBorder(int type, Color highlight, Color shadow) 指定されたハイライトおよび陰影を使って、指定されたタイプの斜影ボーダーを生成します。static BorderBorderFactory.createBevelBorder(int type, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner) ハイライト領域および陰影領域の内側および外側の縁に指定された色を使って、指定されたタイプの斜影ボーダーを生成します。static BorderBorderFactory.createEtchedBorder(int type, Color highlight, Color shadow) 指定されたハイライトおよび陰影の色を使って、指定されたタイプのエッチング・ボーダーを生成します。static BorderBorderFactory.createEtchedBorder(Color highlight, Color shadow) 指定されたハイライトおよび陰影の色を使って、指定されたタイプのエッチング・ボーダーを生成します。static BorderBorderFactory.createLineBorder(Color color) 指定された色で線のボーダーを作成します。static BorderBorderFactory.createLineBorder(Color color, int thickness) 指定された色と幅で直線ボーダーを生成します。static BorderBorderFactory.createLineBorder(Color color, int thickness, boolean rounded) 指定された色と太さと隅の形状で直線ボーダーを作成します。static MatteBorderBorderFactory.createMatteBorder(int top, int left, int bottom, int right, Color color) ある色で塗りつぶされる飾り縁ボーダーを生成します。static BorderBorderFactory.createSoftBevelBorder(int type, Color highlight, Color shadow) 指定されたハイライトおよび陰影を使って、指定されたタイプの角の丸い斜影ボーダーを生成します。static BorderBorderFactory.createSoftBevelBorder(int type, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner) ハイライト領域および陰影領域の内側および外側の縁に指定された色を使って、指定されたタイプの角の丸い斜影ボーダーを生成します。static TitledBorderBorderFactory.createTitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor) 指定された位置、フォント、およびカラーで、既存のボーダーにタイトルを追加します。booleanDebugGraphics.drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bgcolor, ImageObserver observer) Graphics.drawImageをオーバーライドします。booleanDebugGraphics.drawImage(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer) Graphics.drawImageをオーバーライドします。booleanDebugGraphics.drawImage(Image img, int x, int y, Color bgcolor, ImageObserver observer) Graphics.drawImageをオーバーライドします。voidJComponent.setBackground(Color bg) このコンポーネントのバックグラウンド・カラーを設定します。voidJList.AccessibleJList.AccessibleJListChild.setBackground(Color c) voidJTable.AccessibleJTable.AccessibleJTableCell.setBackground(Color c) このオブジェクトのバックグラウンド・カラーを設定します。voidJTree.AccessibleJTree.AccessibleJTreeNode.setBackground(Color c) このオブジェクトのバックグラウンド・カラーを設定します。voidJTabbedPane.setBackgroundAt(int index, Color background) indexのバックグラウンド・カラーをbackgroundに設定します。nullにすることもできますが、その場合、タブのバックグラウンド・カラーはtabbedpaneのデフォルトのバックグラウンド・カラーに設定されます。void線と形状を描画し塗りつぶすのに使う色を設定します。voidカラー・チューザの現在の色を指定された色に設定します。static voidDebugGraphics.setFlashColor(Color flashColor) 描画処理をフラッシュするのに使う色を設定します。voidJComponent.setForeground(Color fg) このコンポーネントのフォアグラウンド・カラーを設定します。voidJList.AccessibleJList.AccessibleJListChild.setForeground(Color c) voidJTable.AccessibleJTable.AccessibleJTableCell.setForeground(Color c) このオブジェクトのフォアグラウンド・カラーを設定します。voidJTree.AccessibleJTree.AccessibleJTreeNode.setForeground(Color c) voidJTabbedPane.setForegroundAt(int index, Color foreground) indexのフォアグラウンド・カラーをforegroundに設定します。nullにすることもできますが、その場合、タブのフォアグラウンド・カラーはこのtabbedpaneのデフォルトのフォアグラウンド・カラーに設定されます。voidJTable.setGridColor(Color gridColor) グリッド線の描画に使用する色をgridColorに設定し、再表示します。voidJList.setSelectionBackground(Color selectionBackground) 選択された項目のバックグラウンドのレンダリングに使用する色(セル・レンダリングが選択したセルの塗りつぶしに使用できる色)を設定します。voidJTable.setSelectionBackground(Color selectionBackground) 選択されたセルのバックグラウンド・カラーを設定します。voidJList.setSelectionForeground(Color selectionForeground) 選択された項目のフォアグラウンドのレンダリングに使用する色(セル・レンダリングがテキストとグラフィックスのレンダリングに使用できる色)を設定します。voidJTable.setSelectionForeground(Color selectionForeground) 選択されたセルのフォアグラウンド・カラーを設定します。voidDebugGraphics.setXORMode(Color aColor) Graphics.setXORModeをオーバーライドします。static ColorJColorChooser.showDialog(Component component, String title, Color initialColor) モーダルなカラー・チューザ・ダイアログを表示し、ダイアログが隠されるまでブロックします。static ColorJColorChooser.showDialog(Component component, String title, Color initialColor, boolean colorTransparencySelectionEnabled) モーダルなカラー・チューザ・ダイアログを表示し、ダイアログが隠されるまでブロックします。Color型のパラメータを持つjavax.swingのコンストラクタ -
javax.swing.borderでのColorの使用
Colorとして宣言されているjavax.swing.borderのフィールド修飾子と型フィールド説明protected ColorMatteBorder.colorボーダーのためにレンダリングされるカラーです。protected ColorEtchedBorder.highlightエッチングされたハイライトに使用する色です。protected ColorBevelBorder.highlightInnerベベル内側のハイライトに使用する色です。protected ColorBevelBorder.highlightOuterベベル外側ハイライトに使用するカラーです。protected ColorLineBorder.lineColorボーダーの色。protected ColorEtchedBorder.shadowエッチングされた影に使用する色です。protected ColorBevelBorder.shadowInnerベベル内側シャドウに使用するカラーです。protected ColorBevelBorder.shadowOuterベベル外側シャドウに使用するカラーprotected ColorTitledBorder.titleColorタイトルの色。Colorを返すjavax.swing.borderのメソッド修飾子と型メソッド説明EtchedBorder.getHighlightColor()エッチング・ボーダーのハイライトのカラーを返します。EtchedBorder.getHighlightColor(Component c) 指定されたコンポーネントにレンダリングされたときの、エッチング・ボーダーのハイライト・カラーを返します。BevelBorder.getHighlightInnerColor()斜影ボーダーの内側ハイライトのカラーを返します。BevelBorder.getHighlightInnerColor(Component c) 指定されたコンポーネントにレンダリングされたときの斜影ボーダーの内側ハイライト・カラーを返します。BevelBorder.getHighlightOuterColor()斜影ボーダーの外側ハイライトのカラーを返します。BevelBorder.getHighlightOuterColor(Component c) 指定されたコンポーネントにレンダリングされたときの斜影ボーダーの外側ハイライト・カラーを返します。LineBorder.getLineColor()ボーダーのカラーを返します。MatteBorder.getMatteColor()ボーダーのタイリングに使用したカラーを返します。タイル・アイコンが使用されている場合はnullを返します。EtchedBorder.getShadowColor()エッチング・ボーダーの陰影のカラーを返します。EtchedBorder.getShadowColor(Component c) 指定されたコンポーネントにレンダリングされたときのエッチング・ボーダーのシャドウ・カラーを返します。BevelBorder.getShadowInnerColor()斜影ボーダーの内側陰影のカラーを返します。BevelBorder.getShadowInnerColor(Component c) 指定されたコンポーネント・レンダリングされたときの斜影ボーダーの内側シャドウ・カラーを返します。BevelBorder.getShadowOuterColor()斜影ボーダーの外側陰影のカラーを返します。BevelBorder.getShadowOuterColor(Component c) 指定されたコンポーネント・レンダリングされたときの斜影ボーダーの外側シャドウ・カラーを返します。TitledBorder.getTitleColor()タイトル付きボーダーのタイトル・カラーを返します。Color型のパラメータを持つjavax.swing.borderのメソッドColor型のパラメータを持つjavax.swing.borderのコンストラクタ修飾子コンストラクタ説明BevelBorder(int bevelType, Color highlight, Color shadow) 斜影ボーダーを、指定されたタイプ、ハイライトおよび陰影のカラーで作成します。BevelBorder(int bevelType, Color highlightOuterColor, Color highlightInnerColor, Color shadowOuterColor, Color shadowInnerColor) 斜影ボーダーを、指定されたタイプ、ハイライトおよび陰影のカラーで作成します。EtchedBorder(int etchType, Color highlight, Color shadow) エッチング・ボーダーを、指定されたタイプ、ハイライトおよび陰影のカラーで作成します。EtchedBorder(Color highlight, Color shadow) 彫込みエッチング・ボーダーを、指定されたハイライトおよび陰影のカラーで作成します。LineBorder(Color color) 直線ボーダーを、指定されたカラーおよび太さ(thickness = 1)で作成します。LineBorder(Color color, int thickness) 指定された色と太さで直線ボーダーを作成します。LineBorder(Color color, int thickness, boolean roundedCorners) 指定された色と太さと隅の形状で直線ボーダーを作成します。MatteBorder(int top, int left, int bottom, int right, Color matteColor) 飾り縁ボーダーを、指定されたイン・セットおよびカラーで作成します。MatteBorder(Insets borderInsets, Color matteColor) 飾り縁ボーダーを、指定されたイン・セットおよびカラーで作成します。SoftBevelBorder(int bevelType, Color highlight, Color shadow) 斜影ボーダーを、指定されたタイプ、ハイライトおよび陰影のカラーで作成します。SoftBevelBorder(int bevelType, Color highlightOuterColor, Color highlightInnerColor, Color shadowOuterColor, Color shadowInnerColor) 斜影ボーダーを、指定されたタイプ、ハイライトおよび陰影のカラーで作成します。TitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor) 指定されたボーダー、タイトル、タイトル位置揃え、タイトル位置、タイトル・フォント、およびタイトル・カラーで、TitledBorderのインスタンスを生成します。 -
javax.swing.colorchooserでのColorの使用
Colorを返すjavax.swing.colorchooserのメソッド修飾子と型メソッド説明protected ColorAbstractColorChooserPanel.getColorFromModel()現在選択されているカラーを返します。ColorSelectionModel.getSelectedColor()選択されたnull以外のColorを返します。DefaultColorSelectionModel.getSelectedColor()選択されたnull以外のColorを返します。Color型のパラメータを持つjavax.swing.colorchooserのメソッド修飾子と型メソッド説明voidColorSelectionModel.setSelectedColor(Color color) 選択された色をcolorに設定します。voidDefaultColorSelectionModel.setSelectedColor(Color color) 選択された色をcolorに設定します。Color型のパラメータを持つjavax.swing.colorchooserのコンストラクタ修飾子コンストラクタ説明DefaultColorSelectionModel(Color color) color(null以外)に設定された現在のカラーを使用して、DefaultColorSelectionModelを作成します。 -
javax.swing.plafでのColorの使用
javax.swing.plafでのColorのサブクラスColor型のパラメータを持つjavax.swing.plafのコンストラクタ修飾子コンストラクタ説明BevelBorderUIResource(int bevelType, Color highlight, Color shadow) BevelBorderUIResourceを構築します。BevelBorderUIResource(int bevelType, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner) BevelBorderUIResourceを構築します。ColorUIResourceを構築します。EtchedBorderUIResource(int etchType, Color highlight, Color shadow) EtchedBorderUIResourceを構築します。EtchedBorderUIResource(Color highlight, Color shadow) EtchedBorderUIResourceを構築します。LineBorderUIResource(Color color) LineBorderUIResourceを構築します。LineBorderUIResource(Color color, int thickness) LineBorderUIResourceを構築します。MatteBorderUIResource(int top, int left, int bottom, int right, Color color) MatteBorderUIResourceを構築します。TitledBorderUIResource(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor) TitledBorderUIResourceを構築します。 -
javax.swing.plaf.basicでのColorの使用
Colorとして宣言されているjavax.swing.plaf.basicのフィールド修飾子と型フィールド説明protected ColorBasicMenuItemUI.acceleratorForegroundアクセラレータの前景色。protected ColorBasicMenuItemUI.acceleratorSelectionForegroundアクセラレータ選択の色。protected ColorBasicBorders.ButtonBorder.darkShadow暗い影の色。protected ColorBasicBorders.FieldBorder.darkShadow暗い影の色。protected ColorBasicTabbedPaneUI.darkShadow暗い影の色protected ColorBasicMenuItemUI.disabledForeground無効なフォアグラウンドの色。protected ColorBasicToolBarUI.dockingBorderColorドッキング・ボーダーの色です。protected ColorBasicToolBarUI.dockingColorドッキング・ボーダーのバックグラウンド色です。protected ColorBasicToolBarUI.floatingBorderColorドッキングしていないボーダーの色です。protected ColorBasicToolBarUI.floatingColorドッキングしていないボーダーのバックグラウンド色。protected ColorBasicTabbedPaneUI.focusフォーカス・カラーprotected ColorBasicBorders.ButtonBorder.highlightハイライトの色。protected ColorBasicBorders.FieldBorder.highlightハイライトの色。protected ColorBasicBorders.SplitPaneBorder.highlightハイライトの色protected ColorBasicSeparatorUI.highlightハイライトの色。protected ColorBasicTabbedPaneUI.highlight強調表示の色protected ColorBasicBorders.ButtonBorder.lightHighlightライト・ハイライトの色。protected ColorBasicBorders.FieldBorder.lightHighlightライト・ハイライトの色。protected ColorBasicTabbedPaneUI.lightHighlightライト・ハイライト・カラーprotected ColorBasicInternalFrameTitlePane.notSelectedTextColor選択されていないテキストの色です。protected ColorBasicInternalFrameTitlePane.notSelectedTitleColor選択されていないタイトルの色です。protected ColorBasicInternalFrameTitlePane.selectedTextColor選択されたテキストの色。protected ColorBasicInternalFrameTitlePane.selectedTitleColor選択したタイトルの色です。protected ColorBasicMenuItemUI.selectionBackground選択したバックグラウンドの色です。protected ColorBasicMenuItemUI.selectionForeground選択前景の色です。protected ColorBasicBorders.ButtonBorder.shadow影の色。protected ColorBasicBorders.FieldBorder.shadow影の色。protected ColorBasicBorders.SplitPaneBorder.shadow影の色protected ColorBasicSeparatorUI.shadow影の色。protected ColorBasicTabbedPaneUI.shadow影の色protected ColorBasicScrollBarUI.thumbColorサムの色protected ColorBasicScrollBarUI.thumbDarkShadowColorサムの暗い影の色protected ColorBasicScrollBarUI.thumbHighlightColorサム・ハイライトの色protected ColorBasicScrollBarUI.thumbLightShadowColorサムの光の影の色protected ColorBasicScrollBarUI.trackColorトラックの色protected ColorBasicScrollBarUI.trackHighlightColorトラックのハイライト・カラーColorを返すjavax.swing.plaf.basicのメソッド修飾子と型メソッド説明BasicToolBarUI.DragWindow.getBorderColor()ボーダーの色を返します。BasicToolBarUI.getDockingColor()ドッキング領域にあるときに表示される色を取得します。BasicToolBarUI.getFloatingColor()フローティング領域にあるときに表示される色を取得します。protected ColorBasicSliderUI.getFocusColor()フォーカス・カラーを返します。protected ColorBasicTreeUI.getHashColor()ハッシュの色を返します。protected ColorBasicSliderUI.getHighlightColor()ハイライト・カラーを返します。protected ColorBasicProgressBarUI.getSelectionBackground()selectionBackgroundは、進捗バーの塗りつぶされていない領域をペイントするときのテキストの色です。protected ColorBasicProgressBarUI.getSelectionForeground()selectionForegroundは、進捗バーの塗りつぶされた領域をペイントするときのテキストの色です。protected ColorBasicSliderUI.getShadowColor()影の色を返します。Color型のパラメータを持つjavax.swing.plaf.basicのメソッド修飾子と型メソッド説明static voidBasicGraphicsUtils.drawBezel(Graphics g, int x, int y, int w, int h, boolean isPressed, boolean isDefault, Color shadow, Color darkShadow, Color highlight, Color lightHighlight) ベゼルを描画します。static voidBasicGraphicsUtils.drawEtchedRect(Graphics g, int x, int y, int w, int h, Color shadow, Color darkShadow, Color highlight, Color lightHighlight) エッチングされた矩形を描画します。static voidBasicGraphicsUtils.drawGroove(Graphics g, int x, int y, int w, int h, Color shadow, Color highlight) 溝を描画します。static voidBasicGraphicsUtils.drawLoweredBezel(Graphics g, int x, int y, int w, int h, Color shadow, Color darkShadow, Color highlight, Color lightHighlight) 下げベゼルを描画します。protected voidBasicMenuItemUI.paintBackground(Graphics g, JMenuItem menuItem, Color bgColor) メニュー項目のバックグラウンドを描画します。protected voidBasicMenuItemUI.paintMenuItem(Graphics g, JComponent c, Icon checkIcon, Icon arrowIcon, Color background, Color foreground, int defaultTextIconGap) メニュー・アイテムをペイントします。voidBasicToolBarUI.DragWindow.setBorderColor(Color c) ボーダーの色を設定します。voidBasicToolBarUI.setDockingColor(Color c) ドッキング領域にあるときに表示される色を設定します。voidBasicToolBarUI.setFloatingColor(Color c) フローティング領域にあるときに表示される色を設定します。protected voidBasicTreeUI.setHashColor(Color color) ハッシュ・カラーを設定します。Color型のパラメータを持つjavax.swing.plaf.basicのコンストラクタ修飾子コンストラクタ説明BasicArrowButton(int direction, Color background, Color shadow, Color darkShadow, Color highlight) 指定された方向と色で描画される矢印を持つBasicArrowButtonを作成します。ButtonBorder(Color shadow, Color darkShadow, Color highlight, Color lightHighlight) ButtonBorderの新しいインスタンスを構築します。FieldBorder(Color shadow, Color darkShadow, Color highlight, Color lightHighlight) FieldBorderの新しいインスタンスを構築します。MenuBarBorder(Color shadow, Color highlight) MenuBarBorderの新しいインスタンスを構築します。RadioButtonBorder(Color shadow, Color darkShadow, Color highlight, Color lightHighlight) RadioButtonBorderの新しいインスタンスを構築します。RolloverButtonBorder(Color shadow, Color darkShadow, Color highlight, Color lightHighlight) RolloverButtonBorderの新しいインスタンスを構築します。SplitPaneBorder(Color highlight, Color shadow) SplitPaneBorderの新しいインスタンスを構築します。ToggleButtonBorder(Color shadow, Color darkShadow, Color highlight, Color lightHighlight) ToggleButtonBorderの新しいインスタンスを構築します。 -
javax.swing.plaf.metalでのColorの使用
Colorとして宣言されているjavax.swing.plaf.metalのフィールド修飾子と型フィールド説明protected static ColorMetalSliderUI.darkShadowColor暗い影の色。protected ColorMetalButtonUI.disabledTextColor無効な色の色です。protected ColorMetalRadioButtonUI.disabledTextColor無効にされたテキストの色。protected ColorMetalToggleButtonUI.disabledTextColor無効にされたテキストの色。protected ColorMetalButtonUI.focusColorフォーカスされたボタンの色です。protected ColorMetalRadioButtonUI.focusColorフォーカスされたラジオ・ボタンの色です。protected ColorMetalToggleButtonUI.focusColorフォーカスされたトグル・ボタンの色です。protected static ColorMetalSliderUI.highlightColorハイライトの色。protected ColorMetalButtonUI.selectColor選択されたボタンの色です。protected ColorMetalRadioButtonUI.selectColor選択したラジオ・ボタンの色です。protected ColorMetalTabbedPaneUI.selectColor選択したペインの色です。protected ColorMetalToggleButtonUI.selectColor選択されたボタンの色です。protected ColorMetalTabbedPaneUI.selectHighlightハイライトの色。protected ColorMetalTabbedPaneUI.tabAreaBackgroundタブのバックグラウンドの色です。protected static ColorMetalSliderUI.thumbColorサムの色Colorを返すjavax.swing.plaf.metalのメソッド修飾子と型メソッド説明protected ColorMetalTabbedPaneUI.getColorForGap(int currentRun, int x, int y) ギャップの色を返します。protected ColorMetalButtonUI.getDisabledTextColor()無効なテキストの色を返します。protected ColorMetalRadioButtonUI.getDisabledTextColor()無効にされたテキストの色を返します。protected ColorMetalToggleButtonUI.getDisabledTextColor()無効なテキストの色を返します。protected ColorMetalButtonUI.getFocusColor()フォーカスされたボタンの色を返します。protected ColorMetalRadioButtonUI.getFocusColor()フォーカスされたJRadioButtonの色を返します。protected ColorMetalToggleButtonUI.getFocusColor()フォーカスされたトグル・ボタンの色を返します。protected ColorMetalButtonUI.getSelectColor()選択されたボタンの色を返します。protected ColorMetalRadioButtonUI.getSelectColor()選択したJRadioButtonの色を返します。protected ColorMetalToggleButtonUI.getSelectColor()選択されたボタンの色を返します。 -
javax.swing.plaf.nimbusでのColorの使用
Colorを返すjavax.swing.plaf.nimbusのメソッド修飾子と型メソッド説明protected final ColorAbstractRegionPainter.decodeColor(Color color1, Color color2, float midPoint) ほかの2つの色の間のオフセットから派生する色をデコードして返します。protected final ColorAbstractRegionPainter.decodeColor(String key, float hOffset, float sOffset, float bOffset, int aOffset) UIデフォルトの基本色から派生する色をデコードして返します。protected ColorNimbusStyle.getColorForState(SynthContext ctx, ColorType type) 指定された状態の色を返します。protected final ColorAbstractRegionPainter.getComponentColor(JComponent c, String property, Color defaultColor, float saturationOffset, float brightnessOffset, int alphaOffset) 指定されたJComponentからカラー・プロパティを取得します。protected final ColorNimbusLookAndFeel.getDerivedColor(Color color1, Color color2, float midPoint) ほかの2つの色の間のオフセットから派生する色をデコードして返します。protected final ColorNimbusLookAndFeel.getDerivedColor(Color color1, Color color2, float midPoint, boolean uiResource) ほかの2つの色の間のオフセットから派生する色をデコードして返します。NimbusLookAndFeel.getDerivedColor(String uiDefaultParentName, float hOffset, float sOffset, float bOffset, int aOffset, boolean uiResource) 派生した色を取得します。派生した色は、共有インスタンスで、色値はその親のUIDefaultの色が変更されると変更されます。Color型のパラメータを持つjavax.swing.plaf.nimbusのメソッド修飾子と型メソッド説明protected final ColorAbstractRegionPainter.decodeColor(Color color1, Color color2, float midPoint) ほかの2つの色の間のオフセットから派生する色をデコードして返します。protected final LinearGradientPaintAbstractRegionPainter.decodeGradient(float x1, float y1, float x2, float y2, float[] midpoints, Color[] colors) このメソッドは、LinearGradientPaintを作成するためのパラメータを使用して、線形グラデーション・ペイントを作成して返します。protected final RadialGradientPaintAbstractRegionPainter.decodeRadialGradient(float x, float y, float r, float[] midpoints, Color[] colors) このメソッドは、RadialGradientPaintを作成するためのパラメータを使用して、放射状グラデーション・ペイントを作成して返します。protected final ColorAbstractRegionPainter.getComponentColor(JComponent c, String property, Color defaultColor, float saturationOffset, float brightnessOffset, int alphaOffset) 指定されたJComponentからカラー・プロパティを取得します。protected final ColorNimbusLookAndFeel.getDerivedColor(Color color1, Color color2, float midPoint) ほかの2つの色の間のオフセットから派生する色をデコードして返します。protected final ColorNimbusLookAndFeel.getDerivedColor(Color color1, Color color2, float midPoint, boolean uiResource) ほかの2つの色の間のオフセットから派生する色をデコードして返します。 -
javax.swing.plaf.synthでのColorの使用
Colorを返すjavax.swing.plaf.synthのメソッド修飾子と型メソッド説明SynthStyle.getColor(SynthContext context, ColorType type) 指定された状態の色を返します。protected abstract ColorSynthStyle.getColorForState(SynthContext context, ColorType type) 指定された状態の色を返します。 -
javax.swing.tableでのColorの使用
Colorを返すjavax.swing.tableのメソッド修飾子と型メソッド説明JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getBackground()JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getForeground()Color型のパラメータを持つjavax.swing.tableのメソッド修飾子と型メソッド説明voidDefaultTableCellRenderer.setBackground(Color c) JComponent.setBackgroundをオーバーライドして、未選択のバックグラウンド・カラーに指定された色を割り当てます。voidJTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.setBackground(Color c) voidDefaultTableCellRenderer.setForeground(Color c) JComponent.setForegroundをオーバーライドして、未選択のフォアグラウンド・カラーに指定された色を割り当てます。voidJTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.setForeground(Color c) -
javax.swing.textでのColorの使用
Colorを返すjavax.swing.textのメソッド修飾子と型メソッド説明DefaultStyledDocument.getBackground(AttributeSet attr) 属性セットからバックグラウンド・カラーを取得します。GlyphView.getBackground()グリフの描画に使用するバックグラウンド・カラーを取得します。LabelView.getBackground()グリフの描画に使用するバックグラウンド・カラーを取得します。static ColorStyleConstants.getBackground(AttributeSet a) 属性リストからバックグラウンド・カラーの設定を取得します。StyleContext.getBackground(AttributeSet attr) 属性セットを取得してバックグラウンド・カラー指定に変換します。StyledDocument.getBackground(AttributeSet attr) 属性セットを取得してバックグラウンド・カラー指定に変換します。JTextComponent.getCaretColor()キャレットをレンダリングするのに使う現在の色を取り出します。DefaultHighlighter.DefaultHighlightPainter.getColor()ハイライトに使用する色を返します。JTextComponent.getDisabledTextColor()無効にしたテキストをレンダリングするために使用する現在の色を取得します。DefaultStyledDocument.getForeground(AttributeSet attr) 属性セットからフォアグラウンド・カラーを取得します。GlyphView.getForeground()グリフの描画に使用するフォアグラウンド・カラーを取得します。LabelView.getForeground()グリフの描画に使用するフォアグラウンド・カラーを取得します。static ColorStyleConstants.getForeground(AttributeSet a) 属性リストからフォアグラウンド・カラーの設定を取得します。StyleContext.getForeground(AttributeSet attr) 属性セットを取得してフォアグラウンド・カラー指定に変換します。StyledDocument.getForeground(AttributeSet attr) 属性セットを取得してフォアグラウンド・カラー指定に変換します。JTextComponent.getSelectedTextColor()選択したテキストをレンダリングするのに使う現在の色を取り出します。JTextComponent.getSelectionColor()選択領域をレンダリングするのに使う現在の色を取り出します。Color型のパラメータを持つjavax.swing.textのメソッド修飾子と型メソッド説明protected voidLabelView.setBackground(Color bg) ビューのバックグラウンド・カラーを設定します。static voidStyleConstants.setBackground(MutableAttributeSet a, Color fg) バックグラウンド・カラーを設定します。voidJTextComponent.setCaretColor(Color c) キャレットをレンダリングするのに使う現在の色を設定します。voidJTextComponent.setDisabledTextColor(Color c) 無効にしたテキストをレンダリングするのに使う現在の色を設定します。static voidStyleConstants.setForeground(MutableAttributeSet a, Color fg) フォアグラウンド・カラーを設定します。voidJTextComponent.setSelectedTextColor(Color c) 選択したテキストをレンダリングするのに使う現在の色を設定します。voidJTextComponent.setSelectionColor(Color c) 選択領域をレンダリングするのに使う現在の色を設定します。Color型のパラメータを持つjavax.swing.textのコンストラクタ修飾子コンストラクタ説明新しいハイライト・ペインタを構築します。ForegroundAction(String nm, Color fg) 新しいForegroundActionを作成します。 -
javax.swing.text.htmlでのColorの使用
Colorを返すjavax.swing.text.htmlのメソッド修飾子と型メソッド説明StyleSheet.getBackground(AttributeSet a) 属性セットを取得してバックグラウンド・カラー指定に変換します。StyleSheet.getForeground(AttributeSet a) 属性セットを取得してフォアグラウンド・カラー指定に変換します。StyleSheet.stringToColor(String string) 「RED」または「#NNNNNN」などの色文字列をColorに変換します。 -
javax.swing.treeでのColorの使用
Colorとして宣言されているjavax.swing.treeのフィールド修飾子と型フィールド説明protected ColorDefaultTreeCellRenderer.backgroundNonSelectionColorノードが選択されていないときにバックグラウンドに使う色です。protected ColorDefaultTreeCellRenderer.backgroundSelectionColorノードが選択されているときにバックグラウンドに使う色です。protected ColorDefaultTreeCellEditor.borderSelectionColorボーダー選択色が描画される場合にtrueを返します。protected ColorDefaultTreeCellRenderer.borderSelectionColorノードにフォーカスがある場合にフォーカス・インジケータに使う色です。protected ColorDefaultTreeCellRenderer.textNonSelectionColor選択されていないノードのフォアグラウンドに使う色です。protected ColorDefaultTreeCellRenderer.textSelectionColor選択されているノードのフォアグラウンドに使う色です。Colorを返すjavax.swing.treeのメソッド修飾子と型メソッド説明DefaultTreeCellRenderer.getBackgroundNonSelectionColor()選択されていないノード用に使うバックグラウンドの色を返します。DefaultTreeCellRenderer.getBackgroundSelectionColor()ノードが選択されているときにバックグラウンドに使う色を返します。DefaultTreeCellEditor.getBorderSelectionColor()ボーダーを描画する色を返します。DefaultTreeCellRenderer.getBorderSelectionColor()ボーダーを描画する色を返します。DefaultTreeCellRenderer.getTextNonSelectionColor()ノードが選択されていないときにテキストを描画する色を返します。DefaultTreeCellRenderer.getTextSelectionColor()ノードが選択されているときにテキストを描画する色を返します。Color型のパラメータを持つjavax.swing.treeのメソッド修飾子と型メソッド説明voidDefaultTreeCellRenderer.setBackground(Color color) ColorUIResourceをnullにマップするためにサブクラス化されます。voidDefaultTreeCellRenderer.setBackgroundNonSelectionColor(Color newColor) 選択されていないノード用に使うバックグラウンドの色を設定します。voidDefaultTreeCellRenderer.setBackgroundSelectionColor(Color newColor) ノードが選択されているときにバックグラウンドに使う色を設定します。voidDefaultTreeCellEditor.setBorderSelectionColor(Color newColor) ボーダーに使用する色を設定します。voidDefaultTreeCellRenderer.setBorderSelectionColor(Color newColor) ボーダーに使用する色を設定します。voidDefaultTreeCellRenderer.setTextNonSelectionColor(Color newColor) ノードが選択されていないときにテキストを描画する色を設定します。voidDefaultTreeCellRenderer.setTextSelectionColor(Color newColor) ノードが選択されているときにテキストを描画する色を設定します。