[kepler-dev] [Bug 3254] New: - Annotations for some Ptolemy demos are not wrapped

bugzilla-daemon at ecoinformatics.org bugzilla-daemon at ecoinformatics.org
Wed Apr 30 09:11:33 PDT 2008


http://bugzilla.ecoinformatics.org/show_bug.cgi?id=3254

           Summary: Annotations for some Ptolemy demos are not wrapped
           Product: Kepler
           Version: 1.0.0rc1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P3
         Component: general
        AssignedTo: cxh at eecs.berkeley.edu
        ReportedBy: cxh at eecs.berkeley.edu
         QAContact: kepler-dev at ecoinformatics.org


The annotation for the SDF Expression demo is not wrapped,
it runs off the right side of the screen.

However, the annotation for the LMS Adaptive demo does properly wrap.

A quick look at the xml shows that the SDF Expression:

<property name="annotation1" class="ptolemy.kernel.util.Attribute">
        <property name="_location" class="ptolemy.kernel.util.Location"
value="140.0, 5.0">
        </property>
        <property name="_iconDescription"
class="ptolemy.kernel.util.SingletonConfigurableAttribute">
            <configure>
           <svg>
           <text x="20" style="font-size:14; font-family:sanserif; fill:blue"
y="20">This model repeatedly evaluates an expression, a function of two ramp
signals, slow and fast. Try right clicking on the expr actor, select
"Configure" and change it to "cos(slow)*cos(fast)" and then run
the demo with View->Run Window->Go. Other interesting alternatives
include:
    "cos(fast*cos(slow))"
    "0.2*slow + cos(fast)"</text>
           </svg>
           </configure>
        </property>
        <property name="_hideName"
class="ptolemy.kernel.util.SingletonAttribute">
        </property>
    </property>

The LMS Adaptive demo has:

<property name="Annotation"
class="ptolemy.vergil.kernel.attributes.TextAttribute">
        <property name="text" class="ptolemy.kernel.util.StringAttribute"
value="This model illustrates an LMS (least mean square) adaptive
filter&#10;that learns the response of a fixed FIR (finite impulse
response)&#10;filter by observing the input and noisy output of the filter.">
        </property>
        <property name="_location" class="ptolemy.kernel.util.Location"
value="[15.0, 265.0]">
        </property>
    </property>

Note that LMS Adaptive uses a TextAttribute and it uses
&#10; instead of newlines (the above example text is probably wrapped).

The solution here is to filter the demos and change the older style
annotation to the newer style.


More information about the Kepler-dev mailing list