DockWidget visibility has changed
544103
def visibility_changed(self, enable):
        """"""
        SpyderPluginWidget.visibility_changed(self, enable)
        if self.dockwidget is None:
            return
        if self.dockwidget.isWindow():
            self.dock_toolbar.show()
        else:
            self.dock_toolbar.hide()
        if enable:
            self.refresh_plugin()
        self.sig_update_plugin_title.emit()
421635
void zApplyDisplaySpinnerButtons() {
        if (parent == null) {
            return;
        }
        parent.getComponentDecreaseSpinnerButton().setEnabled(displaySpinnerButtons);
        parent.getComponentDecreaseSpinnerButton().setVisible(displaySpinnerButtons);
        parent.getComponentIncreaseSpinnerButton().setEnabled(displaySpinnerButtons);
        parent.getComponentIncreaseSpinnerButton().setVisible(displaySpinnerButtons);
    }
102215
public void setStatusBarVisible(boolean statusBarVisible) {
		if (this.statusBarVisible == statusBarVisible) return;
		if (statusBar!=null) {
			if (statusBarVisible)
				panel.add(statusBar.getComponent(), BorderLayout.SOUTH);
			else
				panel.remove(statusBar.getComponent());
			panel.revalidate();
			panel.repaint();
		}
		boolean prev = this.statusBarVisible;
		this.statusBarVisible = statusBarVisible;
		synchronizer.statusBarVisibilityChanged(this);
		propertyChangeSupport.firePropertyChange("statusBarVisible", prev, statusBarVisible);
	}
527050
def reset_window_layout(self):
        """"""
        answer = QMessageBox.warning(self, _("Warning"),
                     _("Window layout will be reset to default settings: "
                       "this affects window position, size and dockwidgets.\n"
                       "Do you want to continue?"),
                     QMessageBox.Yes | QMessageBox.No)
        if answer == QMessageBox.Yes:
            self.setup_layout(default=True)
1348773
private void adaptHeaderVisibility() {
        if (header != null) {
            if (showHeader) {
                header.setVisibility(View.VISIBLE);
                notifyOnAreaShown(Area.HEADER);
            } else {
                header.setVisibility(View.GONE);
                notifyOnAreaHidden(Area.HEADER);
            }
        }
    }
1345047
private void setButtonBarVisible(boolean visible) {

        if (m_hasButtonBar != visible) {
            m_hasButtonBar = visible;
            if (m_hasButtonBar) {

                m_buttonBar.getStyle().clearDisplay();
                int width = CmsClientStringUtil.parseInt(m_borderTopStyle.getWidth()) + BUTTON_BAR_WIDTH;
                m_borderTopStyle.setWidth(width, Unit.PX);
                m_borderBottomStyle.setWidth(width, Unit.PX);
                m_borderRightStyle.setLeft(
                    CmsClientStringUtil.parseInt(m_borderRightStyle.getLeft()) + BUTTON_BAR_WIDTH,
                    Unit.PX);
            } else {
                m_buttonBar.getStyle().setDisplay(Display.NONE);
                int width = CmsClientStringUtil.parseInt(m_borderTopStyle.getWidth()) - BUTTON_BAR_WIDTH;
                m_borderTopStyle.setWidth(width, Unit.PX);
                m_borderBottomStyle.setWidth(width, Unit.PX);
                m_borderRightStyle.setLeft(
                    CmsClientStringUtil.parseInt(m_borderRightStyle.getLeft()) - BUTTON_BAR_WIDTH,
                    Unit.PX);
            }
        }
    }
974987
function _updateMask ( type, x, y, w, h ) {
  if ( !_dockMask ) {
    // add dock mask
    _dockMask = document.createElement('div');
    _dockMask.classList.add('dock-mask');
    _dockMask.oncontextmenu = function() { return false; };
  }

  if ( type === 'dock' ) {
    _dockMask.classList.remove('tab');
    _dockMask.classList.add('dock');
  } else if ( type === 'tab' ) {
    _dockMask.classList.remove('dock');
    _dockMask.classList.add('tab');
  }

  _dockMask.style.left = `${x}px`;
  _dockMask.style.top = `${y}px`;
  _dockMask.style.width = `${w}px`;
  _dockMask.style.height = `${h}px`;

  if ( !_dockMask.parentElement ) {
    document.body.appendChild(_dockMask);
  }
}
1293725
function handleWidgetVisibilityChange( newVisible, previousVisible ) {
               widgetIsVisible = newVisible;
               if( newVisible && previousVisible === false && showContent && options.animationsEnabled ) {
                  startWatchingForContentResizing();
               }
               else {
                  stopWatchingForContentResizing();
               }
            }
1336144
private void updateToolTipDialogVisibility() {
        // Determine whether tooltip should be/remain visible
        boolean shouldBeVisible = isOverDecorationPainter() || isOverToolTipDialog();

        // Create tooltip dialog if needed
        if (shouldBeVisible) {
            createToolTipDialogIfNeeded();
        }

        // Update tooltip dialog visibility if changed
        if ((toolTipDialog != null) && (toolTipDialog.isVisible() != shouldBeVisible)) {
            toolTipDialog.setVisible(shouldBeVisible);
        }
    }
646794
def setVisible(self, state):
        
        super(XDockToolbar, self).setVisible(state)
        
        if state:
            self.rebuild()
            self.setCurrentAction(None)
1110699
private void adaptButtonBarDividerVisibility() {
        if (buttonBarDivider != null) {
            buttonBarDivider.setVisibility(showButtonBarDivider ? View.VISIBLE : View.GONE);
            buttonBarDivider.setVisibleByDefault(showButtonBarDivider);
        }
    }
1261754
def _create_dock_toggle_action(self):
        """"""
        # pylint: disable=W0201
        icon = resources_path('img', 'icons', 'icon.svg')
        self.action_dock = QAction(
            QIcon(icon),
            self.tr('Toggle InaSAFE Dock'), self.iface.mainWindow())
        self.action_dock.setObjectName('InaSAFEDockToggle')
        self.action_dock.setStatusTip(self.tr(
            'Show/hide InaSAFE dock widget'))
        self.action_dock.setWhatsThis(self.tr(
            'Show/hide InaSAFE dock widget'))
        self.action_dock.setCheckable(True)
        self.action_dock.setChecked(True)
        self.action_dock.triggered.connect(self.toggle_dock_visibility)
        self.add_action(self.action_dock)
400027
def dockDetailPane(self, detailPane, title=None, area=None):
        
        title = detailPane.classLabel() if title is None else title
        area = Qt.LeftDockWidgetArea if area is None else area
        dockWidget = self.dockWidget(detailPane, title, area)
        # TODO: undockDetailPane to disconnect
        dockWidget.visibilityChanged.connect(detailPane.dockVisibilityChanged)
        if len(self._detailDockWidgets) > 0:
            self.tabifyDockWidget(self._detailDockWidgets[-1], dockWidget)
        self._detailDockWidgets.append(dockWidget)
        return dockWidget
446575
@Override
    void setVisibility(boolean visibility) {
        if (isVisible && !visibility) {
            // make the X cursor invisible
            xLib.XDefineCursor(xdisplay, xwindow, transparentCursor);
            MonocleWindowManager.getInstance().repaintAll();
        } else if (!isVisible && visibility) {
            // make the cursor visible
            xLib.XUndefineCursor(xdisplay, xwindow);
            MonocleWindowManager.getInstance().repaintAll();
        }
        isVisible = visibility;
    }
1223912
@Override protected void onVisibilityChanged(View changedView, int visibility) {
    super.onVisibilityChanged(changedView, visibility);
    if (changedView != this) {
      return;
    }

    if (visibility == View.VISIBLE) {
      resumePresenter();
    } else {
      pausePresenter();
    }
  }
630961
@Override protected void onVisibilityChanged(View changedView, int visibility) {
    super.onVisibilityChanged(changedView, visibility);
    if (changedView != this) {
      return;
    }

    if (visibility == View.VISIBLE) {
      resume();
    } else {
      pause();
    }
  }
11957
public void onModuleLoad() {
		DockPanel dock = new DockPanel();
		dock.addStyleName("mainBackground");
		dock.setWidth("700px");
		dock.setHeight("300px");
		dock.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
		dock.setVerticalAlignment(HasVerticalAlignment.ALIGN_TOP);

		dock.add(createHeader(), DockPanel.NORTH);

		// Time Picker Examples
		dock.add(createTimePicker(), DockPanel.WEST);
		// Time Picker Small Examples
		dock.add(createSmallTimePicker(), DockPanel.WEST);
		// iOSButton Examples
		dock.add(createIOSButton(), DockPanel.WEST);
		// DatePicker Examples
		dock.add(createDatePicker(), DockPanel.WEST);

		RootPanel.get().add(dock);
	}