|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요 : 상자 | 필드 | 생성자 | 메소드 | 상세 : 필드 | 생성자 | 메소드 |
java.lang.Objectjavax.swing.text.View
javax.swing.text.CompositeView
javax.swing.text.BoxView
javax.swing.text.FlowView
javax.swing.text.ParagraphView
public class ParagraphView
복수의 폰트, 색, 컴퍼넌트, 아이콘등을 지원하는 단순한 행 즉시 단락의 뷰입니다. 이것은 기본적으로, 주위에 마진이 있는 수직 박스입니다. 박스의 컨텐츠는, 특수한 수평 박스인 행의 모임입니다. 이 뷰는, 단락 요소의 아이 요소를 나타내는 뷰의 컬렉션을 작성합니다. 이러한 각 뷰는, 뷰가 1 행에 들어가는 경우에는 행에 직접 배치되어 그렇지 않은 경우에는 breakView
메소드가 불려 가 각 행에 분할해 거두도록(듯이) 시도됩니다.
View
상자의 클래스의 개요 |
---|
클래스 javax.swing.text. FlowView 로부터 상속된 상자의 클래스/인터페이스 |
---|
FlowView.FlowStrategy |
필드의 개요 | |
---|---|
protected int |
firstLineIndent
좌측으로부터의 인 세트에 의한 선두행의 인덴트입니다. |
클래스 javax.swing.text. FlowView 로부터 상속된 필드 |
---|
layoutPool , layoutSpan , 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 |
생성자 의 개요 | |
---|---|
ParagraphView (Element elem)
지정된 요소의 ParagraphView 를 구축합니다. |
메소드의 개요 | |
---|---|
protected void |
adjustRow (javax.swing.text.ParagraphView.Row r,
int desiredSpan,
int x)
지정된 행을 가능하면 조정해, 배치 스팬내에 넣도록(듯이) 합니다. |
View |
breakView (int axis,
float len,
Shape a)
지정된 축 및 지정된 길이로 이 뷰를 분할합니다. |
void |
changedUpdate (DocumentEvent changes,
Shape a,
ViewFactory f)
이 뷰가 취급하는 위치에서 속성이 변경된 것을 문서로부터 통지합니다. |
protected View |
createRow ()
플로우의 아이에 상당하는 행을 보관 유지하기 위해서 사용하는 View 를 작성합니다. |
protected int |
findOffsetToCharactersInString (char[] string,
int start)
문서내의 다음의 문자를 string 내의 임의의 문자를 사용해 검색합니다. |
protected boolean |
flipEastAndWestAtEnds (int position,
Position.Bias bias)
다음의 뷰를 어느 방향으로 배치할까를 결정합니다. |
float |
getAlignment (int axis)
축으로 따른 이 뷰의 바람직한 레이아웃을 결정합니다. |
int |
getBreakWeight (int axis,
float len)
지정된 위치의 브레이크 웨이트를 가져옵니다. |
protected int |
getClosestPositionTo (int pos,
Position.Bias b,
Shape a,
int direction,
Position.Bias [] biasRet,
int rowIndex,
int x)
x 에 가장 근접한 모델내의 위치를 돌려줍니다. |
int |
getFlowSpan (int index)
지정된 아이의 인덱스에 반해 플로우 하는 제약 스팬을 가져옵니다. |
int |
getFlowStart (int index)
플로우 스팬을 개시하는, 플로우 축으로 따른 위치를 가져옵니다. |
protected View |
getLayoutView (int index)
지정된 index 의 뷰를 돌려줍니다. |
protected int |
getLayoutViewCount ()
이 뷰가 취급하는 뷰의 수를 돌려줍니다. |
protected int |
getNextNorthSouthVisualPositionFrom (int pos,
Position.Bias b,
Shape a,
int direction,
Position.Bias [] biasRet)
커서를 둘 수 있는, 다음의 시각적인 위치를 돌려줍니다. |
protected float |
getPartialSize (int startOffset,
int endOffset)
startOffset 와 endOffset 의 사이의 뷰가 사용하는 사이즈를 돌려줍니다. |
protected float |
getTabBase ()
탭 계산의 개시 위치를 돌려줍니다. |
protected TabSet |
getTabSet ()
탭의 계산으로 사용하는 TabSet 를 가져옵니다. |
float |
nextTabStop (float x,
int tabOffset)
지정된 참조 위치에서(보다) 뒤의 다음의 tab stop 위치를 돌려줍니다. |
void |
paint (Graphics g,
Shape a)
지정된 draw 표면 및 그 표면상의 영역을 사용해 draw 합니다. |
protected void |
setFirstLineIndent (float fi)
선두행의 인덴트를 설정합니다. |
protected void |
setJustification (int j)
위치 가지런히 하고의 형식을 설정합니다. |
protected void |
setLineSpacing (float ls)
행간격을 설정합니다. |
protected void |
setPropertiesFromAttributes ()
속성으로부터, 캐쉬에 기입해지는 프로퍼티을 설정합니다. |
클래스 javax.swing.text. FlowView 로부터 상속된 메소드 |
---|
calculateMinorAxisRequirements , getFlowAxis , getViewIndexAtPosition , insertUpdate , layout , loadChildren , removeUpdate , setParent |
클래스 javax.swing.text. BoxView 로부터 상속된 메소드 |
---|
baselineLayout , baselineRequirements , calculateMajorAxisRequirements , childAllocation , forwardUpdate , getAxis , getChildAllocation , getHeight , getMaximumSpan , getMinimumSpan , getOffset , getPreferredSpan , getResizeWeight , getSpan , getViewAtPoint , getWidth , isAfter , isAllocationValid , isBefore , isLayoutValid , layoutChanged , layoutMajorAxis , layoutMinorAxis , modelToView , paintChild , preferenceChanged , replace , setAxis , setSize , viewToModel |
클래스 javax.swing.text. CompositeView 로부터 상속된 메소드 |
---|
getBottomInset , getInsideAllocation , getLeftInset , getNextEastWestVisualPositionFrom , getNextVisualPositionFrom , getRightInset , getTopInset , getView , getViewAtPosition , getViewCount , getViewIndex , modelToView , setInsets , setParagraphInsets |
클래스 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 firstLineIndent
생성자 의 상세 |
---|
public ParagraphView(Element elem)
ParagraphView
를 구축합니다.
elem
- 이 뷰가 취급하는 요소메소드의 상세 |
---|
protected void setJustification(int j)
j
- 다음의 값의 어떤 것인가.
StyleConstants.ALIGN_LEFT
StyleConstants.ALIGN_CENTER
StyleConstants.ALIGN_RIGHT
protected void setLineSpacing(float ls)
ls
- 치는, 행의 높이의 계수protected void setFirstLineIndent(float fi)
fi
- 포인트 단위의 값protected void setPropertiesFromAttributes()
protected int getLayoutViewCount()
View
의 각 부분을 배열하기 위해서 사용되어 따분한가의 행입니다. 이것은, 2 차원에 늘어놓을 수 있었던 뷰의 수로, 이 뷰가 취급하는 요소의 아이 요소의 수에 동일해집니다.
ParagraphView
가 취급하는 뷰의 수protected View getLayoutView(int index)
index
의 뷰를 돌려줍니다. 단락의 아이 뷰는, 아이 요소를 나타내는 Views
의 각 부분을 배열하기 위해서 사용되어 따분한가의 행입니다. 이 메소드는, 아이 요소 인덱스를 취급하는 뷰를 (분할전에) 돌려줍니다. 이것들은, 팩토리로부터 (아이 요소를 나타내기 위해서(때문에)) 작성되어 레이아웃에 사용되는 뷰입니다.
index
- 요구하는 뷰의 index
index
의 뷰protected void adjustRow(javax.swing.text.ParagraphView.Row r, int desiredSpan, int x)
이것은 내부 사용을 위한 것으로, 직접 사용할 수 없습니다.
r
- 현재의 배치 스팬에
조정되는 행desiredSpan
- 현재의 배치 스팬 >= 0x
- r 의 개시 위치protected int getNextNorthSouthVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias [] biasRet) throws BadLocationException
CompositeView
내의 getNextNorthSouthVisualPositionFrom
pos
- 모델에의 위치b
- Position.Bias.Forward
또는
Position.Bias.Backward
a
- draw를 위해서(때문에) 할당할 수 있었던 영역direction
- SwingConstants.NORTH
또는 SwingConstants.SOUTH
biasRet
- 이 메소드로 확인되는 바이어스를 가지는 배열
BadLocationException
CompositeView.getNextVisualPositionFrom(int, javax.swing.text.Position.Bias, java.awt.Shape, int, javax.swing.text.Position.Bias[])
protected int getClosestPositionTo(int pos, Position.Bias b, Shape a, int direction, Position.Bias [] biasRet, int rowIndex, int x) throws BadLocationException
x
에 가장 근접한 모델내의 위치를 돌려줍니다. rowIndex
는, 검색 대상의 뷰의 인덱스를 지정합니다.
pos
- 모델에의 위치a
- draw를 위해서(때문에) 할당할 수 있었던 영역direction
- 다음의 값의 어떤 것인가.
SwingConstants.NORTH
SwingConstants.SOUTH
biasRet
- 이 메소드로 확인되는 바이어스를 가지는 배열rowIndex
- 뷰의 인덱스x
- 대상이 되는 x 좌표
x
에 가장 가까운 모델 위치
BadLocationException
protected boolean flipEastAndWestAtEnds(int position, Position.Bias bias)
View
가 고려됩니다. 일반적으로은, EAST 에의 View
가 인덱스 n + 1, WEST 에의 View
가 인덱스 n -1 가 되도록(듯이),View
는 왼쪽에서 오른쪽에 레이아웃 됩니다. 쌍방향 텍스트 등 일부의 경우에서는, EAST 에의 View
를 인덱스 n + 1 은 아니고 인덱스 n -1 에, 또는 WEST 에의 View
를 인덱스 n - 1 은 아니고 인덱스 n + 1 으로 할 수도 있습니다. 이 경우, 이 메소드는 true 를 돌려주어,View
가 내림차순에 레이아웃 되고 있는 것을 나타냅니다.
텍스트가 금방 다른 곳으로 레이아웃 되고 있는 경우는 true 를 돌려주어, 그렇지 않은 경우 false 를 돌려줍니다.
BoxView
내의 flipEastAndWestAtEnds
position
- 모델에의 위치bias
- Position.Bias.Forward
또는
Position.Bias.Backward
public int getFlowSpan(int index)
FlowView
내의 getFlowSpan
index
- 조회되는 뷰의 인덱스
index
로 지정된 뷰의 제약 스팬FlowView.getFlowStart(int)
public int getFlowStart(int index)
FlowView
내의 getFlowStart
index
- 조회되는 뷰의 인덱스
index
로 지정된 뷰의 위치FlowView.getFlowSpan(int)
protected View createRow()
View
를 작성합니다.
FlowView
내의 createRow
View
public float nextTabStop(float x, int tabOffset)
getTabbedSpan
를 호출해 아이 뷰의 바람직한 스팬을 결정합니다. 논리자 뷰는, 탭의 전개 방법을 인식하고 있는 단락에 대해서 그 탭 전개를 위양 합니다. 그 탭 전개의 필요성을 단락에 위양 하는 뷰에는,LabelView
등이 있습니다.
이 메소드를 구현하면(자), 단락 요소의 속성 세트로 TabSet
를 찾아내려고 합니다. 1 개(살) 발견되면(자) 그 설정이 사용되어 그 이외의 경우에는 디폴트의 전개가 제공됩니다. 탭 전개의 베이스 위치는, 단락의 가장 가까운 할당으로부터의 왼쪽 인 세트 (아이의 배치의 기준)입니다.
TabExpander
내의 nextTabStop
x
- X 참조 위치tabOffset
- 탭이 발생하는 텍스트 스트림내의 위치.
0 이상
TabSet
,
TabStop
,
LabelView
protected TabSet getTabSet()
TabSet
를 가져옵니다.
TabSet
protected float getPartialSize(int startOffset, int endOffset)
startOffset
와 endOffset
의 사이의 뷰가 사용하는 사이즈를 돌려줍니다. 아이 뷰가 TabableView
인터페이스를 구현하는 경우에, 이것은 getPartialView
를 사용해 사이즈를 계산합니다. 사이즈가 필요해,View
가 TabableView
인터페이스를 구현하지 않는 경우는,preferredSpan
가 사용됩니다.
startOffset
- 문서의 개시 오프셋(offset) >= 0endOffset
- 문서의 종료 오프셋(offset) >= startOffset
protected int findOffsetToCharactersInString(char[] string, int start)
string
내의 임의의 문자를 사용해 검색합니다. 검색은 오프셋(offset) start
로부터 개시합니다. 어느 문자도 발견되지 않는 경우는,-1 이 돌려주어집니다.
string
- 캐릭터 라인start
- 모델내의 개시 위치 >= 0
protected float getTabBase()
public void paint(Graphics g, Shape a)
BoxView
내의 paint
g
- 사용하는 draw 표면a
- draw를 위해서(때문에) 할당할 수 있었던 영역View.paint(java.awt.Graphics, java.awt.Shape)
public float getAlignment(int axis)
BoxView
내의 getAlignment
axis
- View.X_AXIS
또는 View.Y_AXIS
public View breakView(int axis, float len, Shape a)
ParagraphView
인스턴스는,len
가 최초의 선보다 뒤에 있는 경우에게만,Y_AXIS
인 만큼 따라 분할 가능합니다.
axis
- View.X_AXIS
또는
View.Y_AXIS
len
- 지정된 축으로 따라
분할하는 위치. 0 이상a
- 뷰의 현재의 할당
View.breakView(int, int, float, float)
public int getBreakWeight(int axis, float len)
ParagraphView
인스턴스는,Y_AXIS
인 만큼 따르고, 또 len
가 최초의 열의 후에 있는 경우만 분할 가능합니다. 길이가 1 열보다 짧은 경우,BadBreakWeight
의 값이 돌려주어집니다.
axis
- View.X_AXIS
또는
View.Y_AXIS
len
- 분할하는 위치 >= 0
GoodBreakWeight
또는 BadBreakWeight
의 어떤 것이나View.getBreakWeight(int, float, float)
public void changedUpdate(DocumentEvent changes, Shape a, ViewFactory f)
FlowView
내의 changedUpdate
changes
- 관련하는 문서로부터의 변경 정보a
- 뷰의 현재의 할당f
- 뷰가 아이를 가지는 경우에 재구축에 사용하는 팩토리View.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요 : 상자 | 필드 | 생성자 | 메소드 | 상세 : 필드 | 생성자 | 메소드 |
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.