Menu

JAPI 2.0 is avaible

2018-03-08
2022-12-10
1 2 3 > >> (Page 1 of 3)
  • Axel Moeller

    Axel Moeller - 2018-03-08

    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

     
  • Simon Sobisch

    Simon Sobisch - 2018-03-08

    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

     
  • László Erdős

    László Erdős - 2018-03-08

    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ó

     
  • Rod Gobby

    Rod Gobby - 2018-03-08

    László

    Would the improved COBJAPI include a Treeview control and the ability to name specific fonts?

    Rod

     
    • László Erdős

      László Erdős - 2018-03-11

      Hi Rod,

      only JSplitPane is new. Somebody have to write Treeview and others...

      László

       
      • Rod Gobby

        Rod Gobby - 2018-03-14

        Thanks László

        For now, I'm experimenting with Button and List controls to see if I can create a passable Treeview.

        Rod

         
  • László Erdős

    László Erdős - 2018-03-11

    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
    • Brian Tiffin

      Brian Tiffin - 2018-03-12

      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
  • Simon Sobisch

    Simon Sobisch - 2018-03-12

    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?

     
  • László Erdős

    László Erdős - 2018-03-13

    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ó

     
    • Simon Sobisch

      Simon Sobisch - 2018-03-13

      I've done the necessary structural changes.

      Please do:

      • a clean checkout
      • 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.

       
    • Simon Sobisch

      Simon Sobisch - 2018-03-13

      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.

       
  • László Erdős

    László Erdős - 2018-03-13

    Hi Simon,

    please rename SWIG to SWING.

    Thx,

    László

     
    • Simon Sobisch

      Simon Sobisch - 2018-03-13

      ... 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)

       
  • László Erdős

    László Erdős - 2018-03-13

    It's okay. I only took a picture quickly, if you have a better one, then please change it.

     
    • Simon Sobisch

      Simon Sobisch - 2018-03-13

      Done with [contrib:r607]

       
  • László Erdős

    László Erdős - 2018-03-13

    I'm ready with cobjapi upload in SVN.

    László

     
  • Rod Gobby

    Rod Gobby - 2018-04-27

    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

     
  • László Erdős

    László Erdős - 2020-05-10

    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
    • thomas

      thomas - 2020-05-11

      This is great, Thanks László.

       
  • László Erdős

    László Erdős - 2020-05-21

    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
    • thomas

      thomas - 2020-05-21

      Fantastic László, I was looking forward to this :) Thank you.

       
  • László Erdős

    László Erdős - 2020-05-30

    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
  • Rich Di Iulio

    Rich Di Iulio - 2020-06-29

    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

     
  • László Erdős

    László Erdős - 2020-10-04

    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ó

     
1 2 3 > >> (Page 1 of 3)

Log in to post a comment.