Validates if given button (usually checkbox) is checked. Use VisCheckBox to additionally support error border around it.
421455
public void checked (Button button, String errorMsg) {
		buttons.add(new CheckedButtonWrapper(button, true, errorMsg));
		button.addListener(changeListener);
		validate();
	}
269929
function checkMouse( mouse ) {
				that.debug.groupStart( 'CheckMouse' ); // %REMOVE_LINE%
				that.debug.startTimer(); // %REMOVE_LINE%

				that.mouse = mouse;
				that.trigger = null;

				checkMouseTimer = null;
				updateWindowSize( that );

				if ( checkMouseTimeoutPending 								//	-> There must be an event pending.
					&& !that.hiddenMode 									// 	-> Can't be in hidden mode.
					&& editor.focusManager.hasFocus 						// 	-> Editor must have focus.
					&& !that.line.mouseNear() 								// 	-> Mouse pointer can't be close to the box.
					&& ( that.element = elementFromMouse( that, true ) ) ) 	// 	-> There must be valid element.
				{
					// If trigger exists, and trigger is correct -> show the box.
					// Don't show the line if trigger is a descendant of some tabu-list element.
					if ( ( that.trigger = triggerEditable( that ) || triggerEdge( that ) || triggerExpand( that ) ) &&
						!isInTabu( that, that.trigger.upper || that.trigger.lower ) ) {
						that.line.attach().place();
					}

					// Otherwise remove the box
					else {
						that.trigger = null;
						that.line.detach();
					}

					that.debug.showTrigger( that.trigger ); // %REMOVE_LINE%
					that.debug.mousePos( mouse.y, that.element ); // %REMOVE_LINE%

					checkMouseTimeoutPending = false;
				}

				that.debug.stopTimer(); // %REMOVE_LINE%
				that.debug.groupEnd(); // %REMOVE_LINE%
			}
1259218
public void check() {
        getDispatcher().beforeCheck(this);
        
        RemoteWebElement e = (RemoteWebElement) getElement();
        while (!e.isSelected()) {
            e.click();
        }
        if (Config.getBoolConfigProperty(ConfigProperty.ENABLE_GUI_LOGGING)) {
            logUIAction(UIActions.CHECKED);
        }
        
        getDispatcher().afterCheck(this);
    }
504989
public boolean verifyChecked(final By checkboxBy) {
		WebElement element = driver.findElement(checkboxBy);

		if (element.isSelected()) {
			LOG.info("Checkbox: " + element + " is checked!");
			return true;
		}

		LOG.info("Checkbox: " + element + " is NOT checked!");
		return false;
	}
388619
public boolean isChecked() {

        boolean checked = false;

        if (view instanceof CompoundButton) {
            CompoundButton cb = (CompoundButton) view;
            checked = cb.isChecked();
        }

        return checked;
    }
42193
function validateElement(obj) {
        return typeof HTMLElement === 'object' ?
          obj instanceof window.HTMLElement :
          obj &&
          typeof obj === 'object' &&
          obj !== null &&
          obj.nodeType === 1 &&
          typeof obj.nodeName === 'string';
      }
1140131
def check_ok_button(self):
        """"""
        login = self.login.text()
        password = self.password.text()
        url = self.url.text()
        if self.layers.count() >= 1 and login and password and url:
            self.ok_button.setEnabled(True)
        else:
            self.ok_button.setEnabled(False)
1163311
public static boolean validate(Control control) {
        ValidationFacade facade = (ValidationFacade) control.getParent();
        for (ValidatorBase validator : facade.validators) {
            validator.setSrcControl(facade.controlProperty.get());
            validator.validate();
            if (validator.getHasErrors()) {
                facade.activeValidator.set(validator);
                control.pseudoClassStateChanged(PSEUDO_CLASS_ERROR, true);
                return false;
            }
        }
        control.pseudoClassStateChanged(PSEUDO_CLASS_ERROR, false);
        facade.activeValidator.set(null);
        return true;
    }
1178471
function (event) {
            // flag that avoids to trigger the user callback when browsing the checkbox list
            var avoidCallback = (this._hasFocus || this._keepFocus);
            this.$TextInput._dom_onfocus.call(this, event, true);
            if (this._cfg.onfocus && !avoidCallback) {
                this.evalCallback(this._cfg.onfocus);
            }
        }
586859
def _validate(self):
        
        checker = (self._check0, self._check1, self._check2, self._check3,
                   self._check4, self._check5)
        if not 0 <= self.field_type <= 5:
            raise NotImplementedError("unsupported widget type")
        if type(self.rect) is not Rect:
            raise ValueError("invalid rect")
        if self.rect.isInfinite or self.rect.isEmpty:
            raise ValueError("rect must be finite and not empty")
        if not self.field_name:
            raise ValueError("field name missing")

        if self.border_color:
            if not len(self.border_color) in range(1,5) or \
               type(self.border_color) not in (list, tuple):
               raise ValueError("border_color must be 1 - 4 floats")

        if self.fill_color:
            if not len(self.fill_color) in range(1,5) or \
               type(self.fill_color) not in (list, tuple):
               raise ValueError("fill_color must be 1 - 4 floats")

        if not self.text_color:
            self.text_color = (0, 0, 0)
        if not len(self.text_color) in range(1,5) or \
            type(self.text_color) not in (list, tuple):
            raise ValueError("text_color must be 1 - 4 floats")

        if not self.border_width:
            self.border_width = 0

        if not self.text_fontsize:
            self.text_fontsize = 0

        checker[self.field_type]()
368189
function isValidSelector(value) {
    "use strict";
    if (isString(value)) {
        try {
            // phantomjs env has a working document object, let's use it
            document.querySelector(value);
        } catch(e) {
            if ('name' in e && (e.name === 'SYNTAX_ERR' || e.name === 'SyntaxError')) {
                return false;
            }
        }
        return true;
    } else if (isObject(value)) {
        if (!value.hasOwnProperty('type')) {
            return false;
        }
        if (!value.hasOwnProperty('path')) {
            return false;
        }
        if (['css', 'xpath'].indexOf(value.type) === -1) {
            return false;
        }
        return true;
    }
    return false;
}
451984
private void checkAndEnableViewButton() {
		boolean enabled = true;
		enabled &= Desktop.isDesktopSupported();
		enabled &= txt_PubCert.getDocument().getLength() > MIN_CERT_LENGTH;
		bt_view.setEnabled(enabled);
	}
547863
public void setChecked(boolean checked) {

        m_button.setDown(checked);
        if (checked) {
            m_group.selectButton(this);
        } else {
            m_group.deselectButton();
        }
    }
734720
public void onClickCheckable(@NonNull View view, @NonNull CheckableViewHolder viewHolder) {
        if (isDir(viewHolder.file)) {
            goToDir(viewHolder.file);
        } else {
            onLongClickCheckable(view, viewHolder);
            if (singleClick) {
                onClickOk(view);
            }
        }
    }
74535
def setChecked(self, tocheck):
        
        layout = self.layout()
        for i in range(layout.count()):
            w = layout.itemAt(i).widget()
            if w.text() in tocheck:
                w.setChecked(True)
1313828
def check_checkbox(self, value):
    """"""
    check_box = find_field(world.browser, 'checkbox', value)
    assert check_box, "Cannot find checkbox '{}'.".format(value)
    if not check_box.is_selected():
        check_box.click()
523829
public void check()
    {
        //
        // Find the nearest @ControlInterface, which is where the relevant control checker
        // annotation will be found.
        //

        AptControlInterface mostDerived = (AptControlInterface) getMostDerivedInterface();
        if ( mostDerived == null )
            return;

        InterfaceDeclaration intfDecl = mostDerived._intfDecl;

        if ( intfDecl == null )
            return;

        AnnotationMirror controlMirror = null;

        for (AnnotationMirror annot : intfDecl.getAnnotationMirrors())
        {
            if (annot.getAnnotationType().getDeclaration().getQualifiedName().equals(
                    "org.apache.beehive.controls.api.bean.ControlInterface"))
            {
                controlMirror = annot;
                break;
            }
        }

        assert ( controlMirror != null ) : "Found a control interface that isn't annotated properly: " + intfDecl;

        AptAnnotationHelper controlAnnot = new AptAnnotationHelper(controlMirror);

        //
        // Read the name of the checker class from the @ControlInterface annotation,
        // dynamically load and run it.
        //

        DeclaredType checkerMirror = (DeclaredType)controlAnnot.getObjectValue("checker");
        if ( checkerMirror == null )
        {
            // try the deprecated 'checkerClass' attribute
            checkerMirror = (DeclaredType)controlAnnot.getObjectValue("checkerClass");
        }

        if ( checkerMirror != null && checkerMirror.getDeclaration() != null )
        {
            // TODO: optimize to not invoke default checker?
            String checkerName = checkerMirror.toString();

            try
            {
                ClassLoader loader = getExternalClassLoader();

                Class checkerClass = loader.loadClass( checkerName );
                if ( !ControlChecker.class.isAssignableFrom(checkerClass) )
                {
                    _ap.printError( intfDecl, "control.interface.illegal.checker", intfDecl.getSimpleName(), checkerName );
                }
                else
                {

                    Constructor ctor = checkerClass.getConstructor();

                    ControlChecker checker = (ControlChecker) ctor.newInstance();
                    CheckerAnnotationProcessorEnvironmentImpl ape =
                            new CheckerAnnotationProcessorEnvironmentImpl(_ap);
                    checker.check( _intfDecl, ape );
                }
            }
            catch ( Exception e ) {
                _ap.printError( intfDecl, "control.interface.checker.load.failed", intfDecl.getSimpleName(), checkerName );
            }
        }
    }