Sets the server's icon.
 @param icon [String, #read] The new icon, in base64-encoded JPG format.
778145
def icon=(icon)
      if icon.respond_to? :read
        icon_string = 'data:image/jpg;base64,'
        icon_string += Base64.strict_encode64(icon.read)
        update_server_data(icon_id: icon_string)
      else
        update_server_data(icon_id: icon)
      end
    end
1349504
public void setIcon(final Image IMAGE) {
        if (null == icon) {
            _icon = IMAGE;
            fireSectionEvent(UPDATE_EVENT);
        } else {
            icon.set(IMAGE);
        }
    }
1369639
public void setIcon(FontOpenCms icon, String color) {

        if (icon != null) {
            m_iconCell.setInnerHTML(icon.getHtml(32, color));
        } else {
            m_iconCell.setInnerHTML("");
        }
    }
944012
public function setIcon($icon)
    {
        switch ($icon) {
            case 'info':
            case 'error':
            case 'warning':
                $this->icon = $icon;
                break;
            default:
                if (file_exists($icon) && is_file($icon)) {
                    $this->icon = $icon;
                } else {
                    if (isset($this->log)) {
                        $this->log(
                            sprintf(
                                "%s is not a file. Using default icon instead.",
                                $icon
                            ),
                            Project::MSG_WARN
                        );
                    }
                }
        }
    }
698584
public void setShowIcon(final boolean showIcon) {
        if (!showIcon)
            attrMixin.setAttribute(SHOW_ICON, Boolean.toString(false));
        else
            attrMixin.removeAttribute(SHOW_ICON);
    }
477715
public void setFrameIcon(Icon newIcon) {
        Icon oldIcon = getFrameIcon();
        titleLabel.setIcon(newIcon);
        firePropertyChange("frameIcon", oldIcon, newIcon);
    }
268257
public ServerUpdater setIcon(BufferedImage icon, String fileType) {
        delegate.setIcon(icon, fileType);
        return this;
    }
856188
def setIcon(self, icon):
        
        if icon:
            self._icon = QIcon(icon)
        else:
            self._icon = None
1354481
public void setTypicon(@Typicon.Icon CharSequence iconCode) {
        setBootstrapText(new BootstrapText.Builder(getContext(), isInEditMode()).addTypicon(iconCode).build());
    }
1172530
public void setIcon(final Image IMAGE) {
        if (null == icon) {
            _icon = IMAGE;
        } else {
            icon.set(IMAGE);
        }
    }
144950
def buildIcon(icon):
        
        if icon is None:
            return QIcon()
        
        if type(icon) == buffer:
            try:
                icon = QIcon(projexui.generatePixmap(icon))
            except:
                icon = QIcon()
        else:
            try:
                icon = QIcon(icon)
            except:
                icon = QIcon()
        
        return icon
528562
def set_icon_file(self, filename, rel="icon"):
        
        mimetype, encoding = mimetypes.guess_type(filename)
        self.add_child("favicon", '<link rel="%s" href="%s" type="%s" />'%(rel, filename, mimetype))
302217
public void setIcon(Image image) {

        m_iconPanel.setVisible(true);
        if (image == null) {
            return;
        }
        m_iconPanel.setWidget(image);
    }
696987
public void setIconBrand(boolean _iconBrand) {
		if (_iconBrand) {
			AddResourcesListener.setFontAwesomeVersion(5, this);
		}
		getStateHelper().put(PropertyKeys.iconBrand, _iconBrand);
	}
176303
def set_icon(self, icon, qtgui_module):
        """"""

        if self._use_fallback:
            icon.addFile(self._fallback)
        else:
            for role, pixmap in self._roles.items():
                if role.endswith("off"):
                    mode = role[:-3]
                    state = qtgui_module.QIcon.Off
                elif role.endswith("on"):
                    mode = role[:-2]
                    state = qtgui_module.QIcon.On
                else:
                    continue

                mode = getattr(qtgui_module.QIcon, mode.title())

                if pixmap:
                    icon.addPixmap(qtgui_module.QPixmap(pixmap), mode, state)
                else:
                    icon.addPixmap(qtgui_module.QPixmap(), mode, state)

        self.icon = icon
647654
public void setIconAwesome(String _iconAwesome) {
		AddResourcesListener.setNeedsFontsAwesome(this);
		getStateHelper().put(PropertyKeys.iconAwesome, _iconAwesome);
	}
637446
public function setIcon(?string $icon): self
    {
        if (null === $icon) {
            $this->icon = $this->iconType = null;

            return $this;
        }

        if (':' === \mb_substr($icon, 0, 1) && ':' === \mb_substr($icon, \mb_strlen($icon) - 1, 1)) {
            $this->iconType = self::ICON_TYPE_EMOJI;
        } else {
            $this->iconType = self::ICON_TYPE_URL;
        }

        $this->icon = $icon;

        return $this;
    }