Exemplo n.º 1
0
 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();
   }
 }
Exemplo n.º 2
0
 /**
  * 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());
 }
Exemplo n.º 3
0
 /**
  * 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();
   }
 }