Callback to toggle transparency.
512009
def accel_toggle_transparency(self, *args):
        
        self.transparency_toggled = not self.transparency_toggled
        self.settings.styleBackground.triggerOnChangedValue(
            self.settings.styleBackground, 'transparency'
        )
        return True
320959
private void setVisibilityCallback(@Nullable VisibilityCallback visibilityCallback) {
    Drawable drawable = getTopLevelDrawable();
    if (drawable instanceof VisibilityAwareDrawable) {
      ((VisibilityAwareDrawable) drawable).setVisibilityCallback(visibilityCallback);
    }
  }
1110699
private void adaptButtonBarDividerVisibility() {
        if (buttonBarDivider != null) {
            buttonBarDivider.setVisibility(showButtonBarDivider ? View.VISIBLE : View.GONE);
            buttonBarDivider.setVisibleByDefault(showButtonBarDivider);
        }
    }
399641
function toggleControls () {
      controlsElement.style.display = controlsElement.style.display == "none" ? "block" : "none";
      if (controlsElement.style.display === "block") {
        playButton.focus();
      }
    }
533122
function(elem, opacity, animDuration) {
            var self = this;

            // Ensure no animation is running
            //elem.mapElem.stop();
            //if (elem.textElem) elem.textElem.stop();

            // If final opacity is not null, ensure element is shown before proceeding
            if (opacity > 0) {
                elem.mapElem.show();
                if (elem.textElem) elem.textElem.show();
            }

            self.animate(elem.mapElem, {"opacity": opacity}, animDuration, function () {
                // If final attribute is 0, hide
                if (opacity === 0) elem.mapElem.hide();
            });

            self.animate(elem.textElem, {"opacity": opacity}, animDuration, function () {
                // If final attribute is 0, hide
                if (opacity === 0) elem.textElem.hide();
            });
        }
1180189
function handleVisibilityChange() {
  if (document[hidden]) {
    let gifPlayers = document.querySelectorAll('.vjs-gifplayer');

    for (let gifPlayer of gifPlayers) {
      let player = gifPlayer.player;

      if (player) {
        player.pause();
      }
    }
  } else {
    autoPlayGifs();
  }
}
226801
def toggleCollapseAfter( self ):
        
        if ( self.isCollapsed() ):
            self.uncollapse()
        else:
            self.collapse( XSplitterHandle.CollapseDirection.After )
1036480
def toggle(self, rows):
        ''
        for r in Progress(rows, 'toggling', total=len(self.rows)):
            if not self.unselectRow(r):
                self.selectRow(r)
1304011
public void toggleCollapsed (int index)
    {
        JList list = getSectionList(index);
        list.setVisible(!list.isVisible());
    }
305305
function(opacity) {
        if (opacity != this.opacity) {
            this.opacity = opacity;
            var childNodes = this.div.childNodes;
            for(var i = 0, len = childNodes.length; i < len; ++i) {
                var element = childNodes[i].firstChild || childNodes[i];
                var lastChild = childNodes[i].lastChild;
                //TODO de-uglify this
                if (lastChild && lastChild.nodeName.toLowerCase() === "iframe") {
                    element = lastChild.parentNode;
                }
                OpenLayers.Util.modifyDOMElement(element, null, null, null, 
                                                 null, null, null, opacity);
            }
            if (this.map != null) {
                this.map.events.triggerEvent("changelayer", {
                    layer: this,
                    property: "opacity"
                });
            }
        }
    }
42086
public static void toggleVisibility(View view, int hidingPolicy) {
        int current = view.getVisibility();
        view.setVisibility(current == View.VISIBLE ? hidingPolicy : View.VISIBLE);
    }
12781
private void toggle() {
        if (toggle.checked) {
            element().classList.add("completed");
        } else {
            element().classList.remove("completed");
        }
        repository().complete(item(), toggle.checked);
        application().update();
    }
272901
async function toggleColor(store) {
  await store.update(state => {
    if (state.color === "blue") {
      state.color = "green"
    } else {
      state.color = "blue"
    }
  })
}
811247
public void setAdditionalInfoVisible(boolean visible) {

        if (m_openClose == null) {
            return;
        }
        if (visible) {
            addStyleName(CmsListItemWidget.OPENCLASS);
            m_openClose.setDown(true);
            OpenEvent.fire(this, this);
        } else {
            removeStyleName(CmsListItemWidget.OPENCLASS);
            m_openClose.setDown(false);
            CloseEvent.fire(this, this);
        }
        CmsDomUtil.resizeAncestor(getParent());
    }
985585
def toggle(self, event):
        """"""

        if self.state < len(self.bitmap_list) - 1:
            self.state += 1
        else:
            self.state = 0

        self.SetBitmapLabel(self.bitmap_list[self.state])

        try:
            event.Skip()
        except AttributeError:
            pass

        """For compatibility with toggle buttons"""
        setattr(self, "GetToolState", lambda x: self.state)
757782
def _on_click(self, event):
        """"""
        x = event.x
        y = event.y
        self.coords('cross_h', 0, y, self.winfo_width(), y)
        self.coords('cross_v', x, 0, x, self.winfo_height())
        self.event_generate("<<ColorChanged>>")
791352
public void setOpenerVisible(boolean visible) {

        if (visible) {
            m_opener.removeStyleName(OpenCmsTheme.BUTTON_INVISIBLE);
        } else {
            m_opener.addStyleName(OpenCmsTheme.BUTTON_INVISIBLE);
        }
    }