javax.swing.text
public class ParagraphView extends FlowView implements TabExpander
| Field Summary | |
|---|---|
| protected int | firstLineIndent
The indentation of the first line of the paragraph. |
| Constructor Summary | |
|---|---|
| ParagraphView(Element element)
Creates a new ParagraphView for the given
Element.
| |
| Method Summary | |
|---|---|
| protected void | adjustRow(ParagraphView.Row r, int desiredSpan, int x) |
| View | breakView(int axis, float len, Shape a) |
| void | changedUpdate(DocumentEvent ev, Shape a, ViewFactory vf)
Receives notification when some attributes of the displayed element
changes. |
| protected View | createRow()
Creates a new view that represents a row within a flow.
|
| protected int | findOffsetToCharactersInString(char[] string, int start)
Finds the next offset in the document that has one of the characters
specified in string. |
| float | getAlignment(int axis)
Returns the alignment for this paragraph view for the specified axis.
|
| int | getBreakWeight(int axis, float len) |
| protected int | getClosestPositionTo(int pos, Position.Bias bias, Shape a, int direction, Position.Bias[] biasRet, int rowIndex, int x) |
| protected View | getLayoutView(int i)
Returns the i-th view from the logical views, before breaking into rows.
|
| protected int | getLayoutViewCount()
Returns the number of logical child views.
|
| protected float | getPartialSize(int startOffset, int endOffset)
Returns the size that is used by this view (or it's child views) between
startOffset and endOffset. |
| protected float | getTabBase()
Returns the location where the tabs are calculated from. |
| protected TabSet | getTabSet()
Returns the TabSet used by this ParagraphView.
|
| float | nextTabStop(float x, int tabOffset) |
| protected void | setFirstLineIndent(float i)
Sets the indentation of the first line of the paragraph.
|
| protected void | setJustification(int j)
Sets the justification of the paragraph.
|
| protected void | setLineSpacing(float s)
Sets the line spacing for this paragraph.
|
| protected void | setPropertiesFromAttributes()
Fetches the cached properties from the element's attributes. |
ParagraphView for the given
Element.
Parameters: element the element that is rendered by this ParagraphView
UNKNOWN: This method is specified to take a Row parameter, which is a private inner class of that class, which makes it unusable from application code. Also, this method seems to be replaced by FlowStrategy#adjustRow(FlowView, int, int, int).
UNKNOWN: This method's signature differs from the one defined in View and is therefore never called. It is probably there for historical reasons.
Parameters: ev the document event a the allocation of this view vf the view factory to use for creating new child views
Returns: a view for a new row
string. If there is no such character found,
this returns -1.
Parameters: string the characters to search for start the start offset
Returns: the next offset in the document that has one of the characters
specified in string
Parameters: axis the axis which is examined
Returns: the alignment for this paragraph view for the specified axis
UNKNOWN: This method's signature differs from the one defined in View and is therefore never called. It is probably there for historical reasons.
Parameters: i the index of the logical view to return
Returns: the i-th view from the logical views, before breaking into rows
Returns: the number of logical child views
startOffset and endOffset. If the child views
implement the TabableView interface, then this is used to
determine the span, otherwise we use the preferred span of the child
views.
Parameters: startOffset the start offset endOffset the end offset
Returns: the span used by the view between startOffset and
endOffset
0.0F by default.
Returns: the location where the tabs are calculated from
Returns: the TabSet used by this ParagraphView
Parameters: i the indentation to set
Parameters: j the justification to set
Parameters: s the line spacing to set