インタフェース
javax.swing.border.Borderの使用
Borderを使用するパッケージ
パッケージ
説明
すべてのプラットフォーム上で可能なかぎり同じように機能する「軽量」(Java共通言語)コンポーネントのセットを提供します。
Swingコンポーネントの周囲に各種ボーダーを描画するためのクラスおよびインタフェースを提供します。
1つのインタフェースおよび多くのabstractクラスを提供しており、Swingはプラグイン可能なLook & Feel機能を提供するためにこれらを利用します。
基本Look & Feelに従って構築されたユーザー・インタフェース・オブジェクトを提供します。
デフォルトのLook & FeelであるJava Look & Feel (以前のコード名はMetal)に従って構築されたユーザー・インタフェース・オブジェクトを提供します。
javax.swing.JTableを処理するためのクラスとインタフェースを提供します。javax.swing.JTreeを処理するためのクラスとインタフェースを提供します。-
javax.swingでのBorderの使用
Borderとして宣言されたjavax.swingのフィールドBorderを返すjavax.swingのメソッド修飾子と型メソッド説明static BorderBorderFactory.createBevelBorder(int type) 指定されたタイプの斜影ボーダーを生成します。ハイライトにはコンポーネントの現在のバックグラウンド・カラーの明るい方の色調が使われ、陰影には暗い方の色調が使われます。static BorderBorderFactory.createBevelBorder(int type, Color highlight, Color shadow) 指定されたハイライトおよび陰影を使って、指定されたタイプの斜影ボーダーを生成します。static BorderBorderFactory.createBevelBorder(int type, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner) ハイライト領域および陰影領域の内側および外側の縁に指定された色を使って、指定されたタイプの斜影ボーダーを生成します。static BorderBorderFactory.createDashedBorder(Paint paint) 指定されたpaintの破線ボーダーを作成します。static BorderBorderFactory.createDashedBorder(Paint paint, float length, float spacing) 指定されたpaint、相対的なlength、および相対的なspacingの破線ボーダーを作成します。static BorderBorderFactory.createDashedBorder(Paint paint, float thickness, float length, float spacing, boolean rounded) 指定されたpaint、thickness、線形、相対的なlength、および相対的なspacingの破線ボーダーを作成します。static BorderBorderFactory.createEmptyBorder()スペースを一切とらない空のボーダーを生成します。static BorderBorderFactory.createEmptyBorder(int top, int left, int bottom, int right) 上下左右の辺の幅を指定して、スペースをとるが、描画を行わない空のボーダーを生成します。static BorderBorderFactory.createEtchedBorder()ハイライトおよび陰影にコンポーネントの現在のバックグラウンド・カラーを使って、指定されたタイプのエッチング・ボーダーを生成します。static BorderBorderFactory.createEtchedBorder(int type) ハイライトおよび陰影にコンポーネントの現在のバックグラウンド・カラーを使って、指定されたタイプのエッチング・ボーダーを生成します。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 BorderBorderFactory.createLoweredBevelBorder()くぼみ斜影の縁を持つボーダーを生成します。ハイライトにはコンポーネントの現在のバックグラウンド・カラーの明るい方の色調が使われ、陰影には暗い方の色調が使われます。static BorderBorderFactory.createLoweredSoftBevelBorder()くぼみの縁および角の丸い斜影ボーダーを生成します。ハイライトにはコンポーネントの現在のバックグラウンド・カラーの明るい方の色調が使われ、陰影には暗い方の色調が使われます。static BorderBorderFactory.createRaisedBevelBorder()浮出し斜影の縁を持つボーダーを生成します。ハイライトにはコンポーネントの現在のバックグラウンド・カラーの明るい方の色調が使われ、陰影には暗い方の色調が使われます。static BorderBorderFactory.createRaisedSoftBevelBorder()浮出しの縁および角の丸い斜影ボーダーを生成します。ハイライトにはコンポーネントの現在のバックグラウンド・カラーの明るい方の色調が使われ、陰影には暗い方の色調が使われます。static BorderBorderFactory.createSoftBevelBorder(int type) 指定されたタイプの角の丸い斜影ボーダーを生成します。ハイライトにはコンポーネントの現在のバックグラウンド・カラーの明るい方の色調が使われ、陰影には暗い方の色調が使われます。static BorderBorderFactory.createSoftBevelBorder(int type, Color highlight, Color shadow) 指定されたハイライトおよび陰影を使って、指定されたタイプの角の丸い斜影ボーダーを生成します。static BorderBorderFactory.createSoftBevelBorder(int type, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner) ハイライト領域および陰影領域の内側および外側の縁に指定された色を使って、指定されたタイプの角の丸い斜影ボーダーを生成します。static BorderBorderFactory.createStrokeBorder(BasicStroke stroke) 指定されたstrokeのボーダーを作成します。static BorderBorderFactory.createStrokeBorder(BasicStroke stroke, Paint paint) 指定されたstrokeとpaintのボーダーを作成します。JComponent.getBorder()このコンポーネントのボーダーを返します。ボーダーが現在設定されていない場合はnullを返します。JLayer.getBorder()ビュー・コンポーネントがjavax.swing.JComponentのインスタンスである場合は、その機能をgetView().getBorder()メソッドに委任し、それ以外の場合はnullを返します。keyの値がBorderである場合はそれを返し、それ以外の場合はnullを返します。指定されたLocaleのkeyの値がBorderである場合はそれを返し、それ以外の場合はnullを返します。static Borderデフォルトからボーダーを返します。static Borderデフォルトから、指定されたロケールに適したボーダーを返します。JScrollPane.getViewportBorder()ビュー・ポートを囲むBorderオブジェクトを返します。型Borderのパラメータを持つjavax.swingのメソッド修飾子と型メソッド説明static CompoundBorderBorderFactory.createCompoundBorder(Border outsideBorder, Border insideBorder) 外側および内側の縁に使うボーダー・オブジェクトを指定して複合ボーダーを生成します。static TitledBorderBorderFactory.createTitledBorder(Border border) 空のタイトルを使用して新しいタイトル・ボーダーを作成します。指定のボーダー・オブジェクト、デフォルトのテキスト位置(現在のルック・アンド・フィールによって決定)、デフォルトの位置揃え(先頭)、デフォルトのフォントおよびテキスト色(現在のルック・アンド・フィールによって決定)を使用します。static TitledBorderBorderFactory.createTitledBorder(Border border, String title) 既存のボーダーにタイトルを追加します。デフォルトのテキスト位置(現在のルック・アンド・フィールによって決定)、デフォルトの位置揃え(先頭)、デフォルトのフォントおよびテキスト色(現在のルック・アンド・フィールによって決定)を使用します。static TitledBorderBorderFactory.createTitledBorder(Border border, String title, int titleJustification, int titlePosition) テキスト位置を指定し、デフォルトのフォントとテキスト色(現在のルック・アンド・フィールによって決定)を使って、既存のボーダーにタイトルを追加します。static TitledBorderBorderFactory.createTitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont) 指定された位置とフォントで、デフォルト・テキスト・カラー(現在のLook & Feelによって決まる)を使って、既存のボーダーにタイトルを追加します。static TitledBorderBorderFactory.createTitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor) 指定された位置、フォント、およびカラーで、既存のボーダーにタイトルを追加します。protected StringJComponent.AccessibleJComponent.getBorderTitle(Border b) (もしあれば)ボーダー階層に沿ってnullではないタイトルが付いたTitledBorderを再帰的に検索します。voidこのコンポーネントのボーダーを設定します。voidビュー・コンポーネントがjavax.swing.JComponentのインスタンスである場合は、その機能をgetView().setBorder(Border)メソッドに委任します。そうでない場合は、このメソッドはno-opです。final voidビュー・ポートは、通常の親または子のクリッピングでその子(「ビュー」と呼ばれる)を「スクロール」します。通常、ビューはスクロールとは反対の方向に移動します。voidJScrollPane.setViewportBorder(Border viewportBorder) ビュー・ポートのボーダーを追加します。 -
javax.swing.borderでのBorderの使用
Borderを実装するjavax.swing.borderのクラス修飾子と型クラス説明classサイズ指定のない空のボーダーを実装するクラスです。class単純な2ラインの斜影ボーダーを実装するクラスです。class2つのBorderオブジェクトを合成して単一のボーダーにするために使用する、複合Borderクラスです。合成は、内側Borderオブジェクトを外側Borderオブジェクトのイン・セットの中に入れ子にして行います。classスペースを占めるが描画はしない、空の透過ボーダーを提供するクラスです。class簡単なエッチング・ボーダーを実装するクラスです。浮彫りエッチング、あるいは彫込みエッチングのどちらも可能です。class直線ボーダーを実装するクラスです。ボーダーの太さは任意、カラーは単色です。class塗りつぶしカラーやタイリングされたアイコンを使う飾り縁ボーダーを提供するクラスです。class角の丸い浮き出し斜影ボーダーまたはくぼみ斜影ボーダーを実装するクラスです。class任意のストロークのボーダーを実装するクラスです。classStringによるタイトルを位置および位置揃えを指定して追加し、任意のボーダーを実装するクラスです。Borderとして宣言されたjavax.swing.borderのフィールド修飾子と型フィールド説明protected BorderTitledBorder.borderボーダー。protected BorderCompoundBorder.insideBorder内側のボーダー。protected BorderCompoundBorder.outsideBorder外枠。Borderを返すjavax.swing.borderのメソッド修飾子と型メソッド説明static BorderLineBorder.createBlackLineBorder()太さ1でColor.blackのLineBorderを取得するのに便利なメソッドです。static BorderLineBorder.createGrayLineBorder()太さ1でColor.grayのLineBorderを取得するのに便利なメソッドです。TitledBorder.getBorder()タイトル付きボーダーのボーダーを返します。CompoundBorder.getInsideBorder()内側ボーダーのオブジェクトを返します。CompoundBorder.getOutsideBorder()外側ボーダーのオブジェクトを返します。型Borderのパラメータを持つjavax.swing.borderのメソッド修飾子と型メソッド説明static RectangleAbstractBorder.getInteriorRectangle(Component c, Border b, int x, int y, int width, int height) ボーダーのイン・セットから引数の値を減算して矩形を返します。voidタイトル付きボーダーのボーダーを設定します。型Borderのパラメータを持つjavax.swing.borderのコンストラクタ修飾子コンストラクタ説明CompoundBorder(Border outsideBorder, Border insideBorder) 指定された内側ボーダーおよび外側ボーダーによる複合ボーダーを作成します。TitledBorder(Border border) 指定されたボーダーと空のタイトルで、TitledBorderのインスタンスを生成します。TitledBorder(Border border, String title) 指定されたボーダーでTitledBorderのインスタンスを生成します。TitledBorder(Border border, String title, int titleJustification, int titlePosition) 指定されたボーダー、タイトル、タイトルの位置揃え、およびタイトルの配置で、TitledBorderのインスタンスを生成します。TitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont) 指定されたボーダー、タイトル、タイトル位置揃え、タイトル位置、およびタイトル・フォントで、TitledBorderのインスタンスを生成します。TitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor) 指定されたボーダー、タイトル、タイトル位置揃え、タイトル位置、タイトル・フォント、およびタイトル・カラーで、TitledBorderのインスタンスを生成します。 -
javax.swing.plafでのBorderの使用
Borderを実装するjavax.swing.plafのクラス修飾子と型クラス説明classUIResourceを実装するBorderラッパー・クラス。static classベベルボーダーUIリソース。static class複合ボーダーUIリソース。static class空のボーダーUIリソース。static classエッチングされたボーダーUIリソース。static class明細ボーダーUIリソース。static classマット・ボーダーUIリソース。static classタイトル付きのボーダーUIリソース。Borderを返すjavax.swing.plafのメソッド修飾子と型メソッド説明static BorderBorderUIResource.getBlackLineBorderUIResource()黒線ボーダーUIリソースを返します。static BorderBorderUIResource.getEtchedBorderUIResource()エッチングされたボーダーUIリソースを返します。static BorderBorderUIResource.getLoweredBevelBorderUIResource()下位ベベルボーダーUIリソースを返します。static BorderBorderUIResource.getRaisedBevelBorderUIResource()上げられたベベルボーダーUIリソースを返します。型Borderのパラメータを持つjavax.swing.plafのコンストラクタ修飾子コンストラクタ説明BorderUIResource(Border delegate) 既存のBorderインスタンスをラップする、UIResourceのボーダー・オブジェクトを作成します。CompoundBorderUIResource(Border outsideBorder, Border insideBorder) CompoundBorderUIResourceを構築します。TitledBorderUIResource(Border border) TitledBorderUIResourceを構築します。TitledBorderUIResource(Border border, String title) TitledBorderUIResourceを構築します。TitledBorderUIResource(Border border, String title, int titleJustification, int titlePosition) TitledBorderUIResourceを構築します。TitledBorderUIResource(Border border, String title, int titleJustification, int titlePosition, Font titleFont) TitledBorderUIResourceを構築します。TitledBorderUIResource(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor) TitledBorderUIResourceを構築します。 -
javax.swing.plaf.basicでのBorderの使用
Borderを実装するjavax.swing.plaf.basicのクラス修飾子と型クラス説明static classボタンの周りにボーダーを描画します。static classフィールドの周囲にボーダーを描画します。static class余白をサポートするコンポーネントの周囲のボーダーを描画します。static classメニュー・バーの周りにボーダーを描画します。static classラジオ・ボタンの周囲にボーダーを描画します。static classロールオーバー・ツールバー・ボタンのための特別なthinボーダーです。static class分割ペインの周囲にボーダーを描画します。static classトグル・ボタンの周りにボーダーを描画します。Borderとして宣言されたjavax.swing.plaf.basicのフィールドBorderを返すjavax.swing.plaf.basicのメソッド修飾子と型メソッド説明protected BorderBasicToolBarUI.createNonRolloverBorder()ツールバー・コンポーネントのための非ロールオーバー・ボーダーを作成します。protected BorderBasicToolBarUI.createRolloverBorder()ツールバー・コンポーネントのためのロールオーバー・ボーダーを作成します。BasicSplitPaneDivider.getBorder()このコンポーネントのボーダーを返します。ボーダーが現在設定されていない場合はnullを返します。static BorderBasicBorders.getButtonBorder()JButtonのボーダー・インスタンスを返します。static BorderBasicBorders.getInternalFrameBorder()JInternalFrameのボーダー・インスタンスを返します。static BorderBasicBorders.getMenuBarBorder()JMenuBarのボーダー・インスタンスを返します。protected BorderBasicToolBarUI.getNonRolloverBorder(AbstractButton b) ボタンの非ロールオーバー・ボーダーを返します。static BorderBasicBorders.getProgressBarBorder()JProgressBarのボーダー・インスタンスを返します。static BorderBasicBorders.getRadioButtonBorder()JRadioButtonのボーダー・インスタンスを返します。protected BorderBasicToolBarUI.getRolloverBorder(AbstractButton b) ボタンのロールオーバー・ボーダーを返します。static BorderBasicBorders.getSplitPaneBorder()JSplitPaneのボーダー・インスタンスを返します。static BorderBasicBorders.getSplitPaneDividerBorder()JSplitPaneディバイダのボーダー・インスタンスを返します。static BorderBasicBorders.getTextFieldBorder()JTextFieldのボーダー・インスタンスを返します。static BorderBasicBorders.getToggleButtonBorder()JToggleButtonのボーダー・インスタンスを返します。型Borderのパラメータを持つjavax.swing.plaf.basicのメソッド -
javax.swing.plaf.metalでのBorderの使用
Borderを実装するjavax.swing.plaf.metalのクラス修飾子と型クラス説明static classクラスはJButtonのボーダーを表します。static classクラスは3D枠線を表します。static classクラスはJInternalFrameのボーダーを表します。static classクラスはJMenuBarのボーダーを表します。static classクラスはJMenuItemのボーダーを表します。static classクラスは、オプション・ダイアログの枠線を表します。static classPaletteが使用するボーダーです。static classクラスはJPopupMenuのボーダーを表します。static classクラスは、ロールオーバーButtonのボーダーを表します。static classクラスはJScrollPaneのボーダーを表します。static classテーブル・ヘッダーのボーダーです。static classJTextFieldの枠線。static classJToggleButtonの枠線。static classクラスはJToolBarのボーダーを表します。Borderを返すjavax.swing.plaf.metalのメソッド修飾子と型メソッド説明static BorderMetalBorders.getButtonBorder()JButtonのボーダー・インスタンスを返します。static BorderMetalBorders.getDesktopIconBorder()Desktop Iconのボーダー・インスタンスを返します。static BorderMetalBorders.getTextBorder()テキスト・コンポーネントのボーダー・インスタンスを返します。static BorderMetalBorders.getTextFieldBorder()JTextFieldのボーダー・インスタンスを返します。static BorderMetalBorders.getToggleButtonBorder()JToggleButtonのボーダー・インスタンスを返します。 -
javax.swing.tableでのBorderの使用
Borderとして宣言されたjavax.swing.tableのフィールド -
javax.swing.treeでのBorderの使用
Borderとして宣言されたjavax.swing.treeのフィールドBorderを返すjavax.swing.treeのメソッド修飾子と型メソッド説明DefaultTreeCellEditor.DefaultTextField.getBorder()JComponent.getBorderをオーバーライドして、現在のボーダーを返します。型Borderのパラメータを持つjavax.swing.treeのメソッド修飾子と型メソッド説明voidこのコンポーネントのボーダーを設定します。型Borderのパラメータを持つjavax.swing.treeのコンストラクタ