Greetings. In our integration, we want to change a bit the behaviour of the "Save markup" dialog. Essentially, we want to have a text field for a description (beyond the single line that is offered), and add a calendar dialog to select a deadline instead of typing a string of text with the date.
I have been investigating how to do it, and I want to confirm the procedure, since it seems a bit overwhelming. No direct modification option seems to exist.
(1) Create a custom action that gets the properties from the dialog and saves them. The custom action would be placed in the GUI, and replace the save markup fields.
This is a bit more complex, since the Save Markup action is integrated in a greater action, and uses several modifiers. I assume we would have to pick up only those cases, and manage them all.
(2) Follow the example set in the API Programmer's Guide to create that custom action (in this case, three: save new, save as, save overwrite).
(3) Replace in the .gui file the original action for my custom one.
My concern here is that the save markup action, as far as I have seen, is deeply rooted within AutoVue, and will probably perform a lot of checks and sets in many places that I can't foresee without the sources. So, trying to duplicate its functionality blindly seems, as I said before, overwhelming.
What I would really need is a way to add a new kind of GUIElement, like GUIElementCombo is, which would fill up my needs and still be able to get the needed properties. But GUIElements appear to be just property containers, with no apparent GUI drawing information, and again that drawing information seems deeply rooted in the code.
Does anyone know of a better way to perform the modifications we need?
The standard way for this would be defining GUI elements in markup property response.
However we only support 3 types of elements: combo, editable text and static text.
The description field should be straight forward to define with one of the text fields depending if you want it editable or not.
As for the date field, you could implement it let's say with 3 combos, but your interface would look dated and not user friendly.
One of the questions here: do you really need deadline field in your markup save dialog?
Maybe it should be done through different mechanism, let's say one of the markup entities would define it.
Did you have a look at intellistamp entity, maybe it suits your needs better...
And you can define a date filed in intellistamp definition - it is implemented with date chooser.
If you choose to implement your own markup save dialog it's going to be a much more involved task...
Unfortunately, I can't workaround the calendar. The final application is going to an ensemble which will use markup files as a way of communicating engineering ideas, and the deadlines on them will be very important. Also, all our system has a very strong UI design, and typing the date is not an option for us. I didn't consider the intellistamp definition. I will give it a look, although I already began developing the solution in another fashion, with some advances and some issues.
The approach I have finally begun to implement is the creation of a custom action, and then replace the default one in a custom.gui file. Essentially, I took the WindowBuilder plugin in eclipse to build my own dialog, and from a custom action I have it popping up in Autovue. Since it's a generic java dialog, I can pretty much do anything inside it, and its look & feel is the same as the applet's one. The basic things, I already have: when I implemented the CMS integration I developed methods to store in the database a markup file after its ID, and also its properties. I can pass the dialog the active markup in the frame, so this means I am already able to save and overwrite a markup.
I am worried about the listeners of the custom action, since this method bypasses the session and other things in the SaveAction from the ISDK. But that concern will come later, once I am done with the basic things.
PD. As a suggestion for future versions, I'd create some class with GUIFactory controls to extend to generate custom dialog items to prevent these workarounds.
Edited by: Jordi Bosch on Mar 29, 2012 12:28 AM
Just for the note. By using this last method, I managed to generate the custom dialog with a calendar successfully. Tedious and long, yes, but now the dialog does what we want the way we want, while preserving the rest of autovue in the same way.