[kepler-dev] Actor Parameter question
Chad Berkley
berkley at nceas.ucsb.edu
Mon Oct 15 13:07:59 PDT 2007
Hi Eric,
If I understand you right, you just want to change the editor in the
configuration window, right? If so, you'll want to extend
ptolemy.actor.gui.style.ParameterEditorStyle. Once you have a new style
of editor widget, you can then set the "style" attribute on any moml
parameter to use your new editor. If you want an example, search the
actor library for any actor that uses one of the styles in
ptolemy.actor.gui.style. For instance, there are several that use the
FileChooser style to allow a user to select a file path into a
StringAttribute. Instead of creating your own style, one of the
existing styles may work for what you want (possibly ChoiceStyle?).
If that's confusing, login to IRC and I can explain further.
chad
Eric Magaha wrote:
> Hi,
>
> I would like to create a Parameter on one of my custom actor that is
> similar to ColorAttribute (ptolemy.actor.gui.ColorAttribute). But I
> want to be able to pick string items from a list in the dialog box that
> will be shown.
>
> I looked at ColorAttribute class and I have no idea how Query class
> (ptolemy.gui.Query) gets called. ColorAttribute class is pretty simple.
>
> To sum up, I want a parameter that holds an ArrayType that can open a
> dialog box where I can select string from a swing list object.
>
> Is that possible?
>
> Thanks,
>
> Eric
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Kepler-dev mailing list
> Kepler-dev at ecoinformatics.org
> http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-dev
More information about the Kepler-dev
mailing list