[kepler-dev] Centering and sizing of demos

Christopher Brooks cxh at eecs.berkeley.edu
Wed Dec 28 13:32:42 PST 2005


Hi Dan,
I was increasing code coverage and stumbled across
ptII/util/test/CheckSize.java which will report if models are greater
than a certain size or off centered.  As I mentioned earlier, the
reason this is an issue is because Edward and I have laptops with
small screens, so models that are larger or off center can look funny.

Anyway, I moved CheckSize.java to
ptII/ptolemy/actor/gui/CheckModelSize.java and enhanced the HTML
"about" facility so it is now possible to run the size checker on
models from the UI.

To do this, do a cvs update and rebuild for Ptolemy, start
up Kepler and then follow the "Ptolemy Introduction" link -> copyright
-> "other information about this configuration"  ->
"Check Size and Centering"

This will open up models in the configs/kepler/intro.htm file and also
open up models in the .htm files listed in intro.htm

This also give you a way to quickly open up all the demos and make
sure that the pieces are present.  I should extend this capability
so that it also brings up a graph editor for each model instead of
just opening the model in memory.

One caveat is that the page that is created has links to the models
as URLs, so if you open a model and resize it, then one is forced to
do a "Save As".

Another issue is that I think the models are being opened in the wrong
thread.  The parameter box in some models is displayed as a white box,
which is indicative of thread issues.

Ultimately, it is up to the Kepler group to decide if you want to
limit your models to 1024x768 or not.  There are plenty of reasons not
to stick with this limit.  We could extend the configuration so that
the values we check against for size were Kepler specific.

One thing I'd like to see is more of a style guide for demos.  Edward
does a pretty good job with the Ptolemy demos.  One thing he does is
makes sure that each demo has an author listed right up front.  Having
the model have annotations about possible limitations such as optional
packages or database access can be a win for the user as well.
The size and centering could also be part of the style guide.

If you want, I could make a pass through the demos and resize them to
fit my screen.

One thing I noticed is that when I open up some of the Kepler models,
the start up seems to be very slow, in part because the parsing the
MoML for the models seems to hit the network.  This is not so good for
me because I have really slow DSL, so it takes quite awhile to open
these models up.  I know that there was discussion about whether
actors that access remote databases should connect or not when the
model is opened.  The reason to connect is so that the actor has
useful parameters.  The reason to not connect is because it is slow to
connect - I'm thinking about the biologist with a satphone Internet
link browsing a model and wondering why it takes so long.  Perhaps
these actors should only connect when the user tries to edit
parameters?  I dunno.  I think this is really only a problem because
I'm opening all the models sequentially in one thread and waiting for
the parsing of each model to complete.

Anyway, this is a small issue.


_Christopher





More information about the Kepler-dev mailing list