Project

General

Profile

Actions

Bug #2362

open

DataSourceIcon: use new SVG Icons dynamically, instead of drawing icon

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

Status:
In Progress
Priority:
Normal
Category:
interface
Target version:
Start date:
02/20/2006
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
2362

Description

org.ecoinformatics.seek.datasource.DataSourceIcon (used by the EML200DataSource
actor, among others) draws its own icon dynamically - changing to show error,
loading and ready conditions.

Instead, (or in addition, depending on config), it should use the SVG icons like
the other actors do - changing them out dynamically to reflect the same states

This is not critical for 1.0, since the code has already been changed to draw
the icon to match the new icon-set design; however, it will become an issue
if/when the icon designs change.

Actions #1

Updated by Matthew Brooke almost 18 years ago

could do this in org.ecoinformatics.seek.datasource.DataSourceIcon code by setting the "_svgIcon" attribute to point to the correct svg icons for the different states

(for an example of how to add this attribute, see _addIconAttributeToNamedObj() method in ptolemy.kernel.util.ComponentEntityConfig, which is currently in kepler/src/exp...)

The icon names shouldn't be hard-coded in the java class, but rather should be read from either the:
configs/ptolemy/configs/kepler/uiSVGIconMappingsByClass.properties
file, or the:
configs/ptolemy/configs/kepler/uiSettigns.properties
file

Actions #2

Updated by Matthew Brooke almost 18 years ago

Also add code to make the system assign raster thumbnail icons to these "actors", since they currently do not get the new svg or raster icons assigned, because they are not instantiated via ActorMetadata.java, where the icon-assignment code is.

Christopher says:

Perhaps the place to add code that looks up the icon would be
ecoinformatics.seek.ecogrid.quicksearch.QuickSearchAction.resultsetComplete()

We would need to iterate through resultRoot and call code like this:

IconLoader iconLoader = MoMLParser.getIconLoader();
if (iconLoader != null) {
iconLoader.loadIconForClass(
"org.ecoinformatics.seek.datasource.eml.eml2.Eml200DataSource",
this);
}

It might be smarter to just set the raster icon instead of both icons.

Once this is done, need to change the display code to actually use these raster icons in the list - see Bug #2445

Actions #3

Updated by Redmine Admin about 11 years ago

Original Bugzilla ID was 2362

Actions

Also available in: Atom PDF