[kepler-dev] subclassing actors: ptolemy.actor.lib.MonitorValue

Edward A. Lee eal at eecs.berkeley.edu
Sat Aug 16 09:35:46 PDT 2008


BTW, the reason for this design is to keep gui-dependent code separate
from core library code.  This allows, for example, filtering of gui-dependent
classes to run headless.

Edward

At 10:15 AM 8/15/2008, Christopher Brooks wrote:
>Hi Paul,
>ptolemy/actor/lib/genericsinks.xml defines the icon:
>
><entity name="MonitorValue" class="ptolemy.actor.lib.MonitorValue">
><doc>Monitor and display values</doc>
>   <property name="displayWidth" class="ptolemy.data.expr.Parameter" value="20"/>
>   <property name="_icon" class="ptolemy.vergil.icon.UpdatedValueIcon">
>      <property name="attributeName" value="value"/>
>      <property name="displayWidth" value="displayWidth"/>
>   </property>
></entity>
>
>I added a note to MonitorValue that refers to genericsinks.xml
>
>_Christopher
>
>Paul Allen wrote:
>>I'm trying to add some additional functionality to ptolemy.actor.lib.MonitorValue. I created a subclass BAPMonitorValue that does nothing but have the BAPMonitorValue(CompositeEntity container, String name) constructor calling, super(container, name). When I open Kepler and use Tools->Instantiate Component and add my actor to the work area, my actor looks completely different from the normal MonitorValue actor.
>>Here's the question: How does ptolemy.actor.lib.MonitorValue get its look and GUI functionality (i.e., showing it's current value)? It's not defined in the ptolemy.actor.lib.MonitorValue class (or super classes) as far as I can tell.
>>-Paul
>>
>>_______________________________________________
>>Kepler-dev mailing list
>>Kepler-dev at ecoinformatics.org
>>http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-dev
>
>-- 
>Christopher Brooks (cxh at eecs berkeley edu) University of California
>Chess Executive Director                      US Mail: 337 Cory Hall
>Programmer/Analyst Chess/Ptolemy/Trust        Berkeley, CA 94720-1774
>ph: 510.643.9841 fax: 510.642.2718            (office: 400A Cory)
>home: (F-Tu) 707.665.0131 (W-F) 510.655.5480
>
>_______________________________________________
>Kepler-dev mailing list
>Kepler-dev at ecoinformatics.org
>http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-dev
>

------------ 
Edward A. Lee
Robert S. Pepper Distinguished Professor
EECS Dept., 545Q Cory Hall, UC Berkeley, Berkeley, CA 94720-1770
phone: 510-643-3728, fax: 510-642-5745
eal at eecs.Berkeley.EDU, http://www.eecs.berkeley.edu/Faculty/Homepages/lee.html  




More information about the Kepler-dev mailing list