70 </p> |
70 </p> |
71 <p align=center><img src="doc-files/View-flexibility.jpg" |
71 <p align=center><img src="doc-files/View-flexibility.jpg" |
72 alt="The above text describes this graphic."> |
72 alt="The above text describes this graphic."> |
73 <p>The minimum set of methods for layout are: |
73 <p>The minimum set of methods for layout are: |
74 <ul> |
74 <ul> |
75 <li><a href="#getMinimumSpan(int)">getMinimumSpan</a> |
75 <li>{@link #getMinimumSpan(int) getMinimumSpan} |
76 <li><a href="#getPreferredSpan(int)">getPreferredSpan</a> |
76 <li>{@link #getPreferredSpan(int) getPreferredSpan} |
77 <li><a href="#getMaximumSpan(int)">getMaximumSpan</a> |
77 <li>{@link #getMaximumSpan(int) getMaximumSpan} |
78 <li><a href="#getAlignment(int)">getAlignment</a> |
78 <li>{@link #getAlignment(int) getAlignment} |
79 <li><a href="#preferenceChanged(javax.swing.text.View, boolean, boolean)">preferenceChanged</a> |
79 <li>{@link #preferenceChanged(javax.swing.text.View, boolean, boolean) preferenceChanged} |
80 <li><a href="#setSize(float, float)">setSize</a> |
80 <li>{@link #setSize(float, float) setSize} |
81 </ul> |
81 </ul> |
82 |
82 |
83 <p>The <code>setSize</code> method should be prepared to be called a number of times |
83 <p>The <code>setSize</code> method should be prepared to be called a number of times |
84 (i.e. It may be called even if the size didn't change). |
84 (i.e. It may be called even if the size didn't change). |
85 The <code>setSize</code> method |
85 The <code>setSize</code> method |
140 order. View implementations may have Z-Order associated with them if the |
140 order. View implementations may have Z-Order associated with them if the |
141 children are overlapping. |
141 children are overlapping. |
142 </ul> |
142 </ul> |
143 <p>The methods for rendering are: |
143 <p>The methods for rendering are: |
144 <ul> |
144 <ul> |
145 <li><a href="#paint(java.awt.Graphics, java.awt.Shape)">paint</a> |
145 <li>{@link #paint(java.awt.Graphics, java.awt.Shape) paint} |
146 </ul> |
146 </ul> |
147 <p> |
147 <p> |
148 |
148 |
149 <dt><b>Translate between the model and view coordinate systems.</b> |
149 <dt><b>Translate between the model and view coordinate systems.</b> |
150 <dd> |
150 <dd> |
151 <p>Because the view objects are produced from a factory and therefore cannot |
151 <p>Because the view objects are produced from a factory and therefore cannot |
152 necessarily be counted upon to be in a particular pattern, one must be able |
152 necessarily be counted upon to be in a particular pattern, one must be able |
153 to perform translation to properly locate spatial representation of the model. |
153 to perform translation to properly locate spatial representation of the model. |
154 The methods for doing this are: |
154 The methods for doing this are: |
155 <ul> |
155 <ul> |
156 <li><a href="#modelToView(int, javax.swing.text.Position.Bias, int, javax.swing.text.Position.Bias, java.awt.Shape)">modelToView</a> |
156 <li>{@link #modelToView(int, javax.swing.text.Position.Bias, int, javax.swing.text.Position.Bias, java.awt.Shape) modelToView} |
157 <li><a href="#viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias[])">viewToModel</a> |
157 <li>{@link #viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias[]) viewToModel} |
158 <li><a href="#getDocument()">getDocument</a> |
158 <li>{@link #getDocument() getDocument} |
159 <li><a href="#getElement()">getElement</a> |
159 <li>{@link #getElement() getElement} |
160 <li><a href="#getStartOffset()">getStartOffset</a> |
160 <li>{@link #getStartOffset() getStartOffset} |
161 <li><a href="#getEndOffset()">getEndOffset</a> |
161 <li>{@link #getEndOffset() getEndOffset} |
162 </ul> |
162 </ul> |
163 <p>The layout must be valid prior to attempting to make the translation. |
163 <p>The layout must be valid prior to attempting to make the translation. |
164 The translation is not valid, and must not be attempted while changes |
164 The translation is not valid, and must not be attempted while changes |
165 are being broadcasted from the model via a <code>DocumentEvent</code>. |
165 are being broadcasted from the model via a <code>DocumentEvent</code>. |
166 </p> |
166 </p> |