/** @param np The notationProvider to set. */
 void setNotationProvider(NotationProvider np) {
   if (notationProvider != null) {
     notationProvider.cleanListener(this, getOwner());
   }
   this.notationProvider = np;
   initNotationArguments();
 }
 @Override
 public void propertyChange(PropertyChangeEvent pce) {
   if (notationProvider != null) {
     notationProvider.updateListener(this, getOwner(), pce);
   }
   super.propertyChange(pce);
 }
 /**
  * @param modelElement the UML element
  * @param args a set of arguments that may influence the generated notation
  * @return a string which represents the path
  */
 static String generatePath(Object modelElement, Map args) {
   if (NotationProvider.isValue("pathVisible", args)) {
     return generatePath(modelElement);
   } else {
     return "";
   }
 }
 /**
  * @param modelElement the UML element
  * @param args a set of arguments that may influence the generated notation
  * @return a string which represents the visibility
  * @deprecated for 0.27.3 by tfmorris. Use {@link #generateVisibility(Object)} or {@link
  *     #generateVisibility(Object, org.argouml.notation.NotationSettings)}
  */
 @Deprecated
 static String generateVisibility(Object modelElement, Map args) {
   String s = "";
   if (NotationProvider.isValue("visibilityVisible", args)) {
     s = NotationUtilityJava.generateVisibility(modelElement);
   }
   return s;
 }
  /**
   * This is a template method called by the ArgoUML framework as the result of a change to a model
   * element. Do not call this method directly yourself.
   *
   * <p>Override this in any subclasses in order to redisplay the Fig due to change of any model
   * element that this Fig is listening to.
   *
   * <p>This method is guaranteed by the framework to be running on the Swing/AWT thread.
   *
   * @param event the UmlChangeEvent that caused the change
   */
  protected void updateLayout(UmlChangeEvent event) {
    assert event != null;

    if (notationProvider != null
        && (!"remove".equals(event.getPropertyName())
            || event.getSource() != getOwner())) { // not???
      this.setText(notationProvider.toString(getOwner(), getNotationSettings()));
      damage();
    }
  }
 protected void initNotationProviders() {
   if (notationProvider != null) {
     notationProvider.cleanListener(this, getOwner());
   }
   if (getOwner() != null) {
     NotationName notation = Notation.findNotation(getNotationSettings().getNotationLanguage());
     notationProvider =
         NotationProviderFactory2.getInstance()
             .getNotationProvider(getNotationProviderType(), getOwner(), this, notation);
     initNotationArguments();
   }
 }
 @Override
 protected void setText() {
   assert getOwner() != null;
   assert notationProvider != null;
   setText(notationProvider.toString(getOwner(), getNotationSettings()));
 }
 /** Parse the edited text to adapt the UML model. */
 protected void textEdited() {
   notationProvider.parse(getOwner(), getText());
   setText();
 }
 @Override
 public void removeFromDiagram() {
   ArgoEventPump.removeListener(ArgoEventTypes.ANY_NOTATION_EVENT, this);
   notationProvider.cleanListener(this, getOwner());
   super.removeFromDiagram();
 }