[kepler-dev] [Bug 2324] New: - SVG - old-style icon still displayed for certain actors

bugzilla-daemon@ecoinformatics.org bugzilla-daemon at ecoinformatics.org
Fri Dec 16 16:33:55 PST 2005


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

           Summary: SVG - old-style icon still displayed for certain actors
           Product: Kepler
           Version: 1.0.0beta2
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: interface
        AssignedTo: brooke at nceas.ucsb.edu
        ReportedBy: brooke at nceas.ucsb.edu
         QAContact: kepler-dev at ecoinformatics.org


For certain actors, described below, the old-style icon is still displayed when
an actor is dragged to the canvas:

1) for any actors that have an icon defined in the MOML file thus:
...
<property name="_icon" class="ptolemy.vergil.icon.BoxedValueIcon">
  <property name="attributeName" class="ptolemy.kernel.util.StringAttribute"     
            value="value">
  </property>
  <property name="displayWidth" class="ptolemy.data.expr.Parameter" value="60">
  </property>
</property>
...
(this is an example - not necessarily all "BoxedValueIcon". The thing to look
for is name="_icon")

Note that "ESRI Shape File Displayer" (org.kepler.gis.display.JumpSHPDisplayer)
actually has a custom icon (_iconDescription) defined inthe java code - so I am
not sure where this other "_icon" definition is coming from.

2) actors that have an accompanying "<actorname>Icon.xml" file - like
ptolemy.domains.sdf.lib.SequenceToArray has an accompanying
SequenceToArrayIcon.xml file in ptolemy/domains/sdf/lib/, which is automatically
pulled in by the MOMLParser and added to the actor.

===================================================

Note that, in many cases, showing the old-style icon *may* still be appropriate
(for example, org.sdm.spa.StrinConst uses a box to display the user-entered
string inside. Replacing this with a big icon would probably not be a good idea.
A similar argument also applies to entries in the actor library under the
Variable->Parameter node (eg ColorParameter, FileParameter etc). 

*However*, other actors, like the "ESRI Shape File Displayer"
(org.kepler.gis.display.JumpSHPDisplayer) could (and should) have its existing
icon replaced with an appropriate new-style icon. 

So, since we can't distinguish between these 2 general cases programmatically
(without resorting to keeping a hard-coded list of actors in an "omissions"
list), how can we handle the situation?

How about a policy that allows actor developers to override the "designed" icon
 by defining this as "<property name="_icon" ..etc" in the MOML, *ONLY* if it is
absolutely necessary (eg to present a box with user text in it)? Other,
non-essential uses of  "<property name="_icon" ..etc" would then just be removed
from the MOML. If users want to define icons to show up under the old-style
rendering scheme, such icons could be defined in the MOML as an SVG
"_iconDescription". Same goeas for separate <actorname>Icon.xml files. However -
some of these exist in the PTII codebase, so we can't remove those.  

Not sure what to do. Any comments, thoughts, other solutions?


More information about the Kepler-dev mailing list