|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectjavax.swing.text.View
javax.swing.text.CompositeView
javax.swing.text.BoxView
javax.swing.text.FlowView
public abstract class FlowView
子を一部制約のある空間へ並べようとするビューです。これは、段落、ページなどを構築するときに使用できます。フローには次の機能があります。
View| 入れ子のクラスの概要 | |
|---|---|
static class |
FlowView.FlowStrategy
フローの物理的なフォームを維持するための方法です。 |
| フィールドの概要 | |
|---|---|
protected View |
layoutPool
このビューが表す要素 (物理的ビューに変換する論理ビュー) の子要素を表すビューです。 |
protected int |
layoutSpan
フローが作成される際のデフォルトの制約です。 |
protected FlowView.FlowStrategy |
strategy
フローを更新し続ける動作です。 |
| クラス 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 |
| コンストラクタの概要 | |
|---|---|
FlowView(Element elem,
int axis)
指定された要素の FlowView を作成します。 |
|
| メソッドの概要 | |
|---|---|
protected SizeRequirements |
calculateMinorAxisRequirements(int axis,
SizeRequirements r)
副軸の必要サイズを計算します。 |
void |
changedUpdate(DocumentEvent changes,
Shape a,
ViewFactory f)
このビューが扱う位置で属性が変更されたことをドキュメントから通知します。 |
protected abstract View |
createRow()
フロー内の子の行を保持するために使用する View を作成します。 |
int |
getFlowAxis()
それに沿ってビューをフローする軸を取り出します。 |
int |
getFlowSpan(int index)
指定した子のインデックスがフローする際の制約スパンを取り出します。 |
int |
getFlowStart(int index)
フロースパンを開始するフロー軸に沿った場所を取り出します。 |
protected int |
getViewIndexAtPosition(int pos)
モデル内の指定された位置を表す子ビューのインデックスを取り出します。 |
void |
insertUpdate(DocumentEvent changes,
Shape a,
ViewFactory f)
このビューが扱う位置でドキュメントに何かが挿入されたことを通知します。 |
protected void |
layout(int width,
int height)
子を配置します。 |
protected void |
loadChildren(ViewFactory f)
子をすべてロードしてビューを初期化します。 |
void |
removeUpdate(DocumentEvent changes,
Shape a,
ViewFactory f)
このビューが扱うドキュメント内の位置から何かが削除されたということを通知します。 |
void |
setParent(View parent)
ビューの親を設定します。 |
| クラス javax.swing.text.View から継承されたメソッド |
|---|
append, breakView, createFragment, forwardUpdateToView, getAttributes, getBreakWeight, getContainer, getDocument, getElement, getEndOffset, getGraphics, getParent, getStartOffset, getToolTipText, getViewFactory, getViewIndex, insert, isVisible, modelToView, remove, removeAll, updateChildren, updateLayout, viewToModel |
| クラス java.lang.Object から継承されたメソッド |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| フィールドの詳細 |
|---|
protected int layoutSpan
protected View layoutPool
protected FlowView.FlowStrategy strategy
| コンストラクタの詳細 |
|---|
public FlowView(Element elem,
int axis)
elem - このビューが扱う要素axis - View.X_AXIS または View.Y_AXIS| メソッドの詳細 |
|---|
public int getFlowAxis()
FlowStrategy が使用します。
public int getFlowSpan(int index)
index - 更新中の行のインデックス。0 以上で getViewCount() より小さい値であることgetFlowStart(int)public int getFlowStart(int index)
index - 更新中の行のインデックス。0 以上で getViewCount() より小さい値であることgetFlowSpan(int)protected abstract View createRow()
protected void loadChildren(ViewFactory f)
setParent メソッドによって呼び出されます。このメソッドを再実装すると、どの子も (書式設定のプロセスで作成されるので) 直接ロードしないようにできます。layoutPool 変数が null の場合、LogicalView のインスタンスが生成され、書式設定のプロセスで使われる論理ビューを表します。
CompositeView 内の loadChildrenf - ビューファクトリCompositeView.setParent(javax.swing.text.View)protected int getViewIndexAtPosition(int pos)
CompositeView 内の getViewIndexAtPositionpos - 位置 >= 0
protected void layout(int width,
int height)
BoxView 内の layoutwidth - 配置する幅 >= 0。インセット領域内部の幅height - 配置する高さ >= 0。インセット領域内部の高さ
protected SizeRequirements calculateMinorAxisRequirements(int axis,
SizeRequirements r)
BoxView 内の calculateMinorAxisRequirementsaxis - 調査中の軸r - SizeRequirements オブジェクト。null の場合、1 つ作成される
SizeRequirements オブジェクトSizeRequirements
public void insertUpdate(DocumentEvent changes,
Shape a,
ViewFactory f)
View 内の insertUpdatechanges - 関連するドキュメントからの変更情報a - ビューの現在の割り当てf - ビューが子を持つ場合に再構築に使用するファクトリView.insertUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
public void removeUpdate(DocumentEvent changes,
Shape a,
ViewFactory f)
View 内の removeUpdatechanges - 関連するドキュメントからの変更情報a - ビューの現在の割り当てf - ビューが子を持つ場合に再構築に使用するファクトリView.removeUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
public void changedUpdate(DocumentEvent changes,
Shape a,
ViewFactory f)
View 内の changedUpdatechanges - 関連するドキュメントからの変更情報a - ビューの現在の割り当てf - ビューが子を持つ場合に再構築に使用するファクトリView.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)public void setParent(View parent)
loadChildren メソッドの呼び出しとともにスーパークラスの動作を提供するために実装し直されます。子をコンストラクタの中にロードしないようにしてください。これは、親を設定する動作が原因となって、たとえば収容側 Container を取得するために、子が階層をさかのぼって検索しようとするからです。このビューが子を持つ場合は、ビュー階層内のある位置から別の位置へ移動しているので、loadChildren メソッドは呼び出されません。
CompositeView 内の setParentparent - ビューの親。ない場合は null
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Documentation Redistribution Policy も参照してください。