一个 panel 展示时，隐藏其他 panel
497493
function () {
        if (!_isCreatedPanelMenus.length) {
            return
        }
        _isCreatedPanelMenus.forEach(menu => {
            const panel = menu.panel || {}
            if (panel.hide) {
                panel.hide()
            }
        })
    }
155877
function () {
        var self = this, settings = self.settings;

        self.active(true);

        if (!self.panel) {
          var panelSettings = settings.panel;

          // Wrap panel in grid layout if type if specified
          // This makes it possible to add forms or other containers directly in the panel option
          if (panelSettings.type) {
            panelSettings = {
              layout: 'grid',
              items: panelSettings
            };
          }

          panelSettings.role = panelSettings.role || 'dialog';
          panelSettings.popover = true;
          panelSettings.autohide = true;
          panelSettings.ariaRoot = true;

          self.panel = new FloatPanel(panelSettings).on('hide', function () {
            self.active(false);
          }).on('cancel', function (e) {
            e.stopPropagation();
            self.focus();
            self.hidePanel();
          }).parent(self).renderTo(self.getContainerElm());

          self.panel.fire('show');
          self.panel.reflow();
        } else {
          self.panel.show();
        }

        self.panel.moveRel(self.getEl(), settings.popoverAlign || (self.isRtl() ? ['bc-tr', 'bc-tc'] : ['bc-tl', 'bc-tc']));
      }
1032020
def panels(self):
        
        return [panel for panel in self.findChildren(XViewPanel) if panel.viewWidget() == self]
655252
private void displayNode(JspWriter out, ViewNode node, String url_Path, int level, int width) throws IOException {

		// ----------------------------------------显示节点本身信息，如节点名称等开始
		String encodedNodeKey = URLEncoder.encode(node.getKey(), "UTF-8");
		String action = replace(nodeAction, "${key}", encodedNodeKey);
		StringBuilder url = new StringBuilder(url_Path);
		url.append(action);
		if (nodeAction.indexOf("?") < 0)
			url.append("?");
		else
			url.append("&");
		url.append("key=").append(node.getKey());
		String treeNodeAction = url.toString();

		url = new StringBuilder(url_Path);
		url.append(treeAction);
		if (treeAction.indexOf("?") < 0)
			url.append("?");
		else
			url.append("&");
		url.append("select=").append(node.getKey());
		String updateNodeAction = url.toString();

		// Render the label for this node (if any)
		out.print("    <td colspan=\"");
		out.print(width - level + 1);
		out.print("\">");

		// 这里省略了icon

		if (node.getLabel() != null) {
			String labelStyle = null;
			if (node.isSelected())
				labelStyle = CSS_STYLE_SELECTED;
			else if (!node.isSelected())
				labelStyle = CSS_STYLE_UN_SELECTED;
			if (treeNodeAction != null) {
				// Note the leading space so that the text has some space
				// between it and any preceding images
				out.print(" <a href=\"");
				out.print(treeNodeAction);
				out.print("\"");
				if (target != null) {
					out.print(" target=\"");
					out.print(target);
					out.print("\"");
				}
				if (labelStyle != null) {
					out.print(" class=\"");
					out.print(labelStyle);
					out.print("\"");
				}
				// to refresh the tree in the same 'self' frame
				out.print(" onclick=\"");
				out.print("self.location.href='" + updateNodeAction + "'");
				out.print("\"");
				out.print(">");
			} else if (labelStyle != null) {
				out.print("<span class=\"");
				out.print(labelStyle);
				out.print("\">");
			}
			out.print(node.getLabel());
			if (treeNodeAction != null)
				out.print("</a>");
			else if (labelStyle != null)
				out.print("</span>");
		}

		out.println("</td>");

		// ----------------------------------------显示节点本身信息，如节点名称等结束

	}
165731
def repaint
      if @parent
        @row = @parent.row+1
        @col = @parent.col + @parent.width - 1
        @length = @parent.height - 2
        @list_length = @parent.row_count 
        @current_index ||= @parent.current_index
        @border_attrib ||= @parent.border_attrib
      end
      raise ArgumentError, "current_index must be provided" unless @current_index
      raise ArgumentError, "list_length must be provided" unless @list_length
      my_win = @form ? @form.window : @target_window
      @graphic = my_win unless @graphic
      return unless @repaint_required

      # 2016-01-14 - replacing 1 with space in mvvline since junk is showing up in some cases.
      space_char = " ".codepoints.first

      # first print a right side vertical line
      #bc = $bottomcolor  # dark blue
      bc = $datacolor
      bordercolor = @border_color || bc
      borderatt = @border_attrib || Ncurses::A_REVERSE
      #$log.debug "SCROLL bordercolor #{bordercolor} , #{borderatt} " if $log.debug? 


      @graphic.attron(Ncurses.COLOR_PAIR(bordercolor) | borderatt)
      #$log.debug " XXX SCROLL #{@row} #{@col} #{@length} "
      @graphic.mvvline(@row+0, @col, space_char, @length-0)
      @graphic.attroff(Ncurses.COLOR_PAIR(bordercolor) | borderatt)

      # now calculate and paint the scrollbar
      pht = @length
      listlen = @list_length * 1.0
      @current_index = 0 if @current_index < 0
      @current_index = listlen-1 if @current_index >= listlen
      sclen = (pht/listlen)* @length
      sclen = 1 if sclen < 1 # sometimes 0.7 for large lists 100 items 2011-10-1 
      scloc = (@current_index/listlen)* @length
      scloc = (@length - sclen) if scloc > @length - sclen # don't exceed end
      if @current_index == @list_length - 1
        scloc = @length - sclen + 0 # earlier 1, but removed since sclen min 1 2011-10-1 
      end
      @graphic.attron(Ncurses.COLOR_PAIR(@scroll_pair) | borderatt)
      r = @row + scloc
      c = @col + 0
      #$log.debug " XXX SCROLLBAR #{r} #{c} #{sclen} "
      @graphic.mvvline(r, c, space_char, sclen)
      @graphic.attroff(Ncurses.COLOR_PAIR(@scroll_pair) | borderatt)
      @repaint_required = false
    end
1351482
function(options) {
        var title = this.$main.attr('title'),
            id = this.$main.attr('id') || '',
            theme = options.theme;

        var switchContainer = '<label class="' + defaultContainerClass + ' biz-switch-container-' + theme + '" for="' + id + '"><span class="biz-switch" id=""><span class="biz-switch-inner"></span></span><span>' + title + '</span></label>';

        this.$main.after(switchContainer).hide();

        this.$switchContainer = this.$main.next();
        this.$switchDom = this.$switchContainer.find('.biz-switch');
        //初始状态
        if (this.$main.attr('checked')) {
            this.$switchDom.addClass(checkedClass);
        } else {
            this.$switchDom.addClass(defaultClass);
        }

        var self = this;
        this.$switchContainer.on('click.bizSwitch', function() {
            if (!self.main.disabled) {
                if (self.main.checked) {
                    self.$switchDom.attr('class', [defaultClass].join(' '));
                } else {
                    self.$switchDom.attr('class', [defaultClass, checkedClass].join(' '));
                }
                if (id === '') {
                    self.main.checked = !self.main.checked;
                }
            }
        });
    }
573592
function navTouchEvt(e) {
            var $cur = $(e.currentTarget),
                type;

            if ($cur.hasClass('screen-nav')) {
                //筛选
                $screen.toggleClass('hide');
                $prevFocusNav.toggleClass('focus');
                $cur.toggleClass('focus');
            } else {
                if ($cur.hasClass('focus')) {
                    if ($cur.hasClass('price-nav')) {
                        toggleSort($cur);
                    }
                    return;
                }

                $prevFocusNav = $cur;

                $navItem.removeClass('focus');
                $cur.addClass('focus');

                type = getFocusNavType(); //当前focus项(new/sale/price)

                $goodList.addClass('hide');
                switch (type) {
                    case 'newest':
                        $npc.removeClass('hide');
                        break;
                    case 'sale':
                        $svc.removeClass('hide');
                        break;
                    case 'price':
                        $pc.removeClass('hide');
                        break;
                }

                if (navInfo[type].reload) {
                    search();
                }
            }
        }
553452
function(){
		/* "ものを動かしたように描画する"でなければinputLineと同じ */
		if(this.puzzle.execConfig('dispmove')){
			this.inputMoveLine();
			return;
		}
		
		var pos, border;
		if(!this.board.borderAsLine){
			pos = this.getpos(0);
			if(this.prevPos.equals(pos)){ return;}
			border = this.prevPos.getnb(pos);
		}
		else{
			pos = this.getpos(0.35);
			if(this.prevPos.equals(pos)){ return;}
			border = this.prevPos.getborderobj(pos);
		}
		
		if(!border.isnull){
			if(this.inputData===null){ this.inputData=(border.isLine()?0:1);}
			if     (this.inputData===1){ border.setLine();}
			else if(this.inputData===0){ border.removeLine();}
			border.draw();
		}
		this.prevPos = pos;
	}
1028202
function (cfg) {
    this._cfg = merge({
      delay: 400
    }, cfg)

    // 事件订阅数组
    this._subs = {
      on: [],
      after: []
    }

    // 当前信息
    this.info = this.getInfo()

    // 绑定事件回调上下文
    this._onWinOrientationChange = bind(this._onWinOrientationChange, this)

    // 绑定窗口切换事件
    window.addEventListener(EVT_ORIENTATION_CHANGE, this._onWinOrientationChange, false)
  }
365593
function (v, e) {
            var self = this, parent = self.get('parent');
            self.callSuper(v, e);
            if (!(e && e.byPassSetHighlightedItem)) {
                if (self.get('rendered')) {
                    parent.set('highlightedItem', v ? self : null);
                } else {
                    if (v) {
                        // do not set null on initializer
                        parent.set('highlightedItem', self);
                    }
                }
            }    // 是否要滚动到当前菜单项(横向，纵向)
            // 是否要滚动到当前菜单项(横向，纵向)
            if (v) {
                var el = self.$el,
                    // 找到向上路径上第一个可以滚动的容器，直到父组件节点（包括）
                    // 找不到就放弃，为效率考虑不考虑 parent 的嵌套可滚动 div
                    p = el.parent(function (e) {
                        return $(e).css('overflow') !== 'visible';
                    }, parent.get('el').parent());
                if (!p) {
                    return;
                }
                el.scrollIntoView(p, {
                    alignWithTop: true,
                    allowHorizontalScroll: true,
                    onlyScrollIfNeeded: true
                });
            }
        }
115601
def newPanelTab(self):
        
        view = self._currentPanel.currentView()
        
        # duplicate the current view
        if view:
            new_view = view.duplicate(self._currentPanel)
            self._currentPanel.addTab(new_view, new_view.windowTitle())
34585
function Panel(options) {
  var panelLayout = options.layoutConfig;
  var viewLayouts = createLayout(panelLayout.view.views);
  this.getPosition = panelLayout.getPosition;
  this.views = _.map(viewLayouts, function (viewLayout) {
    viewLayout.getPosition = wrapGetPosition(viewLayout.getPosition, panelLayout.getPosition);
    return options.creator(viewLayout);
  });
}
862626
private javax.swing.JPanel getPanelCommand() {
		if (panelCommand == null) {
			panelCommand = new javax.swing.JPanel();
			panelCommand.setLayout(new java.awt.GridBagLayout());
			panelCommand.setName(Constant.messages.getString("httpsessions.panel.title"));

			// Add the two components: toolbar and work pane
			GridBagConstraints toolbarGridBag = new GridBagConstraints();
			GridBagConstraints workPaneGridBag = new GridBagConstraints();

			toolbarGridBag.gridx = 0;
			toolbarGridBag.gridy = 0;
			toolbarGridBag.weightx = 1.0d;
			toolbarGridBag.insets = new java.awt.Insets(2, 2, 2, 2);
			toolbarGridBag.anchor = java.awt.GridBagConstraints.NORTHWEST;
			toolbarGridBag.fill = java.awt.GridBagConstraints.HORIZONTAL;

			workPaneGridBag.gridx = 0;
			workPaneGridBag.gridy = 1;
			workPaneGridBag.weightx = 1.0;
			workPaneGridBag.weighty = 1.0;
			workPaneGridBag.insets = new java.awt.Insets(0, 0, 0, 0);
			workPaneGridBag.anchor = java.awt.GridBagConstraints.NORTHWEST;
			workPaneGridBag.fill = java.awt.GridBagConstraints.BOTH;

			panelCommand.add(this.getPanelToolbar(), toolbarGridBag);
			panelCommand.add(getWorkPane(), workPaneGridBag);
		}
		return panelCommand;
	}
969725
protected void configureNavi (FlexTable controls, int row, int col,
                                  int start, int limit, int total)
    {
        HorizontalPanel panel = new HorizontalPanel();
        panel.add(new Label("Page:")); // TODO: i18n

        // determine which pages we want to show
        int page = 1+start/_resultsPerPage;

        int pages;
        if (total < 0) {
            pages = page + 1;
        } else {
            pages = total/_resultsPerPage + (total%_resultsPerPage == 0 ? 0 : 1);
        }

        List<Integer> shown = new ArrayList<Integer>();
        shown.add(1);
        for (int ii = Math.max(2, Math.min(page-2, pages-5));
             ii <= Math.min(pages-1, Math.max(page+2, 6)); ii++) {
            shown.add(ii);
        }
        if (pages != 1) {
            shown.add(pages);
        }

        // now display those as "Page: _1_ ... _3_ _4_ 5 _6_ _7_ ... _10_"
        int ppage = 0;
        for (Integer cpage : shown) {
            if (cpage - ppage > 1) {
                panel.add(createPageLabel("...", null));
            }
            if (cpage == page) {
                panel.add(createPageLabel(""+page, "Current"));
            } else {
                panel.add(createPageLinkLabel(cpage));
            }
            ppage = cpage;
        }
        if (total < 0) {
            panel.add(createPageLabel("...", null));
        }
        controls.setWidget(row, col, panel);
        controls.getFlexCellFormatter().setHorizontalAlignment(row, col, HasAlignment.ALIGN_CENTER);
    }
1348429
def _check_panel(self, length):
        
        n = len(self.index)
        if divmod(n, length)[1] != 0:
            raise ValueError("Panel length '%g' must evenly divide length of series '%g'"
                             % (length, n))
        if n == length:
            raise ValueError("Panel length '%g' cannot be length of series '%g'"
                             % (length, n))
921446
function() {
            YUD.batch(this._panels, function(e) {
                var elContent = this.firstChild.nextSibling;
                if(elContent) { 
                    YUD.removeClass(e.firstChild, this.CLASSES.ACTIVE);
                    YUD.addClass(elContent, this.CLASSES.HIDDEN);
                    this._setARIA(elContent, 'aria-hidden', 'true');
                }
            }, this);
        }
332257
function checkPanelPosition() {
        const currentPanelRect = panel.getBoundingClientRect();

        if (currentPanelRect.top + currentPanelRect.height > getScrollContainerHeight() &&
          !isDocked) {
          dock();
        } else if (
          isDocked &&
          currentPanelRect.top + currentPanelRect.height +
            getScrollContainerScrollTop() >= getInitialUndockedPosition() + TOGGLE_GAP
        ) {
          undock();
        }
      }