``` /** * Gets the UI the component is attached to. * @return the UI the component is attached to */ public Optional<UI> getUI(); ```