[kepler-dev] More usability improvements: display names

Laura L. Downey ldowney at lternet.edu
Tue Aug 9 08:50:38 PDT 2005


Great going again Edward.  I think I filed a "bug" that highlighted the
issued of needing to be able to display meaningful names to users instead of
variable names from the code.

Laura L. Downey
Senior Usability Engineer
LTER Network Office
Department of Biology, MSC03 2020
1 University of New Mexico
Albuquerque, NM  87131-0001
505.277.3157 phone
505.277-2541 fax
ldowney at lternet.edu
 

-----Original Message-----
From: kepler-dev-bounces at ecoinformatics.org
[mailto:kepler-dev-bounces at ecoinformatics.org] On Behalf Of Edward A. Lee
Sent: Friday, August 05, 2005 9:30 AM
To: ptresearch at maury.eecs.berkeley.edu; Kepler-Dev
Subject: [kepler-dev] More usability improvements: display names


I've made some changes so that the name of a parameter
displayed in the edit parameters box need not be the same
as the name of the parameter in the Ptolemy hierarchy.

This should be used with restraint, when for some reason
a stylized name is needed, such as beginning with an underscore,
or not having spaces, and the stylized name is not attractive
or informative to a user.

I've used it for the preferences. So now, the preference
name is _linkBendRadius, but what is displayed in the
dialog is "Link bend radius".  Note that the latter would
not work as a name in the expression language because
of the spaces, and the leading underscore is used to try
to prevent collisions with user-defined parameters.

The reason that this should be used with restraint is
that it is now invisible from the UI what the actual
name of the parameter is...  If you want to use it in
an expression, you have to look it up in the code or the
documentation.

To do this, I've added a method to the Settable interface:

   getDisplayName(): String

and a method to all the relevant implementing classes:

   setDisplayName(String)

To use this, when you create a parameter, call the latter
method.  E.g., in ptolemy.vergil.VergilPreferences there is:

         Parameter _linkBendRadius = new Parameter(this, "_linkBendRadius");
         _linkBendRadius.setTypeEquals(BaseType.DOUBLE);
         _linkBendRadius.setExpression("20.0");
         _linkBendRadius.setDisplayName("Link bend radius");

Edward


------------
Edward A. Lee
Professor, Chair of the EE Division, Associate Chair of EECS
231 Cory Hall, UC Berkeley, Berkeley, CA 94720
phone: 510-642-0253 or 510-642-0455, fax: 510-642-2845
eal at eecs.Berkeley.EDU, http://ptolemy.eecs.berkeley.edu/~eal  

_______________________________________________
Kepler-dev mailing list
Kepler-dev at ecoinformatics.org
http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-dev



More information about the Kepler-dev mailing list