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

インタフェースMutableAttributeSet

すべてのスーパー・インタフェース:
AttributeSet
既知のすべてのサブインタフェース:
Style
既知のすべての実装クラス:
AbstractDocument.AbstractElement, AbstractDocument.BranchElement, AbstractDocument.LeafElement, DefaultStyledDocument.SectionElement, HTMLDocument.BlockElement, HTMLDocument.RunElement, SimpleAttributeSet, StyleContext.NamedStyle

public interface MutableAttributeSet
extends AttributeSet
一意な属性を集めた可変コレクションのジェネリック・インタフェースです。 実装は、おそらくフォームのコンストラクタを提供したいと思うでしょう:

 public XXXAttributeSet(ConstAttributeSet source);
  • メソッドの詳細

    • addAttribute

      void addAttribute​(Object name, Object value)
      指定された名前と値を持つ属性を保持することを除いて、これと同じ新しい属性セットを作成します。 オブジェクトは不変である必要があります。つまり、どのクライアントによっても変更できません。
      パラメータ:
      name - 名前
      value - 値
    • addAttributes

      void addAttributes​(AttributeSet attributes)
      指定された属性と値を持つことを除いて、これと同じ新しい属性セットを作成します。
      パラメータ:
      attributes - 属性セット
    • removeAttribute

      void removeAttribute​(Object name)
      指定したnameを持つ属性を削除します。
      パラメータ:
      name - 属性名
    • removeAttributes

      void removeAttributes​(Enumeration<?> names)
      指定したnamesを持つ属性セットを削除します。
      パラメータ:
      names - 名前のセット
    • removeAttributes

      void removeAttributes​(AttributeSet attributes)
      指定したnameを持つ属性セットを削除します。
      パラメータ:
      attributes - 属性セット
    • setResolveParent

      void setResolveParent​(AttributeSet parent)
      解釈処理側の親を設定します。 これは、属性がローカルで定義されていない場合に解釈処理する属性セットです。
      パラメータ:
      parent - 親