Coverage Report - org.argouml.notation.NotationRenderer
 
Classes in this File Line Coverage Branch Coverage Complexity
NotationRenderer
N/A
N/A
1
 
 1  
 /* $Id$
 2  
  *******************************************************************************
 3  
  * Copyright (c) 2010 Contributors - see below
 4  
  * All rights reserved. This program and the accompanying materials
 5  
  * are made available under the terms of the Eclipse Public License v1.0
 6  
  * which accompanies this distribution, and is available at
 7  
  * http://www.eclipse.org/legal/epl-v10.html
 8  
  *
 9  
  * Contributors:
 10  
  *    Michiel van der Wulp
 11  
  *******************************************************************************
 12  
  */
 13  
 
 14  
 package org.argouml.notation;
 15  
 
 16  
 /**
 17  
  * An interface to be implemented by Objects that wish to render a 
 18  
  * string-representation for an UML modelElement. <p>
 19  
  * 
 20  
  * The Object will be notified of model changes that cause a redraw of the string.
 21  
  * <p>
 22  
  * These functions have the NotationProvider as a parameter, since 
 23  
  * the Object may have multiple NotationProviders, and may need 
 24  
  * to keep track which of their strings to refresh.
 25  
  *
 26  
  * @author mvw
 27  
  */
 28  
 public interface NotationRenderer {
 29  
 
 30  
     /**
 31  
      * This function is called by the NotationProvider 
 32  
      * to notify the renderer (e.g. a Fig) of a change 
 33  
      * in the textual representation of the modelElement. <p>
 34  
      * 
 35  
      * The <code>np</code> argument is needed 
 36  
      * because one Fig might have 
 37  
      * multiple notationProviders (even of the same type).
 38  
      * 
 39  
      * @param np the notationProvider that noticed the change
 40  
      * @param rendering the new textual representation
 41  
      */
 42  
     public void notationRenderingChanged(NotationProvider np, 
 43  
             String rendering);
 44  
     
 45  
     /**
 46  
      * Getter for the NotationSettings that apply at the moment of this call.
 47  
      * <p>
 48  
      * The <code>np</code> argument is needed 
 49  
      * because one Fig might have a
 50  
      * different notationSetting per NotationProvider.
 51  
      * 
 52  
      * @param np the notationProvider that noticed the change
 53  
      * @return the current NotationSettings for this renderer
 54  
      */
 55  
     public NotationSettings getNotationSettings(NotationProvider np);
 56  
     
 57  
     /**
 58  
      * Getter for the UML object that forms the basis of this NotationProvider.
 59  
      * <p>
 60  
      * The <code>np</code> argument is needed 
 61  
      * because one Fig might have a
 62  
      * different owner per notationProvider.
 63  
      * 
 64  
      * @param np the notationProvider that noticed the change
 65  
      * @return the UML object shown to the NotationProvider at creation time.
 66  
      */
 67  
     public Object getOwner(NotationProvider np);
 68  
 }