Component Event Property Methods

The method putClientProperty adds a new property to the component it’s called on. In this instance, @witman was adding a property called singleClick to the button component and setting its value to true.

So singleClick was an added custom property. putClientProperty and getClientProperty are methods available to objects that inherit from the javax.swing.JComponent class.

The javadocs will show you what methods and properties are available to all Ignition classes, but these all inherit from standard Java and Java Swing which you’ll need to view their own documentation to see more details.

You’ll need to know the object type that you’re trying to see the methods/properties for, and in Python you can use type(...)
E.g.

print type(event.source)
> <type 'com.inductiveautomation.factorypmi.application.FPMIWindow'>

Then search for the last element FPMIWindow in the javadocs

As a side note, you can actually add python function objects themselves to Ignition windows using the putClientProperty which is sometimes useful.

3 Likes