| 
JavaTM Platform Standard Ed. 6  | 
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectjavax.swing.text.View
javax.swing.text.ComponentView
javax.swing.text.html.FormView
public class FormView
フォーム要素 <input>、<textarea>、および <select> のためのビューインタフェースを実装するコンポーネントデコレータです。コンポーネントが使うモデルは、StyleConstants.ModelAttribute を使って要素の属性として格納されていて、ビューのコンポーネントの作成に使います。モデルのタイプは、HTMLDocument.HTMLReader.FormAction が設定するタイプであると想定されます。ドキュメントにマップされるビューが複数ある場合、各ビューは、埋め込まれたコンポーネントモデルを共有することになります。
 
次の表はこのビューでどのコンポーネントを構築するかを示します。
| Element Type | 構築されるコンポーネント | 
|---|---|
| 入力、タイプは button | JButton | 
| 入力、タイプは checkbox | JCheckBox | 
| 入力、タイプは image | JButton | 
| 入力、タイプは password | JPasswordField | 
| 入力、タイプは radio | JRadioButton | 
| 入力、タイプは reset | JButton | 
| 入力、タイプは submit | JButton | 
| 入力、タイプは text | JTextField | 
| 選択、サイズは > 1、または複数の属性を定義 | JScrollPane 内の JList | 
| 選択、サイズは指定なし、または 1 | JComboBox | 
| textarea | JScrollPane 内の JTextArea | 
| 入力、タイプは file | JTextField | 
| 入れ子のクラスの概要 | |
|---|---|
protected  class | 
FormView.MouseEventListener
タイプが image である入力要素がクリックされたときにフォームの送信を扱う MouseEventListener クラスです。  | 
| フィールドの概要 | |
|---|---|
static String | 
RESET
推奨されていません。 1.3 では、値は FormView.resetButtonText の UIManager プロパティーからのものです。  | 
static String | 
SUBMIT
推奨されていません。 1.3 では、値は FormView.submitButtonText の UIManager プロパティーからのものです。  | 
| クラス javax.swing.text.View から継承されたフィールド | 
|---|
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS | 
| インタフェース javax.swing.SwingConstants から継承されたフィールド | 
|---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST | 
| コンストラクタの概要 | |
|---|---|
FormView(Element elem)
新しい FormView オブジェクトを作成します。  | 
|
| メソッドの概要 | |
|---|---|
 void | 
actionPerformed(ActionEvent evt)
ActionEvent の処理を担当します。  | 
protected  Component | 
createComponent()
コンポーネントを作成します。  | 
 float | 
getMaximumSpan(int axis)
このビューの最大スパンを軸に沿って指定します。  | 
protected  void | 
imageSubmit(String imageData)
イメージをクリックすると、フォームを送信するために呼び出されます。  | 
protected  void | 
submitData(String data)
このメソッドは、フォームデータの送信を行います。  | 
| クラス javax.swing.text.ComponentView から継承されたメソッド | 
|---|
getAlignment, getComponent, getMinimumSpan, getPreferredSpan, modelToView, paint, setParent, viewToModel | 
| クラス java.lang.Object から継承されたメソッド | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| フィールドの詳細 | 
|---|
@Deprecated public static final String SUBMIT
@Deprecated public static final String RESET
| コンストラクタの詳細 | 
|---|
public FormView(Element elem)
elem - デコレートされる要素| メソッドの詳細 | 
|---|
protected Component createComponent()
ComponentView 内の createComponentpublic float getMaximumSpan(int axis)
ComponentView 内の getMaximumSpanaxis - View.X_AXIS または View.Y_AXIS
IllegalArgumentException - 軸が無効な場合View.getPreferredSpan(int)public void actionPerformed(ActionEvent evt)
ActionListener 内の actionPerformedevt - ActionEventprotected void submitData(String data)
protected void imageSubmit(String imageData)
imageData - マウスクリックのオフセット
  | 
JavaTM Platform Standard Ed. 6  | 
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
Copyright 2009 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Documentation Redistribution Policy も参照してください。