There is a feature that we have developed but not yet released where you run the model from the button in the toolbar rather than from the control panel. In this case, plots come up as separate windows. But if you size and place them, then save the model, the model will remember where they were, and the next time you run, it brings them up in the same places.
Edward At 06:00 PM 1/10/2003 -0800, Christopher Hylands wrote:
(Sorry if this is a repeat, majordomo is having configuration issues) Yep, this would be a good feature, but it is fairly hard to get right. We have no plans to introduce a feature like this, but it would be nice to have one. The layout managers in Java are somewhat lame and difficult to use. I miss the Tk packer. The Ptolemy II Design doc http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII2.0/ptII2.0.1/doc/design/design.pdf discusses how to pack applets, but there is not much discussion about how to create custom control panels. Chapter 4 says: All of the sink actors implement the Placeable interface. Actors that implement this interface have graphical widgets that a user of the actor may wish to place on the screen. Vergil constructs a display panel by placing such actors. More customized placement can be achieved by calling the place() method of the Placeable interface in custom Java code. Basically, ptolemy.actor.gui.ModelPane places all actors that implement the Placeable interface. ModelPane can be configured to layout the actors vertically or horizontally The ct Helicopter applet uses a custom pane to lay things out properly in an applet, but we are not using these features in a regular non-applet model, the default is vertical layout. There might be a way to specify horizontal layout by setting a top level parameter, but off the top of my head I don't know what it would be. Section 14.5 of the Ptolemy II Design doc describes the structure of the classes that visualize models. ModelFrame contains a ModelPane, so I would start looking at those classes. Looking at how the applets like ptolemy/domains/ct/demo/Helicopter work would also be helpful Using shallow code generation to generate a .java file and then modify that .java file might be of use as well, though shallow code generation has limitations. -Christopher -------- Hello, I am using the PtolenyII for internet demonstration of some simulations. However the available layouts do not make the picture nice and easy-readable if one puts sevrals graphs and displays in the design. I think that would be great if Vergil would provide something like a developper for run windows with the ability to move and resize displays used in the simulations. It could be sort of the extension of graph editor. Should we expect something like this in newer releases of PtolemyII or I just missed some features of the present version which could help me to make my custom design of the run window? Thanks for help, Michail Chavkin --------------------------------------------------------------------------- - Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: [EMAIL PROTECTED] -------- ---------------------------------------------------------------------------- Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: [EMAIL PROTECTED]
------------ 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]