Dear All,
there is a JAPI 2.0 in place.
" was completly rebuild with JAVA7 on top of swing. Our aim was to be 100% compatible with Version 1. This goal was not completely reached, but the changes are minor."
Yes, it would be indeed very nice if COBJAPI would support both versions (version 1 - AWT based with support for old JDK versions, and version 2 - SWING based with support for JDK 1.7+).
The COBOL part likely can stay 100% identical while the C and JAVA part needs to be separated.
@László - Do you give this a try?
Simon
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I tried to create the following structure in SVN, but I have not got authorization for it:
cobjapi/AWT
cobjapi/SWING
So I would like to separate the old AWT and the new SWING, because there were some changes in COBOL part and in example.
Also first rename cobjapi to cobjapi_old, then create the new structure (cobjapi/AWT, cobjapi/SWING), and copy cobjapi_old in cobjapi/AWT. At the end delete cobjapi_old.
After it I will upload the new SWING part.
Thx,
László
Last edit: László Erdős 2018-03-11
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You should have all the necessary rights László and more likely got an error because of not yet stable svn @ SF (the reasons to migrate are summing up...).
Nonetheless I'd like to do this change for you to make sure we keep all svn history.
Just some questions:
Do you really need the complete content of tools/cobjapi directory to be moved to tools/cobjapi/AWT?
I hoped for at least the readme.txt + examples + COPYING + src_cobol to stay there (maybe updated and maybe with a message within the UDF to be only available with the SWING interface) - do you think we can work to achieve this? Where are the differences?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think it would be much better to have a clear split between AWT and SWING than they mix. Then you always have to specify for everything whether it is for AWT or SWING or both. And when compiling you have to be careful, or if you install everything or set the environment variable, etc.
I hope that we will develop new controls in SWING. It still lacks important controls, and these can not be done in AWT. Therefore, the separation would be better. In AWT branch, we will not make any change, it works and well tested.
It happens regularly that someone reports an error or needs help. Then it will take much more time to figure out why it does not work, when we mix AWT and SWING.
László
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
check which files are in SWIG/* that you don't need there any more (note: I've copied all old files there allowing complete comparisions), do svn delete on them
copy the files you've already changed to SWIG/*
run svn status to check which files are new, do svn add on them
adjust readme.txt to be a general readme, describing what COBJAPI does and how to choose between the AWT or SWIG based version
adjust SWIG/readme.txt if not done already
do some tests
svn commit as something like "first SWIG-based version"
I hope you're fine with my commit and can work on this project again.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
For better distiguishing we'd need to rename the UDFs - but it is actually quite nice to keep the names as this allows for a drop-in replacement (just recompile with the new version) without source changes needed...
But I'll leave this to you.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I spent yesterday installing and playing with JAPI2 SWING (r618). Many, many, thanks - it's so much better than the old JAPI, particularly the fonts.
However, when I first installed it I admit that I was very disappointed. Some of the examples crashed, and some were obviously doing things that weren't logical such as using a screen position as an illegal control id. At this point, I did what I always do in these sort of situations - I did a backup, shut down the system, and sat on the deck watching the snow melt.
On returning to my office I powered on the system and, hoping that somehow everything was now fixed, tried running some simple examples. This time nothing worked. They all complained about the JAPI jar not existing, which was certainly not true because I could see it in the "src_java" directory.
Not wanting to admit defeat, I called on my superior powers of deduction and went back onto the deck to watch some more snow melt. After a while, everything made sense. Before installing JAPI2 I had been using some COBJAPI programs, so the old JAPI jar was still running - hence the strange behaviour of the JAPI2 examples. But after rebooting, nothing worked because COBJAPI_JAPIJAR_HOME was pointing to a directory that no longer existed.
So I changed "export COBJAPI_JAPIJAR_HOME=/home/rod/cobjapi/src_java"
to "export COBJAPI_JAPIJAR_HOME=/home/rod/cobjapi/SWING/src_java", and everything now works as it should.
Again, many thanks for the new COBJAPI.
Rod
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I added a new component "Japi2FormattedTextField" to COBJAPI. With this component it is possible to use masked input fields, similar to COBOL.
The following table shows the characters that you can use in the formatting mask. (Java style.)
Char: Description:
- # - Any valid number.
- ' - (single quote) Escape character, used to escape any of the special formatting characters.
- U - Any character. All lowercase letters are mapped to uppercase.
- L - Any character. All uppercase letters are mapped to lowercase.
- A - Any character or number.
- ? - Any character.
- * - Anything.
- H - Any hex character (0-9, a-f or A-F).
Example program: tools\cobjapi\SWING\examples_simple\formattedtextfield.cob
Dear All,
there is a JAPI 2.0 in place.
" was completly rebuild with JAVA7 on top of swing. Our aim was to be 100% compatible with Version 1. This goal was not completely reached, but the changes are minor."
link:
https://userpages.uni-koblenz.de/~evol/japi/japi2/japi.html
KR
Axel
Yes, it would be indeed very nice if COBJAPI would support both versions (version 1 - AWT based with support for old JDK versions, and version 2 - SWING based with support for JDK 1.7+).
The COBOL part likely can stay 100% identical while the C and JAVA part needs to be separated.
@László - Do you give this a try?
Simon
Hi,
thank you for this very good news! With swing there are many new possibilities. Most important is the masked edit field.
@Simon: I will try it soon.
László
László
Would the improved COBJAPI include a Treeview control and the ability to name specific fonts?
Rod
Hi Rod,
only JSplitPane is new. Somebody have to write Treeview and others...
László
Thanks László
For now, I'm experimenting with Button and List controls to see if I can create a passable Treeview.
Rod
Hi,
I tried to create the following structure in SVN, but I have not got authorization for it:
cobjapi/AWT
cobjapi/SWING
So I would like to separate the old AWT and the new SWING, because there were some changes in COBOL part and in example.
Also first rename cobjapi to cobjapi_old, then create the new structure (cobjapi/AWT, cobjapi/SWING), and copy cobjapi_old in cobjapi/AWT. At the end delete cobjapi_old.
After it I will upload the new SWING part.
Thx,
László
Last edit: László Erdős 2018-03-11
Not fixing your problem, yet, László, as I trust Simon with the SVN keys, and single point of control there avoids unintended timing of work grief.
This is just a rah rah siss boom bah post. Sounds like we get an improved COBJAPI and that is awesome. Looking forward to updating the FAQ.
Have good, make coffee,
Blue
Last edit: Brian Tiffin 2018-04-28
You should have all the necessary rights László and more likely got an error because of not yet stable svn @ SF (the reasons to migrate are summing up...).
Nonetheless I'd like to do this change for you to make sure we keep all svn history.
Just some questions:
Do you really need the complete content of tools/cobjapi directory to be moved to tools/cobjapi/AWT?
I hoped for at least the readme.txt + examples + COPYING + src_cobol to stay there (maybe updated and maybe with a message within the UDF to be only available with the SWING interface) - do you think we can work to achieve this? Where are the differences?
Hi Simon,
I think it would be much better to have a clear split between AWT and SWING than they mix. Then you always have to specify for everything whether it is for AWT or SWING or both. And when compiling you have to be careful, or if you install everything or set the environment variable, etc.
I hope that we will develop new controls in SWING. It still lacks important controls, and these can not be done in AWT. Therefore, the separation would be better. In AWT branch, we will not make any change, it works and well tested.
It happens regularly that someone reports an error or needs help. Then it will take much more time to figure out why it does not work, when we mix AWT and SWING.
László
I've done the necessary structural changes.
Please do:
SWIG/*
that you don't need there any more (note: I've copied all old files there allowing complete comparisions), dosvn delete
on themSWIG/*
svn status
to check which files are new, dosvn add
on themSWIG/readme.txt
if not done alreadysvn commit
as something like "first SWIG-based version"I hope you're fine with my commit and can work on this project again.
For better distiguishing we'd need to rename the
UDF
s - but it is actually quite nice to keep the names as this allows for a drop-in replacement (just recompile with the new version) without source changes needed...But I'll leave this to you.
Hi Simon,
please rename SWIG to SWING.
Thx,
László
... of course. Fixed.
Side note: do you mind if I upload a changed version of rainbow.jpg in imgscale (removed the date and did a little cut)
It's okay. I only took a picture quickly, if you have a better one, then please change it.
Done with [contrib:r607]
I'm ready with cobjapi upload in SVN.
László
Hi László
I spent yesterday installing and playing with JAPI2 SWING (r618). Many, many, thanks - it's so much better than the old JAPI, particularly the fonts.
However, when I first installed it I admit that I was very disappointed. Some of the examples crashed, and some were obviously doing things that weren't logical such as using a screen position as an illegal control id. At this point, I did what I always do in these sort of situations - I did a backup, shut down the system, and sat on the deck watching the snow melt.
On returning to my office I powered on the system and, hoping that somehow everything was now fixed, tried running some simple examples. This time nothing worked. They all complained about the JAPI jar not existing, which was certainly not true because I could see it in the "src_java" directory.
Not wanting to admit defeat, I called on my superior powers of deduction and went back onto the deck to watch some more snow melt. After a while, everything made sense. Before installing JAPI2 I had been using some COBJAPI programs, so the old JAPI jar was still running - hence the strange behaviour of the JAPI2 examples. But after rebooting, nothing worked because COBJAPI_JAPIJAR_HOME was pointing to a directory that no longer existed.
So I changed "export COBJAPI_JAPIJAR_HOME=/home/rod/cobjapi/src_java"
to "export COBJAPI_JAPIJAR_HOME=/home/rod/cobjapi/SWING/src_java", and everything now works as it should.
Again, many thanks for the new COBJAPI.
Rod
Hi,
I added a new component "Japi2FormattedTextField" to COBJAPI. With this component it is possible to use masked input fields, similar to COBOL.
The following table shows the characters that you can use in the formatting mask. (Java style.)
Char: Description:
- # - Any valid number.
- ' - (single quote) Escape character, used to escape any of the special formatting characters.
- U - Any character. All lowercase letters are mapped to uppercase.
- L - Any character. All uppercase letters are mapped to lowercase.
- A - Any character or number.
- ? - Any character.
- * - Anything.
- H - Any hex character (0-9, a-f or A-F).
Example program: tools\cobjapi\SWING\examples_simple\formattedtextfield.cob
Br.
László
Last edit: László Erdős 2020-05-10
This is great, Thanks László.
Hi,
I added a new component "Japi2TabbedPane" to COBJAPI.
Example program: tools\cobjapi\SWING\examples_simple\tabbedpane.cob
Br.
László
Last edit: László Erdős 2020-05-21
Fantastic László, I was looking forward to this :) Thank you.
Hi,
I added a new function for TabbedPane: J-ADDTABWITHICON.
With this you can create tabs with icons.
I changed the example program: tools\cobjapi\SWING\examples_simple\tabbedpane.cob
Br.
László
Last edit: László Erdős 2020-05-30
Thank you László for those two objects. I can now build an application like I wanted to using tabbedpanes. The bonus was the formatted text field.
Again thanks,
Trolley78
Hi,
I added a new component "Japi2Tree" to COBJAPI.
Example programs: tools/cobjapi/SWING/examples/tree/
The tree example shows you the usage of the following tree-relevant functions.
Create tree structure:
- J-NODE, J-ADDNODE, J-TREE
Enable or disable double-click actions on tree. The default is single-click.
- J-ENABLEDOUBLECLICK, J-DISABLEDOUBLECLICK
Color settings functions:
- J-SETTREETEXTSELNAMEDCOLOR
- J-SETTREEBGSELNAMEDCOLOR
- J-SETTREEBORDERSELNAMEDCOLOR
- J-SETTREETEXTNONSELNAMEDCOLOR
- J-SETTREEBGNONSELNAMEDCOLOR
- J-SETTREETEXTSELCOLOR
- J-SETTREEBGSELCOLOR
- J-SETTREEBORDERSELCOLOR
- J-SETTREETEXTNONSELCOLOR
- J-SETTREEBGNONSELCOLOR
The example also shows how you can build a tree structure from a simple COBOL
internal table and find the selected node in the table.
TODO:
The following functions are not yet implemented:
- expand / collapse tree
- get path for the selected node
- add / delete nodes dynamically
Br.
László