void (MessagePool.State state) { UIUtil.invokeLaterIfNeeded(() -> { IdeErrorsIcon icon = this.icon; if (icon == null) { icon = new IdeErrorsIcon(frame != null); icon.setVerticalAlignment(SwingConstants.CENTER); onClick.installOn(icon); this.icon = icon; component.get().add(icon, BorderLayout.CENTER); } icon.setState(state); component.get().setVisible(state != MessagePool.State.NoErrors); action.icon = icon.getIcon(); action.state = state; }); }