public void changedUpdate(DocumentEvent changes, Shape a, ViewFactory f) { super.changedUpdate(changes, a, f); int pos = changes.getOffset(); if (pos <= getStartOffset() && (pos + changes.getLength()) >= getEndOffset()) { setPropertiesFromAttributes(); } }
/** * Fetches this view's properties from the style attributes of this view's element. * * <p>This forwards to super and then fetches a {@link StyleSheet.ListPainter} from the stylesheet * suitable for painting the list. */ protected void setPropertiesFromAttributes() { super.setPropertiesFromAttributes(); painter = getStyleSheet().getListPainter(getAttributes()); }
/** * Establishes the parent view for this view. This is guaranteed to be called before any other * methods if the parent view is functioning properly. * * <p>This is implemented to forward to the superclass as well as call the {@link * #setPropertiesFromAttributes()} method to set the paragraph properties from the css attributes. * The call is made at this time to ensure the ability to resolve upward through the parents view * attributes. * * @param parent the new parent, or null if the view is being removed from a parent it was * previously added to */ public void setParent(View parent) { super.setParent(parent); if (parent != null) { setPropertiesFromAttributes(); } }