Create our sub-controls
356253
def CreateControls(self):
        """"""
        wx.EVT_LIST_COL_CLICK(self, self.GetId(), self.OnReorder)
        wx.EVT_LIST_ITEM_SELECTED(self, self.GetId(), self.OnNodeSelected)
        wx.EVT_MOTION(self, self.OnMouseMove)
        wx.EVT_LIST_ITEM_ACTIVATED(self, self.GetId(), self.OnNodeActivated)
        self.CreateColumns()
960944
def _sub(cmd, *sections):
    """"""
    cmd_func = cmd if isfunction(cmd) else cmd.cmd
    return Subcmd(baredoc(cmd), *sections, func=cmd_func)
565886
@Override
	public void createControl(Composite parent) {
		initializeDialogUnits(parent);
		Composite composite = new Composite(parent, SWT.NONE);
		composite.setFont(parent.getFont());
		int nColumns = 4;
		GridLayout layout = new GridLayout();
		layout.numColumns = nColumns;
		composite.setLayout(layout);
		createContainerControls(composite, nColumns);
		createPackageControls(composite, nColumns);
		createSeparator(composite, nColumns);
		createTypeNameControls(composite, nColumns);
		createModifierControls(composite, nColumns);
		createSuperClassControls(composite, nColumns);
		createSuperInterfacesControls(composite, nColumns);
		createMethodStubSelectionControls(composite, nColumns);
		createCommentControls(composite, nColumns);
		enableCommentControl(true);
		setControl(composite);
		Dialog.applyDialogFont(composite);
		// TODO: Help.
	}
308956
protected function controlCommonAccess()
    {
        if (!$this->isInstall()) {

            if (!empty($this->uid)) {
                $this->controlAccessCredentials();
            }

            $this->controlCsrf();
            $this->controlAccessUpload();
            $this->controlAccessRestrictedArea();
            $this->controlAccessAdmin();
            $this->controlAccessAccount();
        }
    }
1144912
private void createMaintenanceDurationControl() {
        duration = new TextFieldBuilder(Action.MAINTENANCE_WINDOW_DURATION_LENGTH)
                .id(UIComponentIdProvider.MAINTENANCE_WINDOW_DURATION_ID)
                .caption(i18n.getMessage("caption.maintenancewindow.duration")).validator(new DurationValidator())
                .prompt("hh:mm:ss").required(true, i18n).buildTextComponent();
    }
571901
private void addSubComponents() {
        menuButton.setName("InternalFrameTitlePane.menuButton");
        iconButton.setName("InternalFrameTitlePane.iconifyButton");
        maxButton.setName("InternalFrameTitlePane.maximizeButton");
        closeButton.setName("InternalFrameTitlePane.closeButton");

        add(menuButton);
        add(iconButton);
        add(maxButton);
        add(closeButton);
    }
824953
function initControls() {
    if (!nextBtn) {
      // create & append next-btn
      nextBtn = document.createElement('span');
      addClass(nextBtn, _const_class_prefix + '-next');
      
      // add custom images
      if (CTX.opt.nextImg) {
        var nextBtnImg = document.createElement('img');
        nextBtnImg.setAttribute('src', CTX.opt.nextImg);
        nextBtn.appendChild(nextBtnImg);
      }
      else {
        addClass(nextBtn, _const_class_prefix + '-no-img');
      }
      addEvent(nextBtn, 'click', function (e) {
        stopPropagation(e); // prevent closing of lightbox
        CTX.next();
      }, false);
      CTX.box.appendChild(nextBtn);
    }
    addClass(nextBtn, _const_class_prefix + '-active');
    if (!prevBtn) {
      // create & append next-btn
      prevBtn = document.createElement('span');
      addClass(prevBtn, _const_class_prefix + '-prev');
      
      // add custom images
      if (CTX.opt.prevImg) {
        var prevBtnImg = document.createElement('img');
        prevBtnImg.setAttribute('src', CTX.opt.prevImg);
        prevBtn.appendChild(prevBtnImg);
      }
      else {
        addClass(prevBtn, _const_class_prefix + '-no-img');
      }
      addEvent(prevBtn, 'click', function (e) {
        stopPropagation(e); // prevent closing of lightbox
        CTX.prev();
      }, false);
      CTX.box.appendChild(prevBtn);
    }
    addClass(prevBtn, _const_class_prefix + '-active');
  }
1244016
private JComponent createControls()
    {
        JPanel controls = new JPanel(new FlowLayout(FlowLayout.RIGHT));
        JButton gcButton = new JButton("Request GC");
        gcButton.setToolTipText("Perform garbage collection (the JVM may ignore this request).");
        gcButton.addActionListener(new ActionListener()
        {
            public void actionPerformed(ActionEvent ev)
            {
                memoryBean.gc();
            }
        });
        controls.add(gcButton);
        return controls;
    }
704919
def makeControlModePacket(ID, mode):
	
	pkt = makeWritePacket(ID, xl320.XL320_CONTROL_MODE, le(mode))
	return pkt
1220090
private void setupComponents() {
		cancelButton.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				dispose();
			}
		});

		finishButton.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				JOptionPane.showMessageDialog(getContentPane(), "Wizard finished!");
				dispose();
			}
		});

		cancelButton.setMnemonic(KeyEvent.VK_C);
		previousButton.setMnemonic(KeyEvent.VK_P);
		nextButton.setMnemonic(KeyEvent.VK_N);
		finishButton.setMnemonic(KeyEvent.VK_F);

		wizardPageContainer.addContainerListener(new MinimumSizeAdjuster());
	}
320787
private void createPageControls() {
        WizardPage[] pages = wizard.getPages();
        for (int i = 0; i < pages.length; i++) {
            JComponent c = pages[i].getControl();
            GuiStandardUtils.attachDialogBorder(c);
            Dimension size = c.getPreferredSize();
            if (size.width > largestPageWidth) {
                largestPageWidth = size.width;
            }
            if (size.height > largestPageHeight) {
                largestPageHeight = size.height;
            }
        }
    }
1348078
def access_controls(self, access_controls: Optional[Iterable[AccessControl]]):
        
        if access_controls is not None:
            access_controls = set(access_controls)
        self._access_controls = access_controls
1340932
function setupControls () {

      window.addEventListener('keydown', function () {
        startControlsTimeOut();
      });

      playButton.addEventListener('click', function () {
        bigscreenPlayer.play();
        startControlsTimeOut();
      });

      pauseButton.addEventListener('click', function () {
        bigscreenPlayer.pause();
        startControlsTimeOut();
      });

      seekForwardButton.addEventListener('click', function () {
        bigscreenPlayer.setCurrentTime(bigscreenPlayer.getCurrentTime() + 10);
        startControlsTimeOut();
      });

      seekBackButton.addEventListener('click', function () {
        bigscreenPlayer.setCurrentTime(bigscreenPlayer.getCurrentTime() - 10);
        startControlsTimeOut();
      });

      seekToEndButton.addEventListener('click', function () {
        bigscreenPlayer.setCurrentTime(bigscreenPlayer.getDuration() - 10);
        startControlsTimeOut();
      });

      debugToolButton.addEventListener('click', function () {
        DebugTool.toggleVisibility();
        startControlsTimeOut();
      });

      bigscreenPlayer.registerForTimeUpdates(function (event) {
      });

      bigscreenPlayer.registerForStateChanges(function (event) {
        var state = 'EMPTY';
        switch (event.state) {
          case 0: state = 'STOPPED'; break;
          case 1: state = 'PAUSED'; break;
          case 2: state = 'PLAYING'; break;
          case 4: state = 'WAITING'; break;
          case 5: state = 'ENDED'; break;
          case 6: state = 'FATAL_ERROR'; break;
        }
        if (state === 'WAITING') {
          playbackElement.appendChild(playbackSpinner);
        } else {
          playbackElement.removeChild(playbackSpinner);
        }
      });
    }
477538
function(t) {

            var start = this.start;
            var control1 = this.controlPoint1;
            var control2 = this.controlPoint2;
            var end = this.end;

            // shortcuts for `t` values that are out of range
            if (t <= 0) {
                return {
                    startControlPoint1: start.clone(),
                    startControlPoint2: start.clone(),
                    divider: start.clone(),
                    dividerControlPoint1: control1.clone(),
                    dividerControlPoint2: control2.clone()
                };
            }

            if (t >= 1) {
                return {
                    startControlPoint1: control1.clone(),
                    startControlPoint2: control2.clone(),
                    divider: end.clone(),
                    dividerControlPoint1: end.clone(),
                    dividerControlPoint2: end.clone()
                };
            }

            var midpoint1 = (new Line(start, control1)).pointAt(t);
            var midpoint2 = (new Line(control1, control2)).pointAt(t);
            var midpoint3 = (new Line(control2, end)).pointAt(t);

            var subControl1 = (new Line(midpoint1, midpoint2)).pointAt(t);
            var subControl2 = (new Line(midpoint2, midpoint3)).pointAt(t);

            var divider = (new Line(subControl1, subControl2)).pointAt(t);

            var output = {
                startControlPoint1: midpoint1,
                startControlPoint2: subControl1,
                divider: divider,
                dividerControlPoint1: subControl2,
                dividerControlPoint2: midpoint3
            };

            return output;
        }
460269
def create
      @sub_tenant = MnoEnterprise::SubTenant.build(sub_tenant_params)
      if @sub_tenant.save
        render :show
      else
        render json: @sub_tenant.errors, status: :bad_request
      end
    end
613947
def createWidgets(self):
        #create the panels for the tabs
        PanelAssembly = wx.Panel(self.nb)
        boxAssembly = wx.BoxSizer(wx.VERTICAL)
        PanelAssembly.SetAutoLayout(True)
        PanelAssembly.SetSizer(boxAssembly)
        PanelAssembly.Layout()

        PanelEngine = wx.Panel(self.nb)
        boxEngine = wx.BoxSizer(wx.VERTICAL)
        PanelEngine.SetAutoLayout(True)
        PanelEngine.SetSizer(boxEngine)
        PanelEngine.Layout()

        PanelTakeoff = wx.Panel(self.nb)
        boxTakeoff = wx.BoxSizer(wx.VERTICAL)
        PanelTakeoff.SetAutoLayout(True)
        PanelTakeoff.SetSizer(boxTakeoff)
        PanelTakeoff.Layout()

        PanelCruise = wx.Panel(self.nb)
        boxCruise = wx.BoxSizer(wx.VERTICAL)
        PanelCruise.SetAutoLayout(True)
        PanelCruise.SetSizer(boxCruise)
        PanelCruise.Layout()

        PanelDrop = wx.Panel(self.nb)
        boxDrop = wx.BoxSizer(wx.VERTICAL)
        PanelDrop.SetAutoLayout(True)
        PanelDrop.SetSizer(boxDrop)
        PanelDrop.Layout()

        PanelLanding = wx.Panel(self.nb)
        boxLanding = wx.BoxSizer(wx.VERTICAL)
        PanelLanding.SetAutoLayout(True)
        PanelLanding.SetSizer(boxLanding)
        PanelLanding.Layout()

        PanelShutdown = wx.Panel(self.nb)
        boxShutdown = wx.BoxSizer(wx.VERTICAL)
        PanelShutdown.SetAutoLayout(True)
        PanelShutdown.SetSizer(boxShutdown)
        PanelShutdown.Layout()

        #add the data to the individual tabs

        ''''''
        for key in self.beforeAssemblyList:
            if self.beforeAssemblyList[key] == 0:
                disCheckBox = wx.CheckBox(PanelAssembly, wx.ID_ANY, key)
                disCheckBox.Enable(False)
                boxAssembly.Add(disCheckBox)
            if self.beforeAssemblyList[key] == 2:
                boxAssembly.Add(wx.CheckBox(PanelAssembly, wx.ID_ANY, key))

        self.AssemblyButton = wx.Button(PanelAssembly, wx.ID_ANY, "Close final hatches")
        boxAssembly.Add(self.AssemblyButton)

        '''before Engine Start checklist'''
        for key in self.beforeEngineList:
            if self.beforeEngineList[key] == 0:
                disCheckBox = wx.CheckBox(PanelEngine, wx.ID_ANY, key)
                disCheckBox.Enable(False)
                boxEngine.Add(disCheckBox)
            if self.beforeEngineList[key] == 2:
                boxEngine.Add(wx.CheckBox(PanelEngine, wx.ID_ANY, key))

        self.EngineButton = wx.Button(PanelEngine, wx.ID_ANY, "Ready for Engine start")
        boxEngine.Add(self.EngineButton)

        '''before takeoff checklist'''
        for key in self.beforeTakeoffList:
            if self.beforeTakeoffList[key] == 0:
                disCheckBox = wx.CheckBox(PanelTakeoff, wx.ID_ANY, key)
                disCheckBox.Enable(False)
                boxTakeoff.Add(disCheckBox)
            if self.beforeTakeoffList[key] == 2:
                boxTakeoff.Add(wx.CheckBox(PanelTakeoff, wx.ID_ANY, key))

        self.TakeoffButton = wx.Button(PanelTakeoff, wx.ID_ANY, "Ready for Takeoff")
        boxTakeoff.Add(self.TakeoffButton)

        '''before cruise/AUTO checklist'''
        for key in self.beforeCruiseList:
            if self.beforeCruiseList[key] == 0:
                disCheckBox = wx.CheckBox(PanelCruise, wx.ID_ANY, key)
                disCheckBox.Enable(False)
                boxCruise.Add(disCheckBox)
            if self.beforeCruiseList[key] == 2:
                boxCruise.Add(wx.CheckBox(PanelCruise, wx.ID_ANY, key))

        self.CruiseButton = wx.Button(PanelCruise, wx.ID_ANY, "Ready for Cruise/AUTO")
        boxCruise.Add(self.CruiseButton)

        '''before bottle drop checklist'''
        for key in self.bottleDropList:
            if self.bottleDropList[key] == 0:
                disCheckBox = wx.CheckBox(PanelDrop, wx.ID_ANY, key)
                disCheckBox.Enable(False)
                boxDrop.Add(disCheckBox)
            if self.bottleDropList[key] == 2:
                boxDrop.Add(wx.CheckBox(PanelDrop, wx.ID_ANY, key))

        self.DropButton = wx.Button(PanelDrop, wx.ID_ANY, "Ready for Bottle Drop")
        boxDrop.Add(self.DropButton)

        '''before landing checklist'''
        for key in self.beforeLandingList:
            if self.beforeLandingList[key] == 0:
                disCheckBox = wx.CheckBox(PanelLanding, wx.ID_ANY, key)
                disCheckBox.Enable(False)
                boxLanding.Add(disCheckBox)
            if self.beforeLandingList[key] == 2:
                boxLanding.Add(wx.CheckBox(PanelLanding, wx.ID_ANY, key))

        self.LandingButton = wx.Button(PanelLanding, wx.ID_ANY, "Ready for Landing")
        boxLanding.Add(self.LandingButton)

        '''before shutdown checklist'''
        for key in self.beforeShutdownList:
            if self.beforeShutdownList[key] == 0:
                disCheckBox = wx.CheckBox(PanelShutdown, wx.ID_ANY, key)
                disCheckBox.Enable(False)
                boxShutdown.Add(disCheckBox)
            if self.beforeShutdownList[key] == 2:
                boxShutdown.Add(wx.CheckBox(PanelShutdown, wx.ID_ANY, key))

        self.ShutdownButton = wx.Button(PanelShutdown, wx.ID_ANY, "Ready for Shutdown")
        boxShutdown.Add(self.ShutdownButton)

        #and add in the tabs
        self.nb.AddPage(PanelAssembly, "1. During Assembly")
        self.nb.AddPage(PanelEngine, "2. Before Engine Start")
        self.nb.AddPage(PanelTakeoff, "3. Before Takeoff")
        self.nb.AddPage(PanelCruise, "4. Before Cruise/AUTO")
        self.nb.AddPage(PanelDrop, "5. Before Bottle Drop")
        self.nb.AddPage(PanelLanding, "6. Before Landing")
        self.nb.AddPage(PanelShutdown, "7. Before Shutdown")
328829
private void createAddContactSubForm() {
		add(new WHeading(HeadingLevel.H3, "Add a new contact"));

		WButton addBtn = new WButton("Add");
		addBtn.setAction(new Action() {
			@Override
			public void execute(final ActionEvent event) {
				addNewContact();
			}
		});
		addBtn.setImage("/image/address-book-new.png");
		newNameField.setDefaultSubmitButton(addBtn);

		WContainer container = new WContainer();
		container.add(newNameField);
		container.add(addBtn);

		WFieldLayout layout = new WFieldLayout();
		add(layout);
		layout.addField("New contact name", container);
		add(new WAjaxControl(addBtn, new AjaxTarget[]{repeater, newNameField}));
	}