Double focus in Writer?
Posted: Mon Jul 22, 2013 3:29 pm
Hello there,
we`ve got a project-management-software written in Java which embedds the OOoBean.
We have embedded the OOoBean into the top Panel of a JInternalFrame.
The top panels is called the writerPanel and contains only the OOoBean.
The bottom panel is called the optionsPanel and holds all custom controlls.
We encounter two major problems at the moment:
1. Double – Cursor/Focus – Bug
At the moment there are two cursors displaying when clicking inside the OOoBean:
The document has one focus and the currently active java component also has a focus.
The problem now is when you want to write something into a JTextfield in the lower optionsPanel while the document has focus, the entered text will be appended into the document and not the JTextfield (although it has a selection and blinking cursor). The OOoBean won`t lose its focus, no matter what.
As a workaround i added a ChangeListener to all input components inside the optionsPanel which performs a OOoBean.releaseSystemWindow() followed by a OOoBean.aquireSystemWindow(). But even this does not guarantee the focus in the optionsPanel will be the „active“ one.
I also tried MouseListeners on the optionsPanel to make use of the mouseEnter-Events but unfortunately the the event is fired way too often and the mouseLeave-Event on the writerPanel which contains the OOoBean does not always fire/get these events…
Any suggestions how to fix this?
2. Timeout – OpenOffice
From time to time (especially if you want to copy & paste something from an application outside the embedded OOoBean into the document) the connection to the OpenOffice is lost. I know there are three timeouts which are set to
OOoBean.setOOoStartTimeout(180000) //Default: 60000
OOoBean.setOOoCallTimeout(30000) //Default: 10000
OOoBean.setOOoCheckcycle(300) //Default: 100
in our application but altering them does not really seem to help in any way.
Any suggestions how to fix this?
Additional informations on the future of the project are also welcome:
1. Roadmap OOoBean
What is the upcoming roadmap for the OOoBean? Will there be future development or is it going to be abandoned? When will the next version be released? Do you guys think i need to look for alternatives? (LibreOffice, NOA, etc…)
2. Roadmap OpenOffice
What is the roadmap for OpenOffice? Will there be future development or is it going to be abandoned? When will the next version be released? (i know there are some informations about OpenOffice 4.0 but i couldn`t find any release date announcements)
I attached a simple file which shows at least the first problem. (You need a working OOoBean-Integration for it to work)
The second one is hard to reconstruct and only happens from time to time.
Additional informations:
Java-Version: JRE 1.7_21
OpenOffice-Version: 3.4.1
OpenOffice-Install-Path: „C:\sw\OpenOffice.org 3\“ (without the quotes; exists on each client)
OS: WinXP (32/64Bit) and Win7 (32/64Bit)
I know this informations are a bit generous so i will try to provide any further informations as needed.
With best regards,
Martin Illguth
we`ve got a project-management-software written in Java which embedds the OOoBean.
We have embedded the OOoBean into the top Panel of a JInternalFrame.
The top panels is called the writerPanel and contains only the OOoBean.
The bottom panel is called the optionsPanel and holds all custom controlls.
We encounter two major problems at the moment:
1. Double – Cursor/Focus – Bug
At the moment there are two cursors displaying when clicking inside the OOoBean:
The document has one focus and the currently active java component also has a focus.
The problem now is when you want to write something into a JTextfield in the lower optionsPanel while the document has focus, the entered text will be appended into the document and not the JTextfield (although it has a selection and blinking cursor). The OOoBean won`t lose its focus, no matter what.
As a workaround i added a ChangeListener to all input components inside the optionsPanel which performs a OOoBean.releaseSystemWindow() followed by a OOoBean.aquireSystemWindow(). But even this does not guarantee the focus in the optionsPanel will be the „active“ one.
I also tried MouseListeners on the optionsPanel to make use of the mouseEnter-Events but unfortunately the the event is fired way too often and the mouseLeave-Event on the writerPanel which contains the OOoBean does not always fire/get these events…
Any suggestions how to fix this?
2. Timeout – OpenOffice
From time to time (especially if you want to copy & paste something from an application outside the embedded OOoBean into the document) the connection to the OpenOffice is lost. I know there are three timeouts which are set to
OOoBean.setOOoStartTimeout(180000) //Default: 60000
OOoBean.setOOoCallTimeout(30000) //Default: 10000
OOoBean.setOOoCheckcycle(300) //Default: 100
in our application but altering them does not really seem to help in any way.
Any suggestions how to fix this?
Additional informations on the future of the project are also welcome:
1. Roadmap OOoBean
What is the upcoming roadmap for the OOoBean? Will there be future development or is it going to be abandoned? When will the next version be released? Do you guys think i need to look for alternatives? (LibreOffice, NOA, etc…)
2. Roadmap OpenOffice
What is the roadmap for OpenOffice? Will there be future development or is it going to be abandoned? When will the next version be released? (i know there are some informations about OpenOffice 4.0 but i couldn`t find any release date announcements)
I attached a simple file which shows at least the first problem. (You need a working OOoBean-Integration for it to work)
The second one is hard to reconstruct and only happens from time to time.
Additional informations:
Java-Version: JRE 1.7_21
OpenOffice-Version: 3.4.1
OpenOffice-Install-Path: „C:\sw\OpenOffice.org 3\“ (without the quotes; exists on each client)
OS: WinXP (32/64Bit) and Win7 (32/64Bit)
I know this informations are a bit generous so i will try to provide any further informations as needed.
With best regards,
Martin Illguth