@Override protected void descendantRemoved(Component descendant) { super.descendantRemoved(descendant); String automationID = descendant.getAutomationID(); if (automationID != null) { Automation.remove(automationID); } }
@Override protected void descendantRemoved(Component descendant) { super.descendantRemoved(descendant); String automationID = descendant.getAutomationID(); if (automationID != null) { Automation.remove(automationID); } }
/** * Sets the component's automation ID. This value can be used to obtain a * reference to the component via {@link Automation#get(String)} when the * component is attached to a component hierarchy. * * @param automationID * The automation ID to use for the component, or <tt>null</tt> to clear the * automation ID. */ public void setAutomationID(String automationID) { String previousAutomationID = this.automationID; this.automationID = automationID; if (getDisplay() != null) { if (previousAutomationID != null) { Automation.remove(previousAutomationID); } if (automationID != null) { Automation.add(automationID, this); } } }
/** * Sets the component's automation ID. This value can be used to obtain a * reference to the component via {@link Automation#get(String)} when the * component is attached to a component hierarchy. * * @param automationID * The automation ID to use for the component, or <tt>null</tt> to clear the * automation ID. */ public void setAutomationID(String automationID) { String previousAutomationID = this.automationID; this.automationID = automationID; if (getDisplay() != null) { if (previousAutomationID != null) { Automation.remove(previousAutomationID); } if (automationID != null) { Automation.add(automationID, this); } } }