115 <li>The view gets its allocation from the parent at paint time, so it |
115 <li>The view gets its allocation from the parent at paint time, so it |
116 must be prepared to redo layout if the allocated area is different from |
116 must be prepared to redo layout if the allocated area is different from |
117 what it is prepared to deal with. |
117 what it is prepared to deal with. |
118 <li>The coordinate system is the same as the hosting <code>Component</code> |
118 <li>The coordinate system is the same as the hosting <code>Component</code> |
119 (i.e. the <code>Component</code> returned by the |
119 (i.e. the <code>Component</code> returned by the |
120 <a href="#getContainer">getContainer</a> method). |
120 {@link #getContainer getContainer} method). |
121 This means a child view lives in the same coordinate system as the parent |
121 This means a child view lives in the same coordinate system as the parent |
122 view unless the parent has explicitly changed the coordinate system. |
122 view unless the parent has explicitly changed the coordinate system. |
123 To schedule itself to be repainted a view can call repaint on the hosting |
123 To schedule itself to be repainted a view can call repaint on the hosting |
124 <code>Component</code>. |
124 <code>Component</code>. |
125 <li>The default is to <em>not clip</em> the children. It is more efficient |
125 <li>The default is to <em>not clip</em> the children. It is more efficient |
178 At any level in the view hierarchy, that view knows enough about its children to |
178 At any level in the view hierarchy, that view knows enough about its children to |
179 best distribute the change information further. Changes are therefore broadcasted |
179 best distribute the change information further. Changes are therefore broadcasted |
180 starting from the root of the view hierarchy. |
180 starting from the root of the view hierarchy. |
181 The methods for doing this are: |
181 The methods for doing this are: |
182 <ul> |
182 <ul> |
183 <li><a href="#insertUpdate">insertUpdate</a> |
183 <li>{@link #insertUpdate insertUpdate} |
184 <li><a href="#removeUpdate">removeUpdate</a> |
184 <li>{@link #removeUpdate removeUpdate} |
185 <li><a href="#changedUpdate">changedUpdate</a> |
185 <li>{@link #changedUpdate changedUpdate} |
186 </ul> |
186 </ul> |
187 <p> |
187 <p> |
188 </dl> |
188 </dl> |
189 * |
189 * |
190 * @author Timothy Prinzing |
190 * @author Timothy Prinzing |
668 * the document in a location that this view is responsible for. |
668 * the document in a location that this view is responsible for. |
669 * To reduce the burden to subclasses, this functionality is |
669 * To reduce the burden to subclasses, this functionality is |
670 * spread out into the following calls that subclasses can |
670 * spread out into the following calls that subclasses can |
671 * reimplement: |
671 * reimplement: |
672 * <ol> |
672 * <ol> |
673 * <li><a href="#updateChildren">updateChildren</a> is called |
673 * <li>{@link #updateChildren updateChildren} is called |
674 * if there were any changes to the element this view is |
674 * if there were any changes to the element this view is |
675 * responsible for. If this view has child views that are |
675 * responsible for. If this view has child views that are |
676 * represent the child elements, then this method should do |
676 * represent the child elements, then this method should do |
677 * whatever is necessary to make sure the child views correctly |
677 * whatever is necessary to make sure the child views correctly |
678 * represent the model. |
678 * represent the model. |
679 * <li><a href="#forwardUpdate">forwardUpdate</a> is called |
679 * <li>{@link #forwardUpdate forwardUpdate} is called |
680 * to forward the DocumentEvent to the appropriate child views. |
680 * to forward the DocumentEvent to the appropriate child views. |
681 * <li><a href="#updateLayout">updateLayout</a> is called to |
681 * <li>{@link #updateLayout updateLayout} is called to |
682 * give the view a chance to either repair its layout, to reschedule |
682 * give the view a chance to either repair its layout, to reschedule |
683 * layout, or do nothing. |
683 * layout, or do nothing. |
684 * </ol> |
684 * </ol> |
685 * |
685 * |
686 * @param e the change information from the associated document |
686 * @param e the change information from the associated document |
709 * in a location that this view is responsible for. |
709 * in a location that this view is responsible for. |
710 * To reduce the burden to subclasses, this functionality is |
710 * To reduce the burden to subclasses, this functionality is |
711 * spread out into the following calls that subclasses can |
711 * spread out into the following calls that subclasses can |
712 * reimplement: |
712 * reimplement: |
713 * <ol> |
713 * <ol> |
714 * <li><a href="#updateChildren">updateChildren</a> is called |
714 * <li>{@link #updateChildren updateChildren} is called |
715 * if there were any changes to the element this view is |
715 * if there were any changes to the element this view is |
716 * responsible for. If this view has child views that are |
716 * responsible for. If this view has child views that are |
717 * represent the child elements, then this method should do |
717 * represent the child elements, then this method should do |
718 * whatever is necessary to make sure the child views correctly |
718 * whatever is necessary to make sure the child views correctly |
719 * represent the model. |
719 * represent the model. |
720 * <li><a href="#forwardUpdate">forwardUpdate</a> is called |
720 * <li>{@link #forwardUpdate forwardUpdate} is called |
721 * to forward the DocumentEvent to the appropriate child views. |
721 * to forward the DocumentEvent to the appropriate child views. |
722 * <li><a href="#updateLayout">updateLayout</a> is called to |
722 * <li>{@link #updateLayout updateLayout} is called to |
723 * give the view a chance to either repair its layout, to reschedule |
723 * give the view a chance to either repair its layout, to reschedule |
724 * layout, or do nothing. |
724 * layout, or do nothing. |
725 * </ol> |
725 * </ol> |
726 * |
726 * |
727 * @param e the change information from the associated document |
727 * @param e the change information from the associated document |
750 * in a location that this view is responsible for. |
750 * in a location that this view is responsible for. |
751 * To reduce the burden to subclasses, this functionality is |
751 * To reduce the burden to subclasses, this functionality is |
752 * spread out into the following calls that subclasses can |
752 * spread out into the following calls that subclasses can |
753 * reimplement: |
753 * reimplement: |
754 * <ol> |
754 * <ol> |
755 * <li><a href="#updateChildren">updateChildren</a> is called |
755 * <li>{@link #updateChildren updateChildren} is called |
756 * if there were any changes to the element this view is |
756 * if there were any changes to the element this view is |
757 * responsible for. If this view has child views that are |
757 * responsible for. If this view has child views that are |
758 * represent the child elements, then this method should do |
758 * represent the child elements, then this method should do |
759 * whatever is necessary to make sure the child views correctly |
759 * whatever is necessary to make sure the child views correctly |
760 * represent the model. |
760 * represent the model. |
761 * <li><a href="#forwardUpdate">forwardUpdate</a> is called |
761 * <li>{@link #forwardUpdate forwardUpdate} is called |
762 * to forward the DocumentEvent to the appropriate child views. |
762 * to forward the DocumentEvent to the appropriate child views. |
763 * <li><a href="#updateLayout">updateLayout</a> is called to |
763 * <li>{@link #updateLayout updateLayout} is called to |
764 * give the view a chance to either repair its layout, to reschedule |
764 * give the view a chance to either repair its layout, to reschedule |
765 * layout, or do nothing. |
765 * layout, or do nothing. |
766 * </ol> |
766 * </ol> |
767 * |
767 * |
768 * @param e the change information from the associated document |
768 * @param e the change information from the associated document |
1184 /** |
1184 /** |
1185 * Forwards the <code>DocumentEvent</code> to the give child view. This |
1185 * Forwards the <code>DocumentEvent</code> to the give child view. This |
1186 * simply messages the view with a call to <code>insertUpdate</code>, |
1186 * simply messages the view with a call to <code>insertUpdate</code>, |
1187 * <code>removeUpdate</code>, or <code>changedUpdate</code> depending |
1187 * <code>removeUpdate</code>, or <code>changedUpdate</code> depending |
1188 * upon the type of the event. This is called by |
1188 * upon the type of the event. This is called by |
1189 * <a href="#forwardUpdate">forwardUpdate</a> to forward |
1189 * {@link #forwardUpdate forwardUpdate} to forward |
1190 * the event to children that need it. |
1190 * the event to children that need it. |
1191 * |
1191 * |
1192 * @param v the child view to forward the event to |
1192 * @param v the child view to forward the event to |
1193 * @param e the change information from the associated document |
1193 * @param e the change information from the associated document |
1194 * @param a the current allocation of the view |
1194 * @param a the current allocation of the view |