I would like to know how I can instantiate a row of this TreeTable as “Expandable Row” and also how to insert a child row inside it.
How can I fix the error: “No visible constructors for class (com.jidesoft.grid.ExpandableRow)”?
The Expandable Row can be the Row1 and the child row the Row_1.
I really hope someone can help me solve this doubt.
Thanks everyone for your attention!
ExpandableRow is an interface, not a class. It sounds like the implementation uses a private class named the same thing under the covers, but you need to implement the interface to use it.
Thanks for the answer!
Can you tell me how can I implement an interface?
Implementing an interface means “create a class that inherits the interface and defines each method the interface requires”. That would start something like this:
from com.jidesoft.grid import ExpandableRow class MyExpRow(ExpandableRow): def __init__(self, some, parameters): self.some = some self.parameters = parameters def notifyCellUpdated(self, child, columnIndex): # do something # ..... other methods in interface, all forty of them .....
An interface doesn’t provide code, just method signatures that the user is expected to implement. And no constructor, so whatever you require for your functionality is entirely up to you. ExpandableRow has quite a few methods.
Fortunately, JideSoft includes a nearly-complete abstract implementation, DefaultExpandableRow, that you would finish. Eclipse tells me that getValueAt() is the only method you’d have to implement yourself. Something like this:
from com.jidesoft.grid import DefaultExpandableRow class MyExpRow(DefaultExpandableRow): def __init__(self, some, parameters): self.some = some self.parameters = parameters def getValueAt(self, columnIndex): # do something # ..... override other methods, as needed for your functionality .....
This abstract class has a do-nothing default (no-args) constructor, so it’ll be called implicitly. So constructor parameters are totally up to you. To be useful, you’ll almost certainly have to override multiple methods.
Note that jython doesn’t allow multiple implementations of methods with the same name. When you run into that in a java class or interface, you must implement that method to accept variant arguments, and examine the number and types at runtime to determine what functionality to execute.
Other things to consider - if you’re going so far as to make your own frames and the like in Jython, you’re really probably better off making a custom module and writing Java code directly.
I’ll try to implement “DefaultExpandableRow” as an SDK module, even if I have to actually understand the procedure to make one!
Thank you very much for taking the time to answer me.
Can I make an SDK module written entirely in Java? Is there a step by step guide to make an SDK module?
Thanks for the great tips and help!
You can technically make an SDK module in any JVM language (which includes Jython, as well as Kotlin, Scala, etc) but Java is by far the best supported by our tooling.
No, but there are some examples publicly available here: https://github.com/inductiveautomation/ignition-sdk-examples and there’s some (potentially outdated) information on using a feature of Maven called archetypes here: https://docs.inductiveautomation.com/display/SE/Creating+a+Module
I’m trying to remake an example; I have to convert the folder containing build, client, common, designer etc … to a .modl file …I don’t understand how to do this!
Thank you so much!
Ignition’s maven plug-in assembles the module for you from the built jars and specified dependencies. Another tool signs the module files with your dev certificate (self-signed perhaps, but public software signing certs are best). You must build the project with maven. The pom.xml files in the project and subprojects control maven’s build operations.
I found Ignition’s maven plug-in; I built the project with Maven but I still haven’t understood how to compile it and import it on Ignition …
Consider starting a new topic in the Module Development category. Provide details of your setup there, including the IDE you are using. I, personally, do not use maven. I use the legacy Ant-based build, with many customizations for my peculiar requirements and preferences. And I use Eclipse. Most developers apparently use NetBeans. /:
I have implemented this interface, now I have to understand how to configure MyExpRow as a row of a table, and how to insert data into MyExpRow. Then I will instantiate a TreeTable and inside it the rows must be of the DefaultExpandableRow type … something like that …