Closed jbfaden closed 1 year ago
See also https://github.com/das-developers/das2java/issues/4, another one of these editors. All of these should link back to a common ticket.
I've made a dummy editor (one that is better than nothing), but there's a problem. The editors are registered by property name, and "format" is the property. This needs to be made more precise, probably linking the bean type as well as the property name.
UriTemplatesStringSchemeEditor is the new editor. Actually another editor needs to be added which supports both "%.3f" and "$Y-$m-$d $H:$M"
Check that, there's a second method which uses the object type:
PropertyEditor.addStringEditor("org.das2.graph.DasAxis","format", new UriTemplatesStringSchemeEditor() );
There's a context which should be set when the editor is entered, but isn't. I suspect that there's an issue with implementing this, but I'll need to remind myself what it is. I was hoping I could use the DasAxis context to get the units.
I set the context now to the axis. This still needs some work, in particular when multiple beans with the same property are edited.
%d and %05d don't work for formatting decimals. I think the code needs to check to see if an integer is needed.
I've corrected the tick formatter to support %d, %x, and %X.
An editor for URI_Templates is needed, or maybe a specialized editor for tick formatting. For example, DasAxis.format provides no guidance about what fields are allowed, in strings like $Y-$m-$d or for continuous data like %.2f.