QueueElementButton () { InplaceButton cancelButton = new InplaceButton( new IconButton(CoreBundle.message("button.cancel"), AllIcons.Process.StopHovered, AllIcons.Process.StopHovered), __ -> cancelRequest()); cancelButton.setVisible(true); cancelButton.setFillBg(true); return new QueueElementButton(cancelButton, () -> cancelButton.setPainting(!isCanceled)); }