Process current context using custom swing component

Hi, I would like to create a Swing component which receives the current element, processes it through user interactions and returns a value which needs to be inserted back. I would like to trigger this using the Author API when a particular attribute value for the element is entered. How would I go about doing this? If there is a sample available of something similar, I would love to take a look. Thanks! Nathan

Hello, Using a custom form control appears to be a good solution. From your other email I see that you've already started to investigate this approach. A CSS selector is all you would need to control when the form control is presented: elem { // Normal styles } elem[attr] { content: oxy_editor(...) } We have some form controls samples in {OxygenInstallDir}/samples/form-controls. Although their use is not conditioned by an attribute value like you need you can easily change the CSS selectors to implement this behavior (like described above). The steps required to create and use a custom form controls are: - download the authorSDK [2] - implement the custom form control by extending ro.sync.ecss.extensions.api.editor.InplaceEditorRendererAdapter. You can also take a look at ro.sync.ecss.extensions.api.editor.AbstractInplaceEditor (it offers some default implementations and some listeners management) - pack the previous implementation in a JAR - go to Oxygen and add the JAR inside the Classpath tab of the framework [1] - bind the form control in the CSS as described in [3]. [1] http://www.oxygenxml.com/doc/ug-editor/index.html#topics/document-type-class... [2] http://oxygenxml.com/download_sdk.html?file=oxygenAuthorSDK.zip [3] http://www.oxygenxml.com/doc/ug-editor/index.html#topics/implementing-custom... Best regards, Alex -- Alex Jitianu <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com On 27-Feb-14 4:07 PM, Nathan wrote:
Hi, I would like to create a Swing component which receives the current element, processes it through user interactions and returns a value which needs to be inserted back. I would like to trigger this using the Author API when a particular attribute value for the element is entered. How would I go about doing this? If there is a sample available of something similar, I would love to take a look.
Thanks! Nathan
_______________________________________________ oXygen-sdk mailing list oXygen-sdk@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-sdk
participants (2)
-
Alex Jitianu
-
Nathan