Return a panel or true
979800
function getPanelByCover(controller, cover) {
    var panels = controller._panels;
    if (!panels) {
        return true; // Global panel
    }
    var panelId = cover.__brushOption.panelId;
    // User may give cover without coord sys info,
    // which is then treated as global panel.
    return panelId != null ? panels[panelId] : true;
}
461841
public boolean displayError(Exception ex, Component panel)
    {
        if (panel != null)
        {   // Always
            BaseApplet baseApplet = null;
            if (panel instanceof BaseApplet)
                baseApplet = (BaseApplet)panel;
            else
            {
                while ((panel = panel.getParent()) != null)
                {
                    if (panel instanceof org.jbundle.thin.base.screen.JBasePanel)
                    {
                        baseApplet = ((org.jbundle.thin.base.screen.JBasePanel)panel).getBaseApplet();
                        break;
                    }
                }
            }
            if (baseApplet != null)
            {
                //baseApplet.setLastError(ex.getMessage());
                baseApplet.setStatusText(ex.getMessage(), Constants.WARNING);
                if (ex instanceof DBException)
                    return true;
            }
        }
        return false;
    }
282706
function() {

            var self = this;

            if(this.options.insightsPanelBuilder) {
                // use the customize insights panel builder
                return self.options.insightsPanelBuilder(self);
            } else {
                // using the default search box.
                return self.defaultInsightsPanel(self);
            }
        }
736091
private void returnLed(Buffer buffer) {
        Callback<LedColor> callback = getFirstCallback(BeanMessageID.CC_LED_READ_ALL);
        if (callback != null) {
            callback.onResult(LedColor.fromPayload(buffer));
        }
    }
397854
private JPanel getJPanel() {
        if (jPanel == null) {
            jPanel = new JPanel();
            jPanel.setLayout(new CardLayout());
            jPanel.setPreferredSize(new java.awt.Dimension(400,300));
            // ZAP: Disabled the platform specific browser
            //jPanel.add(getEmbeddedBrowser(), getEmbeddedBrowser().getName());
        }
        return jPanel;
    }
1032020
def panels(self):
        
        return [panel for panel in self.findChildren(XViewPanel) if panel.viewWidget() == self]
237111
private JPanel getJPanel1() {
        if (jPanel1 == null) {
            jPanel1 = new JPanel();
            jPanel1.setLayout(new CardLayout());
            jPanel1.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
            jPanel1.add(getJScrollPane1(), getJScrollPane1().getName());
        }
        
        return jPanel1;
    }
725118
def getPanelStatus(self, panelName, verbose=None):
        

        response=api(url=self.___url+'ui/panels/'+str(panelName)+'', method="GET", verbose=verbose, parse_params=False)
        return response
962367
def vlcpanel_factory(filepath, volume=None):
    

    vlc_panel_cls = VLCPanel
    VLCPanel.filepath = filepath
    if volume is not None:
        VLCPanel.volume = volume

    return vlc_panel_cls
809710
public static function panel($panel_type = 'default', $tags = null)
    {
        $tag = self::tag('div', $tags, 'panel panel-'.$panel_type, '', array());
        return $tag;

    }
679676
private UserRole getPanelRole(User user, Panel panel) {
    if (panel != null) {
      PanelUserDAO panelUserDAO = new PanelUserDAO();
      PanelUser panelUser = panelUserDAO.findByPanelAndUserAndStamp(panel, user, panel.getCurrentStamp());
      return panelUser == null ? getEveryoneRole() : panelUser.getRole();
    }
   
    return getEveryoneRole();
  }
1007995
private JPanel getPanelMisc() {
		if (panelMisc == null) {
			panelMisc = new JPanel();
			panelMisc.setLayout(new GridBagLayout());
			
			JPanel zapPanel = new JPanel();
			zapPanel.setLayout(new GridBagLayout());
			zapPanel.setBorder(
					BorderFactory.createTitledBorder(
							null, Constant.messages.getString("cfu.options.zap.border"), TitledBorder.DEFAULT_JUSTIFICATION,
							javax.swing.border.TitledBorder.DEFAULT_POSITION,
							FontUtils.getFont(FontUtils.Size.standard),
							java.awt.Color.black));
			
			zapPanel.add(getChkDownloadNewRelease(), LayoutHelper.getGBC(0, 1, 1, 1.0D));

			JPanel updPanel = new JPanel();
			updPanel.setLayout(new GridBagLayout());
			updPanel.setBorder(
					BorderFactory.createTitledBorder(
							null, Constant.messages.getString("cfu.options.updates.border"), TitledBorder.DEFAULT_JUSTIFICATION,
							javax.swing.border.TitledBorder.DEFAULT_POSITION,
							FontUtils.getFont(FontUtils.Size.standard),
							java.awt.Color.black));
			
			updPanel.add(getChkCheckAddonUpdates(), LayoutHelper.getGBC(0, 0, 1, 1.0D));
			updPanel.add(getChkInstallAddonUpdates(), LayoutHelper.getGBC(0, 1, 1, 1.0D));
			updPanel.add(getChkInstallScannerRules(), LayoutHelper.getGBC(0, 2, 1, 1.0D));
			
			JPanel newPanel = new JPanel();
			newPanel.setLayout(new GridBagLayout());
			newPanel.setBorder(
					BorderFactory.createTitledBorder(
							null, Constant.messages.getString("cfu.options.new.border"), TitledBorder.DEFAULT_JUSTIFICATION,
							javax.swing.border.TitledBorder.DEFAULT_POSITION,
							FontUtils.getFont(FontUtils.Size.standard),
							java.awt.Color.black));

			newPanel.add(getChkReportReleaseAddons(), LayoutHelper.getGBC(0, 0, 1, 1.0D));
			newPanel.add(getChkReportBetaAddons(), LayoutHelper.getGBC(0, 1, 1, 1.0D));
			newPanel.add(getChkReportAlphaAddons(), LayoutHelper.getGBC(0, 2, 1, 1.0D));

			JPanel dirsPanel = new JPanel();
			dirsPanel.setLayout(new GridBagLayout());
			dirsPanel.setBorder(
					BorderFactory.createTitledBorder(
							null, Constant.messages.getString("cfu.options.dir.border"), TitledBorder.DEFAULT_JUSTIFICATION,
							javax.swing.border.TitledBorder.DEFAULT_POSITION,
							FontUtils.getFont(FontUtils.Size.standard),
							java.awt.Color.black));
			
			dirsPanel.add(new CfuDirsOptionsPanel(getScriptDirModel()), LayoutHelper.getGBC(0, 0, 2, 1.0D, 1.0D));
			JLabel downloadDirLabel = new JLabel(Constant.messages.getString("cfu.options.downloaddir.label"));
			downloadDirLabel.setLabelFor(getDownloadDirCombo());
			dirsPanel.add(downloadDirLabel, LayoutHelper.getGBC(0, 1, 1, 0.5D));
			dirsPanel.add(getDownloadDirCombo(), LayoutHelper.getGBC(1, 1, 1, 0.5D));

			panelMisc.add(getChkCheckOnStart(), LayoutHelper.getGBC(0, 0, 1, 1.0D));
			panelMisc.add(zapPanel, LayoutHelper.getGBC(0, 1, 1, 1.0D));
			panelMisc.add(updPanel, LayoutHelper.getGBC(0, 2, 1, 1.0D));
			panelMisc.add(newPanel, LayoutHelper.getGBC(0, 3, 1, 1.0D));
			panelMisc.add(dirsPanel, LayoutHelper.getGBC(0, 4, 1, 1.0D, 1.0D));

		}
		return panelMisc;
	}
366073
def _current_component(view_func, dashboard=None, panel=None):
    """"""
    @functools.wraps(view_func, assigned=available_attrs(view_func))
    def dec(request, *args, **kwargs):
        if dashboard:
            request.horizon['dashboard'] = dashboard
        if panel:
            request.horizon['panel'] = panel
        return view_func(request, *args, **kwargs)
    return dec
1357359
function (panel) {
                var self = this, bar = self.get('bar'), body = self.get('body'), selectedPanelIndex = util.indexOf(panel, body.get('children'));
                body.set('selectedPanelIndex', selectedPanelIndex);
                bar.set('selectedTab', self.getTabAt(selectedPanelIndex));
                return this;
            }
1364877
private JPanel getJPanel1() {
		if (jPanel1 == null) {
			jPanel1 = new JPanel();
			jPanel1.add(getBtnCancel(), null);
			jPanel1.add(getBtnReset(), null);
			jPanel1.add(getBtnApply(), null);
		}
		return jPanel1;
	}
1221873
private JPanel getPanelMisc() {
		if (panelMisc == null) {
			panelMisc = new JPanel();
			panelMisc.setLayout(new GridBagLayout());
			int y = 0;
			panelMisc.add(getChkEnabled(), LayoutHelper.getGBC(0, y++, 1, 0.5));
			panelMisc.add(getChkUiEnabled(), LayoutHelper.getGBC(0, y++, 1, 0.5));
			panelMisc.add(getChkSecureOnly(), LayoutHelper.getGBC(0, y++, 1, 0.5));
			
			panelMisc.add(new JLabel(Constant.messages.getString("api.options.label.apiKey")), 
					LayoutHelper.getGBC(0, y, 1, 0.5));
			panelMisc.add(getKeyField(), LayoutHelper.getGBC(1, y++, 1, 0.5));
			panelMisc.add(getGenerateKeyButton(), LayoutHelper.getGBC(1, y++, 1, 0.5));
			
			JPanel jPanel = new JPanel();
			jPanel.setLayout(new GridBagLayout());
			jPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, 
					Constant.messages.getString("api.options.addr.title"),
					javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, 
					javax.swing.border.TitledBorder.DEFAULT_POSITION, 
					FontUtils.getFont(FontUtils.Size.standard), java.awt.Color.black));

			jPanel.add(getProxyPermittedAddressesPanel(), LayoutHelper.getGBC(0, 0, 1, 1.0, 1.0));
			panelMisc.add(jPanel, LayoutHelper.getGBC(0, y++, 2, 1.0, 1.0));

			JLabel warning = new JLabel(Constant.messages.getString("api.options.label.testingWarning"));
			warning.setForeground(Color.RED);
			panelMisc.add(warning, LayoutHelper.getGBC(0, y++, 2, 0.5D));
			panelMisc.add(getDisableKey(), LayoutHelper.getGBC(0, y++, 1, 0.5));
			panelMisc.add(getNoKeyForSafeOps(), LayoutHelper.getGBC(0, y++, 1, 0.5));
			panelMisc.add(getReportPermErrors(), LayoutHelper.getGBC(0, y++, 1, 0.5));
			panelMisc.add(getIncErrorDetails(), LayoutHelper.getGBC(0, y++, 1, 0.5));
			panelMisc.add(getAutofillKey(), LayoutHelper.getGBC(0, y++, 1, 0.5));
			panelMisc.add(getEnableJSONP(), LayoutHelper.getGBC(0, y++, 1, 0.5));
			
			panelMisc.add(new JLabel(), LayoutHelper.getGBC(0, y, 1, 0.5D, 1.0D));	// Spacer
		}
		return panelMisc;
	}
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))