void (PaintAwarePanel content, int indentLevel) { content.setPaintCallback(graphics -> showBalloonIfNecessary()); content.addPropertyChangeListener(new PropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent evt) { if (!"ancestor".equals(evt.getPropertyName())) { return; } // Configure the balloon to show on initial configurable drawing. myShowBalloonIfNecessary = evt.getNewValue() != null && evt.getOldValue() == null; if (evt.getNewValue() == null && evt.getOldValue() != null) { // Cancel delayed balloons when the configurable is hidden. myAlarm.cancelAllRequests(); } } }); addImportComponents(content, indentLevel); addDelegationComponents(content, indentLevel); addGradleComponents(content, indentLevel); }