What type of Swing component? Schedule and User Mangement

What type of component/key is the title bar on the user and schedule manager? I’m using the Java UIManager to change look and feel. Is there a way to inspect what type of java swing objects are in Ignition so I know which key to alter with UIManager?

It’s not an actual component, it’s a JideTitledBorder around the table.
As for a generic answer to this question, look around the forum for a ‘recursive getComponents’ - every Swing component acts as a container of children - so you can continually walk down the tree for each complex Vision component and find the children it’s made out of.

1 Like

I’m trying to change all project check boxes to use a different icon without much success. I’m also referencing to the solution you gave me for power tables Icon won’t show in boolean column - Ignition - Inductive Automation Forum

from javax.swing import BorderFactory, ImageIcon
cbIcon = ImageIcon("Builtin/icons/16/check2.png")
if event.propertyName == 'selected':
	from javax.swing import JLabel, ImageIcon
	cbIcon = ImageIcon("Builtin/icons/16/check2.png")
	checkbox = event.source

I also tried altering the UIM key on toggle buttons but that didn’t work either

PMICheckBox (ignition 7.9.5 API) (inductiveautomation.com)

What am I missing here?

Icon must not be what I need. When I print getIcon() on a checkbox component it is None.

Checkboxes don’t use icons; they delegate to the look-and-feel for their implementation. See AbstractButton.getUI().

Swing UI is complicated and hard to theme; to some extent, this way lies madness (also, a whole lot of your work will be rendered moot whenever you upgrade to 8.X; the new LaF has its own set of supported UI manager keys and features)


Thanks, yeah I remember mention of v8 LaF support. I haven’t spent a lot of time on this, and the checkboxes are the last thing I need to tide me over until I can upgrade :slight_smile:

Looks like I figured out what I needed without venturing into the CheckBoxUI for now. The method of using IconPath, setClientProperty() and getClientProperty() works for power tables, but the background color with JLabel is always white. To get around this I changed the columns to not booleans and editable to off . Then setup the onMousePress() extension to update the underlying dataset when the “boolean” column is pressed. Using the configureCell() extension, I override the text and iconPath attributes for boolean column.


I still can’t figure out the foreground color for member names in the Users > Edit Role pane of the user management. This is the last thing I need to change. I’ve tried every text color method from here

when I do

comps = event.source.parent.getComponent('User Management').getComponents()
for comp in comps:
	print comp.getComponents()

array(java.awt.Component, [com.inductiveautomation.ignition.client.util.gui.AntialiasLabel[,7,12,1250x19,alignmentX=0.0,alignmentY=0.0,border=,flags=8388608,maximumSize=,minimumSize=,preferredSize=,defaultIcon=,disabledIcon=,horizontalAlignment=LEADING,horizontalTextPosition=TRAILING,iconTextGap=4,labelFor=,text=Users,verticalAlignment=CENTER,verticalTextPosition=CENTER], com.inductiveautomation.ignition.client.util.gui.LinkButton[,1261,12,48x19,hidden,alignmentX=0.0,alignmentY=0.0,border=,flags=8388608,maximumSize=,minimumSize=,preferredSize=,defaultIcon=,disabledIcon=,horizontalAlignment=LEADING,horizontalTextPosition=TRAILING,iconTextGap=6,labelFor=,text=< back,verticalAlignment=CENTER,verticalTextPosition=CENTER], javax.swing.JButton[,1313,7,85x29,hidden,alignmentX=0.0,alignmentY=0.5,border=com.incors.plaf.alloy.ct@a9fa6d,flags=16777504,maximumSize=,minimumSize=,preferredSize=,defaultIcon=jar:file:/C:/Users/dhayes/.ignition/cache/resources/modules/fpmi/__1032659268__vision-client-9.9.16.jar/00000000684ED795/__1032659268__vision-client-9.9.16.jar!/images/check.png,disabledIcon=,disabledSelectedIcon=,margin=javax.swing.plaf.InsetsUIResource[top=3,left=14,bottom=3,right=14],paintBorder=true,paintFocus=true,pressedIcon=,rolloverEnabled=true,rolloverIcon=,rolloverSelectedIcon=,selectedIcon=,text=Save,defaultCapable=true]]) 

array(java.awt.Component, [com.inductiveautomation.factorypmi.application.components.UserManagementPanel$1[Users,0,0,1397x828,layout=com.jidesoft.swing.JideSplitPaneLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=16777217,maximumSize=,minimumSize=,preferredSize=]]) 

That’s a JList, if that helps.

1 Like