Yes, you can put arbitrary "foreign" XML in an object that implements ptolemy.kernel.util.Configurable. For example, the ptolemy.actor.lib.gui.PlotterBase class, which is the base class for all the plotters, implements this interface. If you change the look of a plot, then the MoML file gets populated with PlotML code to specify the look of the plot. For example:
<entity name="SequencePlotter" class="ptolemy.actor.lib.gui.SequencePlotter">
<property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={258, 206, 508, 355}, maximized=false}">
</property>
<property name="_plotSize" class="ptolemy.actor.gui.SizeAttribute" value="[500, 300]">
</property>
<property name="_location" class="ptolemy.kernel.util.Location" value="{190, 100}">
</property>
<configure>
<?plotml <!DOCTYPE plot PUBLIC "-//UC Berkeley//DTD PlotML 1//EN"
"http://ptolemy.eecs.berkeley.edu/xml/dtd/PlotML_1.dtd">
<plot>
<title>SequencePlotter</title>
<xLabel></xLabel>
<yLabel></yLabel>
<xRange min="0.0" max="9.0"/>
<yRange min="0.0" max="9.0"/>
<default connected="no" marks="dots" stems="yes"/>
</plot>?>
</configure>
</entity
Hope this helps...
Edward
At 01:39 PM 3/29/2005 -0800, Chad Berkley wrote:
Hi,
I would like to extend a moml property with more xml structure. I would like to have a construct that looks like
<property name="x" class="package.class">
<some_structure>
...
</some_structure>
</property>
Currently, I can only see an API for getting the 'value' attribute from the parser. Is there an easy way to extend property so that I could parse structure within it?
thanks, chad
---------------------------------------------------------------------------- Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: [EMAIL PROTECTED]
------------
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
[EMAIL PROTECTED], http://ptolemy.eecs.berkeley.edu/~eal
---------------------------------------------------------------------------- Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: [EMAIL PROTECTED]