def METHOD_NAME(self):
    """Update the displayed URL if the url or the hover url changed."""
    old_urltype = self._urltype
    if self._hover_url is not None:
        self.setText(self._hover_url)
        self._urltype = UrlType.hover
    elif self._normal_url is not None:
        self.setText(self._normal_url)
        self._urltype = self._normal_url_type
    else:
        self.setText('')
        self._urltype = UrlType.normal
    if old_urltype != self._urltype:
        # We can avoid doing an unpolish here because the new style will
        # always override the old one.
        style = self.style()
        assert style is not None
        style.polish(self)