Project

General

Profile

Actions

Bug #2324

open

SVG - old-style icon still displayed for certain actors

Added by Matthew Brooke over 18 years ago. Updated about 15 years ago.

Status:
In Progress
Priority:
Normal
Category:
interface
Target version:
Start date:
12/16/2005
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
2324

Description

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?


Related issues

Blocked by Kepler - Bug #2245: TRACKING: Batik SVG Rendering - remaining tasksIn ProgressMatthew Brooke11/04/2005

Actions
Blocks Kepler - Bug #2345: Actor Library classname/icon mapping problemsResolvedChad Berkley01/26/2006

Actions
Actions

Also available in: Atom PDF