Wait Cursor -from a customized DITA (inert Image dialog)
Post here questions and problems related to oXygen frameworks/document types.
-
- Posts: 140
- Joined: Fri Feb 28, 2020 4:02 pm
Wait Cursor -from a customized DITA (inert Image dialog)
Post by vishwavaranasi »
Hello Team,
We have our own customized framework where we have customized the "Insert Image " Dialog , which will will talk to our oxygen plugin to get the image details , during this process we have implemented a wait cursor functionality as below.
and the showWaitCursor() method called inside the custom code of insert image as below
the method showWaitCursor(); being called and printing the sysouts
the first sysout printed as --------------> 1--frame0
the second sysout printed as ---------> 2---null
but this never Showing Waitcursor or busy cursor until the operation finishing.
please suggest what are we doing wrong here?
We have our own customized framework where we have customized the "Insert Image " Dialog , which will will talk to our oxygen plugin to get the image details , during this process we have implemented a wait cursor functionality as below.
and the showWaitCursor() method called inside the custom code of insert image as below
Code: Select all
JFrame oxygenFrame = (JFrame) authorAccess.getWorkspaceAccess().getParentFrame();
final InsertImageDialog dialog = new InsertImageDialog(oxygenFrame);
dialog.addURLButtonActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
try {
ourCusrsorJavaClass.showWaitCursor();
xxxxDTO xxxdto=xxxx.methodInvokingtogetImagetoInsert();
dialog.setURL(xxxdto.getImageId());
}
catch (Exception var5) {
}
finally {
ourCusrsorJavaClass.showDefaultCursor();
}
}
});
}
});
public static void showWaitCursor() {
JFrame mainFrame =(JFrame) ro.sync.exml.workspace.api.PluginWorkspaceProvider.getPluginWorkspace().getParentFrame();
System.out.println("1--"+ mainFrame .getName());
mainFrame .setCursor(Cursor.getPredefinedCursor(3));
Component[] components = mainFrame .getComponents();
Component[] allCoponents = components;
int allCoponentsLength = components.length;
for(int eachComponent = 0; eachComponent < allCoponentsLength; ++eachComponent) {
Component component = allCoponents[eachcomponentonent];
component.setEnabled(false);
System.out.println("2---"+ component.getName());
}
}
the first sysout printed as --------------> 1--frame0
the second sysout printed as ---------> 2---null
but this never Showing Waitcursor or busy cursor until the operation finishing.
please suggest what are we doing wrong here?
Thanks,
vishwa
vishwa
Re: Wait Cursor -from a customized DITA (inert Image dialog)
Hi,
How about if instead of setting the wait cursor on the Oxygen main frame, you set it directly on the dialog which is opened on top of Oxygen?
So something like "dialog .setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));"?
How about if instead of setting the wait cursor on the Oxygen main frame, you set it directly on the dialog which is opened on top of Oxygen?
So something like "dialog .setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));"?
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 140
- Joined: Fri Feb 28, 2020 4:02 pm
Re: Wait Cursor -from a customized DITA (inert Image dialog)
Post by vishwavaranasi »
Thanks Radu , thats worked for us.
Thanks,
vishwa
vishwa
Return to “SDK-API, Frameworks - Document Types”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service