From: [EMAIL PROTECTED] (Manish_Kushwaha) Subject: how to set icon locations Date: 14 Jan 2004 13:25:30 -0800

Hi there,

I am using ptolemy II for my application. I have a small question.

I want to place the entity icons at specified locations. I have a file
having a list of what icon will go where. Can someone tell me how do
we read those file entries and set _location property in the XML file.
Is this the correct way to set location or there is another approach.

Thank you,
Manish Kushwaha

The MoML representation of location is, by default:


<property name="_location" class="ptolemy.kernel.util.Location" value="205.0, 155.0">
</property>


If you simply set the X and Y value as shown, this will work.
You could use an XSL script, for example.

You can also set the position of an icon within a Ptolemy model.
There is an example at:

$PTII/ptolemy/actor/parameters/demo/Bouncer/

It uses a parameter of class

ptolemy.actor.parameters.LocationParameter

whic can have a value that is an expression that depends on other
parameters in the model. In that example, the location is changed
dynamically.

Edward



------------
Edward A. Lee, Professor
518 Cory Hall, UC Berkeley, Berkeley, CA 94720
phone: 510-642-0455, fax: 510-642-2739
[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]

Reply via email to