|
JavaTM 2 Platform Std. Ed. v1.3 |
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Object
|
+--javax.swing.text.View
|
+--javax.swing.text.CompositeView
|
+--javax.swing.text.BoxView
ビューは、ビューの子を軸に沿ってタイリングすることで、ひとつのボックスの形状に配置します。このボックスは、子の配列をするところでは子の柔軟性も考慮されるという点で、TeX に用意されているボックスと似ています。したがって、行、段落、リスト項目、列、ページなどのコレクションを表示するのに便利な基本単位と考えられています。
| クラス javax.swing.text.View から継承したフィールド |
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS |
| インタフェース javax.swing.SwingConstants から継承したフィールド |
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| コンストラクタの概要 | |
BoxView(Element elem,
int axis)
BoxView を構築します。 |
|
| メソッドの概要 | |
protected void |
baselineLayout(int targetSpan,
int axis,
int[] offsets,
int[] spans)
|
protected SizeRequirements |
baselineRequirements(int axis,
SizeRequirements r)
|
protected SizeRequirements |
calculateMajorAxisRequirements(int axis,
SizeRequirements r)
|
protected SizeRequirements |
calculateMinorAxisRequirements(int axis,
SizeRequirements r)
|
protected void |
childAllocation(int index,
Rectangle alloc)
子ビューに領域を割り当てます。 |
protected boolean |
flipEastAndWestAtEnds(int position,
Position.Bias bias)
サブクラスでは、位置に基づく条件を満たす場合に true を返すように、このメソッドをオーバーライドできます。 |
protected void |
forwardUpdate(DocumentEvent.ElementChange ec,
DocumentEvent e,
Shape a,
ViewFactory f)
指定された DocumentEvent をそのモデルへの変更の通知が必要な子ビューに転送します。 |
float |
getAlignment(int axis)
ビューの望ましい配置を、軸に沿って決定します。 |
int |
getAxis()
軸プロパティを取り出します。 |
Shape |
getChildAllocation(int index,
Shape a)
指定された子ビューへの割り当てを取り出します。 |
int |
getHeight()
ボックスの現在の高さです。 |
float |
getMaximumSpan(int axis)
このビューの最大スパンを軸に沿って指定します。 |
float |
getMinimumSpan(int axis)
このビューの最小スパンを軸に沿って指定します。 |
protected int |
getOffset(int axis,
int childIndex)
特定の子について、現在のレイアウトのオフセットを取り出します。 |
float |
getPreferredSpan(int axis)
このビューに適切なスパンを軸に沿って指定します。 |
int |
getResizeWeight(int axis)
サイズ変更のウェイトを返します。 |
protected int |
getSpan(int axis,
int childIndex)
特定の子について、現在のレイアウトのスパンを取り出します。 |
protected View |
getViewAtPoint(int x,
int y,
Rectangle alloc)
指定された点の子ビューを取り出します。 |
int |
getWidth()
ボックスの現在の幅です。 |
protected boolean |
isAfter(int x,
int y,
Rectangle innerAlloc)
ある点が、割り当てられた領域の後にあるかどうかを判定します。 |
protected boolean |
isAllocationValid()
子への割り当てが現在も有効かどうかを判定します。 |
protected boolean |
isBefore(int x,
int y,
Rectangle innerAlloc)
ある点が、割り当てられた領域の前にあるかどうかを判定します。 |
protected void |
layout(int width,
int height)
子のレイアウトを実行します。 |
void |
layoutChanged(int axis)
軸に沿ったレイアウトを無効にします。 |
protected void |
layoutMajorAxis(int targetSpan,
int axis,
int[] offsets,
int[] spans)
ボックスの主軸 (つまり、それが表す軸) のレイアウトを実行します。 |
protected void |
layoutMinorAxis(int targetSpan,
int axis,
int[] offsets,
int[] spans)
ボックスの副軸 (つまり、それが表す軸に直角の軸) のレイアウトを実行します。 |
Shape |
modelToView(int pos,
Shape a,
Position.Bias b)
ドキュメントモデルの座標空間から、それにマップされるビューの座標空間へのマッピングを提供します。 |
void |
paint(Graphics g,
Shape allocation)
指定された描画表面およびその表面上の領域を使って描画します。 |
protected void |
paintChild(Graphics g,
Rectangle alloc,
int index)
子を描画します。 |
void |
preferenceChanged(View child,
boolean width,
boolean height)
子に呼び出され、そのスパンの設定が変更されたことを示します。 |
void |
replace(int index,
int length,
View[] elems)
レイアウトを無効にして、要求または割り当てのキャッシュのサイズを変更します。 |
void |
setAxis(int axis)
軸プロパティを設定します。 |
void |
setSize(float width,
float height)
ビューのサイズを設定します。 |
int |
viewToModel(float x,
float y,
Shape a,
Position.Bias[] bias)
ビューの座標空間からモデルの論理座標空間へのマッピングを提供します。 |
| クラス javax.swing.text.View から継承したメソッド |
append, breakView, changedUpdate, createFragment, forwardUpdateToView, getAttributes, getBreakWeight, getContainer, getDocument, getElement, getEndOffset, getGraphics, getParent, getStartOffset, getViewFactory, insert, insertUpdate, isVisible, modelToView, remove, removeAll, removeUpdate, updateChildren, updateLayout, viewToModel |
| クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| コンストラクタの詳細 |
public BoxView(Element elem,
int axis)
elem - このビューが扱う要素axis - View.X_AXIS または View.Y_AXIS| メソッドの詳細 |
public int getAxis()
public void setAxis(int axis)
axis - View.X_AXIS または View.Y_AXISpublic void layoutChanged(int axis)
axis - View.X_AXIS または View.Y_AXIS
protected void paintChild(Graphics g,
Rectangle alloc,
int index)
g - グラフィックスコンテキストalloc - ペイントのために割り当てられた領域index - 子のインデックス >= 0 && < getViewCount()
public void replace(int index,
int length,
View[] elems)
CompositeView 内の replaceindex - 新規ビューを挿入するための、子ビューの開始インデックス。この値は 0 以上で、getViewCount 以下length - 削除する現在の子ビューの数。この値は 0 以上で、(getViewCount() - offset) 以下views - 追加する子ビュー。追加する子 (削除しやすい) がないことを示す場合は、null の可能性もある
protected void forwardUpdate(DocumentEvent.ElementChange ec,
DocumentEvent e,
Shape a,
ViewFactory f)
View 内の forwardUpdateec - このビューが扱う要素への変更。変更がない場合は null の可能性があるe - 関連するドキュメントからの変更情報a - ビューの現在の割り当てf - ビューが子を持つ場合に再構築に使用するファクトリView.insertUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory),
View.removeUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory),
View.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
public void preferenceChanged(View child,
boolean width,
boolean height)
View 内の preferenceChangedchild - 子ビューwidth - 幅の設定が変更された場合に trueheight - 高さの設定が変更された場合に truepublic int getResizeWeight(int axis)
View 内の getResizeWeightaxis - View.X_AXIS または View.Y_AXISIllegalArgumentException - 軸が無効な場合
public void setSize(float width,
float height)
View 内の setSizewidth - 幅 >= 0height - 高さ >= 0
public void paint(Graphics g,
Shape allocation)
View 内の paintg - 使用する描画表面allocation - 描画のために割り当てられた領域View.paint(java.awt.Graphics, java.awt.Shape)
public Shape getChildAllocation(int index,
Shape a)
CompositeView 内の getChildAllocationindex - 子のインデックス >= 0 && < getViewCount()a - このビューに対する割り当て
public Shape modelToView(int pos,
Shape a,
Position.Bias b)
throws BadLocationException
CompositeView 内の modelToViewpos - 変換対象の位置 >= 0a - 描画のために割り当てられた領域BadLocationException - 指定された位置が、関連したドキュメント内の有効な位置を表さない場合View.modelToView(int, java.awt.Shape, javax.swing.text.Position.Bias)
public int viewToModel(float x,
float y,
Shape a,
Position.Bias[] bias)
CompositeView 内の viewToModelx - 変換するビュー位置の x 座標 >= 0y - 変換するビュー位置の y 座標 >= 0a - 描画のために割り当てられた領域View.viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias[])public float getAlignment(int axis)
View 内の getAlignmentaxis - View.X_AXIS または View.Y_AXISIllegalArgumentException - 軸が無効な場合public float getPreferredSpan(int axis)
View 内の getPreferredSpanaxis - View.X_AXIS または View.Y_AXISIllegalArgumentException - 軸が無効な型public float getMinimumSpan(int axis)
View 内の getMinimumSpanaxis - View.X_AXIS または View.Y_AXISIllegalArgumentException - 軸が無効な型public float getMaximumSpan(int axis)
View 内の getMaximumSpanaxis - View.X_AXIS または View.Y_AXISIllegalArgumentException - 軸が無効な型protected boolean isAllocationValid()
protected boolean isBefore(int x,
int y,
Rectangle innerAlloc)
CompositeView 内の isBeforex - X 座標 >= 0y - Y 座標 >= 0innerAlloc - 割り当てられた領域。インセットの内側の領域
protected boolean isAfter(int x,
int y,
Rectangle innerAlloc)
CompositeView 内の isAfterx - X 座標 >= 0y - Y 座標 >= 0innerAlloc - 割り当てられた領域。インセットの内側の領域
protected View getViewAtPoint(int x,
int y,
Rectangle alloc)
CompositeView 内の getViewAtPointx - X 座標 >= 0y - Y 座標 >= 0alloc - 入口では親の内部割り当て。出口で子の割り当てに変更
protected void childAllocation(int index,
Rectangle alloc)
CompositeView 内の childAllocationindex - 割り当てる子ビューのインデックス >= 0 && < getViewCount()alloc - 割り当てられる領域
protected void layout(int width,
int height)
width - 幅 >= 0height - 高さ >= 0public int getWidth()
public int getHeight()
protected void layoutMajorAxis(int targetSpan,
int axis,
int[] offsets,
int[] spans)
targetSpan - ビューに指定されたトータルスパン。子をレイアウトするために使用されるaxis - レイアウトされる軸offsets - 各子ビューのビューの起点からの座標。これは戻り値であり、このメソッドの実装によって割り当てられるspans - 各子ビューのスパン。これは戻り値であり、このメソッドの実装によって割り当てられる
protected void layoutMinorAxis(int targetSpan,
int axis,
int[] offsets,
int[] spans)
targetSpan - ビューに指定されたトータルスパン。子をレイアウトするために使用されるaxis - レイアウトされる軸offsets - 各子ビューのビューの起点からのオフセット。これは戻り値であり、このメソッドの実装によって割り当てられるspans - 各子ビューのスパン。これは戻り値であり、このメソッドの実装によって割り当てられる
protected SizeRequirements calculateMajorAxisRequirements(int axis,
SizeRequirements r)
protected SizeRequirements calculateMinorAxisRequirements(int axis,
SizeRequirements r)
protected void baselineLayout(int targetSpan,
int axis,
int[] offsets,
int[] spans)
protected SizeRequirements baselineRequirements(int axis,
SizeRequirements r)
protected int getOffset(int axis,
int childIndex)
protected int getSpan(int axis,
int childIndex)
protected boolean flipEastAndWestAtEnds(int position,
Position.Bias bias)
CompositeView の記述: CompositeView 内の flipEastAndWestAtEndsjavax.swing.text.CompositeView からコピーされたタグ:
|
JavaTM 2 Platform Std. Ed. v1.3 |
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
Java、Java 2D、JDBC は、米国およびその他の国における米国 Sun Microsystems, Inc. の商標もしくは登録商標です。
Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.