InlineView(Element elem)
Constructs a new view wrapped on an element.
Method Summary
void
changedUpdate(DocumentEvent e,
Shape a,
ViewFactory f)
Gives notification from the document that attributes were changed
in a location that this view is responsible for.
public int getBreakWeight(int axis,
float pos,
float len)
Determines how attractive a break opportunity in
this view is. This can be used for determining which
view is the most attractive to call breakView
on in the process of formatting. A view that represents
text that has whitespace in it might be more attractive
than a view that has no whitespace, for example. The
higher the weight, the more attractive the break. A
value equal to or lower than BadBreakWeight
should not be considered for a break. A value greater
than or equal to ForcedBreakWeight should
be broken.
This is implemented to provide the default behavior
of returning BadBreakWeight unless the length
is greater than the length of the view in which case the
entire view represents the fragment. Unless a view has
been written to support breaking behavior, it is not
attractive to try and break the view. An example of
a view that does support breaking is LabelView.
An example of a view that uses break weight is
ParagraphView.
Submit a bug or feature For further API reference and developer documentation, see Java 2 SDK SE Developer Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries. Copyright 1993-2001 Sun Microsystems, Inc. 901 San Antonio Road Palo Alto, California, 94303, U.S.A. All Rights Reserved.