JLabel (final Object value, final boolean showReadOnly) { PyClass aClass = (PyClass) value; setText(getClassText(aClass)); int flags = Iconable.ICON_FLAG_VISIBILITY; if (showReadOnly) { flags |= Iconable.ICON_FLAG_READ_STATUS; } Icon icon = aClass.getIcon(flags); if(icon != null) { setIcon(icon); } return this; }