モジュール java.desktop
パッケージ javax.swing.border

クラスMatteBorder

すべての実装されたインタフェース:
Serializable, Border
直系の既知のサブクラス:
BorderUIResource.MatteBorderUIResource

public class MatteBorder extends EmptyBorder
塗りつぶしカラーやタイリングされたアイコンを使う飾り縁ボーダーを提供するクラスです。

警告: このクラスの直列化されたオブジェクトは、今後のSwingリリースと互換ではなくなる予定です。 現在の直列化のサポートは、短期間の格納や、同じバージョンのSwingを実行するアプリケーション間のRMIに適しています。 1.4では、すべてのJavaBeansの長期ストレージのサポートがjava.beansパッケージに追加されました。 XMLEncoderを参照してください。

  • フィールドのサマリー

    フィールド
    修飾子と型
    フィールド
    説明
    protected Color
    ボーダーのためにレンダリングされるカラーです。
    protected Icon
    ボーダーのタイ・リングに使用されるアイコン。

    クラス javax.swing.border.EmptyBorderで宣言されたフィールド

    bottom, left, right, top
  • コンストラクタのサマリー

    コンストラクタ
    コンストラクタ
    説明
    MatteBorder​(int top, int left, int bottom, int right, Color matteColor)
    飾り縁ボーダーを、指定されたイン・セットおよびカラーで作成します。
    MatteBorder​(int top, int left, int bottom, int right, Icon tileIcon)
    飾り縁ボーダーを、指定されたイン・セットおよびタイル・アイコンで作成します。
    MatteBorder​(Insets borderInsets, Color matteColor)
    飾り縁ボーダーを、指定されたイン・セットおよびカラーで作成します。
    MatteBorder​(Insets borderInsets, Icon tileIcon)
    飾り縁ボーダーを、指定されたイン・セットおよびタイル・アイコンで作成します。
    MatteBorder​(Icon tileIcon)
    飾り縁ボーダーを、指定されたタイル・アイコンで作成します。
  • メソッドのサマリー

    修飾子と型
    メソッド
    説明
    ボーダーのイン・セットを返します。
    insetsパラメータを、このBorderの現在のInsetsで初期化し直します。
    ボーダーのタイリングに使用したカラーを返します。タイル・アイコンが使用されている場合はnullを返します。
    ボーダーのタイリングに使用したカラーを返します。べた一色が使用されている場合はnullを返します。
    boolean
    ボーダーが不透明かどうかを返します。
    void
    paintBorder​(Component c, Graphics g, int x, int y, int width, int height)
    飾り縁ボーダーをペイントします。

    クラス javax.swing.border.AbstractBorderで宣言されたメソッド

    getBaseline, getBaselineResizeBehavior, getBorderInsets, getInteriorRectangle, getInteriorRectangle

    クラス java.lang.Objectで宣言されたメソッド

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • フィールド詳細

    • color

      protected Color color
      ボーダーのためにレンダリングされるカラーです。
    • tileIcon

      protected Icon tileIcon
      ボーダーのタイ・リングに使用されるアイコン。
  • コンストラクタの詳細

    • MatteBorder

      public MatteBorder(int top, int left, int bottom, int right, Color matteColor)
      飾り縁ボーダーを、指定されたイン・セットおよびカラーで作成します。
      パラメータ:
      top - ボーダーの上イン・セット
      left - ボーダーの左イン・セット
      bottom - ボーダーの下イン・セット
      right - ボーダーの右イン・セット
      matteColor - ボーダーを描画したカラー
    • MatteBorder

      public MatteBorder(Insets borderInsets, Color matteColor)
      飾り縁ボーダーを、指定されたイン・セットおよびカラーで作成します。
      パラメータ:
      borderInsets - ボーダーのイン・セット
      matteColor - ボーダーを描画したカラー
      導入されたバージョン:
      1.3
    • MatteBorder

      public MatteBorder(int top, int left, int bottom, int right, Icon tileIcon)
      飾り縁ボーダーを、指定されたイン・セットおよびタイル・アイコンで作成します。
      パラメータ:
      top - ボーダーの上イン・セット
      left - ボーダーの左イン・セット
      bottom - ボーダーの下イン・セット
      right - ボーダーの右イン・セット
      tileIcon - ボーダーのタイリングに使うアイコン
    • MatteBorder

      public MatteBorder(Insets borderInsets, Icon tileIcon)
      飾り縁ボーダーを、指定されたイン・セットおよびタイル・アイコンで作成します。
      パラメータ:
      borderInsets - ボーダーのイン・セット
      tileIcon - ボーダーのタイリングに使うアイコン
      導入されたバージョン:
      1.3
    • MatteBorder

      public MatteBorder(Icon tileIcon)
      飾り縁ボーダーを、指定されたタイル・アイコンで作成します。 インセットは、タイル・アイコンのサイズを基にして動的に計算されます。インセットの上端と下端は、タイル・アイコンの高さに揃えられます。インセットの左右は、タイル・アイコンの幅に揃えられます。
      パラメータ:
      tileIcon - ボーダーのタイリングに使うアイコン
  • メソッドの詳細

    • paintBorder

      public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
      飾り縁ボーダーをペイントします。
      定義:
      paintBorder、インタフェース: Border
      オーバーライド:
      paintBorder、クラス: EmptyBorder
      パラメータ:
      c - このボーダーがペイントされるコンポーネント
      g - ペイント・グラフィックス
      x - ペイントされるボーダーのx座標
      y - ペイントされるボーダーのy座標
      width - ペイントされるボーダーの幅
      height - ペイントされるボーダーの高さ
    • getBorderInsets

      public Insets getBorderInsets(Component c, Insets insets)
      insetsパラメータを、このBorderの現在のInsetsで初期化し直します。
      オーバーライド:
      getBorderInsets、クラス: EmptyBorder
      パラメータ:
      c - このボーダーのイン・セットの値を適用するコンポーネント
      insets - 初期化し直されるオブジェクト
      戻り値:
      insetsオブジェクト
      導入されたバージョン:
      1.3
    • getBorderInsets

      public Insets getBorderInsets()
      ボーダーのイン・セットを返します。
      オーバーライド:
      getBorderInsets、クラス: EmptyBorder
      戻り値:
      上、左、下、右のインセットを含むInsetsオブジェクト
      導入されたバージョン:
      1.3
    • getMatteColor

      public Color getMatteColor()
      ボーダーのタイリングに使用したカラーを返します。タイル・アイコンが使用されている場合はnullを返します。
      戻り値:
      ボーダーを描画するために使用されるColorオブジェクト、またはタイル・アイコンが使用される場合はnull
      導入されたバージョン:
      1.3
    • getTileIcon

      public Icon getTileIcon()
      ボーダーのタイリングに使用したカラーを返します。べた一色が使用されている場合はnullを返します。
      戻り値:
      ボーダーを塗りつぶすために使用されるIconまたはボーダーを塗りつぶすために単色が使用される場合はnull
      導入されたバージョン:
      1.3
    • isBorderOpaque

      public boolean isBorderOpaque()
      ボーダーが不透明かどうかを返します。
      定義:
      isBorderOpaque、インタフェース: Border
      オーバーライド:
      isBorderOpaque、クラス: EmptyBorder
      戻り値:
      ボーダーが不透明な場合はtrue、それ以外の場合はfalse