Jython java swing and everything

What exactly do you need help with?

Maybe more context will help:

  • AWT was the original Java GUI toolkit, but had several limitations
  • Swing was eventually developed as the successor to AWT, and has more functionality
  • Even with swing classes, people often need more functionality for their specific use cases. So companies develop their own solutions, often extending off of swing components
  • JIDE Software is one company that offers these easier-to-use, more tailored Swing solutions
  • Inductive Automation uses many JIDE packages within Ignition: ranging from the designer itself to individual components like the Power Table. Under the hood it's still mostly Swing
  • SCADA integrators using Ignition need simpler/faster ways to code small solution to things than compiling Java classes and libraries, or worse: learning some other domain-specific language. IE they need a scripting solution, not a full-blown programming one
  • Python is a popular and relatively simple language, and Jython is the Java implementation of it. You don't need to know all the details to use Jython, just know that your python code in Ignition can interoperate with the Java components.

So what you need to know depends on what you're trying to do. If you're trying to write an Ignition module, you'll need more Java/Swing (classes, interfaces, maven, etc...) knowledge. If you're trying to script a solution within the Ignition Designer, you'll benefit from more python knowledge (list comprehensions, lambda functions, standard libraries, etc...). Since you can instantiate and extend Java classes from Swing/JIDE/Ignition within your Jython scripts, it often helps to look at the Ignition API and to do some runtime investigation of your own to find out what exactly you're dealing with. @pturmel authored a great tool for runtime introspection that I use frequently, you can find it here:

You might find that entire thread helpful.
I hope this was relevant to what you're asking and I didn't just muddy the waters!

6 Likes