<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    In Ptolemy, when you drag a MonitorValue into the actor graph pane,
    the MoML includes an _icon property<br>
    <br>
    ptolemy/actor/lib/genericsinks.xml contains:<br>
    <blockquote type="cite"><entity name="MonitorValue"
      class="ptolemy.actor.lib.gui.MonitorValue"><br>
      <doc>Monitor and display values</doc><br>
         <property name="displayWidth"
      class="ptolemy.data.expr.Parameter" value="20"/><br>
         <property name="_icon"
      class="ptolemy.vergil.icon.UpdatedValueIcon"><br>
            <property name="attributeName" value="value"/><br>
            <property name="displayWidth" value="displayWidth"/><br>
         </property><br>
      </entity></blockquote>
    <br>
    genericsources.xml has something similar for Const.<br>
    <br>
    <br>
    _Christopher<br>
    <br>
    <div class="moz-cite-prefix">On 8/14/12 11:25 AM, Sean Riddle wrote:<br>
    </div>
    <blockquote
cite="mid:CAAjdow=Q9W1sJpv-uPMd1V_3tu4Vso1nTAK4EiyqEsC42W992A@mail.gmail.com"
      type="cite">I'm still a little puzzled as to the nature of the
      bypass that Constant and MonitorValue apparently use. If anyone
      has any more details, I would love your input. Neither actor
      appears to explicitly create an "_icon" attribute, which would
      customize the icon. There are no obvious suspects in the Java
      classes, nor in the XML declarations for the classes.
      <div>
        <br>
      </div>
      <div>- Sean<br>
        <br>
        <div class="gmail_quote">On Mon, Aug 13, 2012 at 4:39 PM, Matt
          Jones <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:jones@nceas.ucsb.edu" target="_blank">jones@nceas.ucsb.edu</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">Kepler has
            a default icon that it uses if a valid mapping can't be
            found, so that is its fallback.  There is already a config
            setting that allows you to let the ptolemy behavior through
            for particular actors.  That was added to accomodate the
            dynamic actors like Monitor and Constant to allow them to
            show their values.  So, you should be able to configure
            others to allow that too without any new code. Look at
            Monitor to see how it is configured for an example.<span><font
                color="#888888">
                <div>
                  <br>
                </div>
              </font></span>
            <div><span><font color="#888888">Matt</font></span>
              <div>
                <div><br>
                  <br>
                  <div class="gmail_quote">On Mon, Aug 13, 2012 at 2:19
                    PM, Sean Riddle <span dir="ltr"><<a
                        moz-do-not-send="true"
                        href="mailto:swriddle@gmail.com" target="_blank">swriddle@gmail.com</a>></span>
                    wrote:<br>
                    <blockquote class="gmail_quote" style="margin:0 0 0
                      .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      Well, the problematic attributes are the ones that
                      Kepler displays appreciably differently than
                      Ptolemy, especially if it is to the detriment of
                      the usability of the actor. If you meant how will
                      I actually find them in the codebase, I'm not
                      particularly sure; I was planning on just
                      classifying them as the problems are noticed.
                      <div>
                        <br>
                      </div>
                      <div>If a mapping for an icon is not found in the
                        configuration, what does the system do? Does it
                        fall back to the Ptolemy system? If not, how
                        would people feel about me adding a sentinel
                        value that can be used in the configuration
                        files to specify that the Ptolemy icon
                        generation system should be used instead?</div>
                      <span><font color="#888888">
                          <div><br>
                          </div>
                        </font></span>
                      <div><span><font color="#888888">- Sean</font></span>
                        <div>
                          <div><br>
                            <br>
                            <div class="gmail_quote">On Mon, Aug 13,
                              2012 at 2:54 PM, Daniel Crawl <span
                                dir="ltr"><<a moz-do-not-send="true"
                                  href="mailto:danielcrawl@gmail.com"
                                  target="_blank">danielcrawl@gmail.com</a>></span>
                              wrote:<br>
                              <blockquote class="gmail_quote"
                                style="margin:0 0 0 .8ex;border-left:1px
                                #ccc solid;padding-left:1ex"><br>
                                Hi Sean,<br>
                                <br>
                                Icons are set in
                                ComponentEntity.addSVGIconTo() based on
                                the LSID, class, or semantic type. This
                                uses the configuration files<br>
                                uiSVGIconMappingsByLSID.xml,
                                uiSVGIconMappingsByClass.xml, and<br>
                                uiSVGIconMappingsBySemanticType.xml to
                                determine the icon.<br>
                                <br>
                                How would you identify problematic
                                attributes? Maybe only attributes<br>
                                that are Parameters should have their
                                icons changed?<br>
                                <br>
                                  --dan
                                <div>
                                  <div><br>
                                    <br>
                                    <br>
                                    On 8/13/12 2:37 PM, Sean Riddle
                                    wrote:<br>
                                  </div>
                                </div>
                                <blockquote class="gmail_quote"
                                  style="margin:0 0 0
                                  .8ex;border-left:1px #ccc
                                  solid;padding-left:1ex">
                                  <div>
                                    <div>
                                      Hi all,<br>
                                      <br>
                                      I'm taking a look at bug 4903,
                                      which is Kepler displaying certain
                                      icons<br>
                                      incorrectly. It appears that the
                                      problem comes down to Ptolemy
                                      using the<br>
                                      normal, standard method of icon
                                      determination, and Kepler using a
                                      custom<br>
                                      method that sometimes gives
                                      erroneous results - this is
                                      implemented in<br>
                                      org.kepler.gui.KeplerXMLIcon in
                                      the gui module. Manually disabling
                                      the<br>
                                      custom icon rendering class allows
                                      me to instantiate<br>
                                      MonitorReceiverContents and get
                                      the expected icon as in Ptolemy.<br>
                                      <br>
                                      I'm a little unsure about how to
                                      implement a fix to this. Is there
                                      a<br>
                                      way, as with the _alternateGetMoml
                                      attribute, to set the custom icon<br>
                                      rendering on a per-class/LSID
                                      basis? If so, disabling it for
                                      problematic<br>
                                      attributes would be a simple fix.
                                      On the other hand, if there's no
                                      way<br>
                                      to customize the behavior for
                                      certain actors, I could still
                                      modify<br>
                                      KeplerXMLIcon such that it
                                      performs like the XmlIcon Ptolemy
                                      class for<br>
                                      any problematic attributes. I'm
                                      going to poke around assessing the<br>
                                      viability of the latter approach,
                                      but if anyone knows this part of
                                      the<br>
                                      code better, feel free to suggest
                                      something different.<br>
                                      <br>
                                      Thanks,<br>
                                      <br>
                                      Sean<br>
                                      <br>
                                      <br>
                                    </div>
                                  </div>
                                  _______________________________________________<br>
                                  Kepler-dev mailing list<br>
                                  <a moz-do-not-send="true"
                                    href="mailto:Kepler-dev@kepler-project.org"
                                    target="_blank">Kepler-dev@kepler-project.org</a><br>
                                  <a moz-do-not-send="true"
                                    href="http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-dev"
                                    target="_blank">http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-dev</a><br>
                                  <br>
                                </blockquote>
                                <br>
                              </blockquote>
                            </div>
                            <br>
                          </div>
                        </div>
                      </div>
                      <br>
                      _______________________________________________<br>
                      Kepler-dev mailing list<br>
                      <a moz-do-not-send="true"
                        href="mailto:Kepler-dev@kepler-project.org"
                        target="_blank">Kepler-dev@kepler-project.org</a><br>
                      <a moz-do-not-send="true"
                        href="http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-dev"
                        target="_blank">http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-dev</a><br>
                      <br>
                    </blockquote>
                  </div>
                  <br>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Kepler-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Kepler-dev@kepler-project.org">Kepler-dev@kepler-project.org</a>
<a class="moz-txt-link-freetext" href="http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-dev">http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-dev</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Christopher Brooks, PMP                       University of California
CHESS Executive Director                      US Mail: 337 Cory Hall
Programmer/Analyst CHESS/Ptolemy/Trust        Berkeley, CA 94720-1774
ph: 510.643.9841                                (Office: 545Q Cory)
home: (F-Tu) 707.665.0131 cell: 707.332.0670 </pre>
  </body>
</html>