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

クラスCSS

java.lang.Object
javax.swing.text.html.CSS
すべての実装されたインタフェース:
Serializable

public class CSS extends Object implements Serializable
CSS属性のセットを型保証された列挙型として定義します。 HTML View実装は、CSS属性を使用してどのように描画するかを決定します。 同時にCSS/HTML/StyleConstantsをマップするメソッドを定義します。 たとえば、フォントのような任意の短縮形プロパティは組込みプロパティにマップされています。

次に、レンダリング・エンジンがサポートするCSSプロパティを挙げます。

  • font-family
  • font-style
  • font-size (相対単位をサポート)
  • font-weight
  • font
  • color
  • background-color (透明の例外を含む)
  • background-image
  • background-repeat
  • background-position
  • background
  • text-decoration (点滅やオーバーラインの例外を含む)
  • vertical-align (supおよびsuperのみ)
  • text-align (justifyはcenterとして扱われる)
  • margin-top
  • margin-right
  • margin-bottom
  • margin-left
  • margin
  • padding-top
  • padding-right
  • padding-bottom
  • padding-left
  • padding
  • border-top-style
  • border-right-style
  • border-bottom-style
  • border-left-style
  • border-style (inset、outsetおよびnoneのみサポート)
  • border-top-color
  • border-right-color
  • border-bottom-color
  • border-left-color
  • border-color
  • list-style-image
  • list-style-type
  • list-style-position
次がモデル化されていますが、現在は描画されていません。
  • font-variant
  • background-attachment (バックグラウンドは常にscrollとして扱われる)
  • word-spacing
  • letter-spacing
  • text-indent
  • text-transform
  • line-height
  • border-top-width (ボーダーを使用する必要があることを示す場合に使用)
  • border-right-width
  • border-bottom-width
  • border-left-width
  • border-width
  • border-top
  • border-right
  • border-bottom
  • border-left
  • border
  • width
  • height
  • float
  • clear
  • display
  • white-space
  • list-style

ノート: 特にノートがないかぎり、当分の間相対単位をサポートせず、p {margin-top :10% }を上部マージン指定なしと見なします。

関連項目:
  • ネストされたクラスのサマリー

    ネストされたクラス
    修飾子と型
    クラス
    説明
    static final class 
    CSS属性を保持するAttributeSetのキーとして使用される定義です。
  • コンストラクタのサマリー

    コンストラクタ
    コンストラクタ
    説明
    CSS()
    CSSオブジェクトを構築します。
  • メソッドのサマリー

    修飾子と型
    メソッド
    説明
    static CSS.Attribute[]
    CSS属性の可能なすべてのキーのセットを返します。
    static final CSS.Attribute
    文字列をCSS.Attributeオブジェクトに変換します。

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

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • コンストラクタの詳細

    • CSS

      public CSS()
      CSSオブジェクトを構築します。
  • メソッドの詳細

    • getAllAttributeKeys

      public static CSS.Attribute[] getAllAttributeKeys()
      CSS属性の可能なすべてのキーのセットを返します。
      戻り値:
      可能なすべてのCSS属性キーのセット
    • getAttribute

      public static final CSS.Attribute getAttribute(String name)
      文字列をCSS.Attributeオブジェクトに変換します。 指定された名前に属性がない場合は、nullを返します。
      パラメータ:
      name - 型保証された列挙を取得するCSS属性の名前
      戻り値:
      CSS.Attributeオブジェクト。文字列が有効な属性キーを表さない場合はnull