Examples of disabled state. You should use {@link WSubordinateControl} to set and manage the disabled state
unless there is no facility for the user to enable a control.
353882
private void addDisabledExamples() {
		add(new WHeading(HeadingLevel.H2, "Disabled WCheckBoxSelect examples"));
		WFieldLayout layout = new WFieldLayout();
		add(layout);

		WCheckBoxSelect select = new WCheckBoxSelect("australian_state");
		select.setDisabled(true);
		layout.addField("Disabled with no default selection", select);

		add(new WHeading(HeadingLevel.H3, "Disabled with no selection and no frame"));
		select = new WCheckBoxSelect("australian_state");
		select.setDisabled(true);
		select.setFrameless(true);
		layout.addField("Disabled with no selection and no frame", select);
		select = new SelectWithSingleSelected("australian_state");
		select.setDisabled(true);
		layout.addField("Disabled with one selection", select);

		select = new SelectWithManySelected("australian_state");
		select.setDisabled(true);
		select.setButtonLayout(WCheckBoxSelect.LAYOUT_COLUMNS);
		select.setButtonColumns(3);
		layout.addField("Disabled with many selections and COLUMN layout", select);
	}
126595
private void buildControl() {
		buildControlPanel.reset();
		buildTargetPanel.reset();

		// Setup Trigger
		setupTrigger();

		// Create target
		SubordinateTarget target = setupTarget();

		// Create Actions
		com.github.bordertech.wcomponents.subordinate.Action trueAction;
		com.github.bordertech.wcomponents.subordinate.Action falseAction;

		switch ((ControlActionType) drpActionType.getSelected()) {
			case ENABLE_DISABLE:
				trueAction = new Enable(target);
				falseAction = new Disable(target);
				break;

			case SHOW_HIDE:
				trueAction = new Show(target);
				falseAction = new Hide(target);
				break;

			case MAN_OPT:
				trueAction = new Mandatory(target);
				falseAction = new Optional(target);
				break;

			case SHOWIN_HIDEIN:
				trueAction = new ShowInGroup(target, targetGroup);
				falseAction = new HideInGroup(target, targetGroup);
				break;

			case ENABLEIN_DISABLEIN:
				trueAction = new EnableInGroup(target, targetGroup);
				falseAction = new DisableInGroup(target, targetGroup);
				break;

			default:
				throw new SystemException("ControlAction type not valid");
		}

		// Create Condition
		Condition condition = createCondition();

		if (cbNot.isSelected()) {
			condition = new Not(condition);
		}

		// Create Rule
		Rule rule = new Rule(condition, trueAction, falseAction);

		// Create Subordinate
		WSubordinateControl control = new WSubordinateControl();
		control.addRule(rule);

		buildControlPanel.add(control);

		if (targetCollapsible.getDecoratedLabel() != null) {
			targetCollapsible.getDecoratedLabel().setTail(new WText(control.toString()));
		}

		control = new WSubordinateControl();
		rule = new Rule(new Equal(cbClientDisableTrigger, true), new Disable((SubordinateTarget) trigger), new Enable((SubordinateTarget) trigger));
		control.addRule(rule);
		buildControlPanel.add(control);
	}
581766
public void addControl(Control control) {
        if (controls == null) {
            controls = new FormData.Controls();
        }

        this.controls.add(control);
    }
698502
public static void setState(ParseState state) {

    if (state == null) {
      System.err.println("Null state found");
      Environment.logInfo("Null state found");
    }

    persData.setProperty(state.filename, state.firstLine + SEPARATOR + state.offset);
  }
619409
public void setEnabled(String enabled) {

        if (m_frozen) {
            throw new CmsRuntimeException(Messages.get().container(Messages.ERR_CONFIG_SUBSCRIPTIONMANAGER_FROZEN_0));
        }
        m_enabled = Boolean.valueOf(enabled).booleanValue();
    }
839906
public int setState(boolean state, boolean bDisplayOption, int iMoveMode)
    {       // Must be overidden
        m_bSetData = true;  // Make sure getNextConverter is called correctly (if it is called).
        int iErrorCode = super.setState(state, bDisplayOption, iMoveMode);
        m_bSetData = false;
        return iErrorCode;
    }
425089
public static void registerSubordinateControl(final String controlId) {
		UIContext uic = UIContextHolder.getCurrentPrimaryUIContext();
		if (uic == null) {
			throw new SystemException("No User Context available to register Subordinate Control.");
		}
		Set<String> controls = (Set<String>) uic.getFwkAttribute(SUBORDINATE_CONTROL_SESSION_KEY);
		if (controls == null) {
			controls = new HashSet<>();
			uic.setFwkAttribute(SUBORDINATE_CONTROL_SESSION_KEY, controls);
		}
		controls.add(controlId);
	}
763803
public void enableLocking() {
		if (validState) {
			throw new InvalidStateException();
		}
		if (Boolean.getBoolean(Constants.PROP_IO_LOCKING)) {
			useLock = false;
			log.info("Disabled Locking in System Property (" + Constants.PROP_IO_LOCKING + ")");
		} else {
			useLock = true;
			log.info("Enabled Locking");
		}
	}
687127
public void setState(final int state) throws RepositoryException
   {
      // Need privileges to manage repository.
      SecurityManager security = System.getSecurityManager();
      if (security != null)
      {
         security.checkPermission(JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION);
      }

      try
      {
         SecurityHelper.doPrivilegedExceptionAction(new PrivilegedExceptionAction<Void>()
         {
            public Void run() throws RepositoryException
            {
               switch (state)
               {
                  case ManageableRepository.ONLINE :
                     resume();
                     break;
                  case ManageableRepository.OFFLINE :
                     suspend();
                     break;
                  case ManageableRepository.SUSPENDED :
                     suspend();
                     break;
                  default :
                     return null;
               }
               return null;
            }
         });
      }
      catch (PrivilegedActionException e)
      {
         Throwable cause = e.getCause();
         if (cause instanceof RepositoryException)
         {
            throw new RepositoryException(cause);
         }
         else
         {
            throw new RuntimeException(cause);
         }
      }
   }
476578
public void setEnabled(boolean enabled) {

        if (m_frozen) {
            throw new CmsRuntimeException(Messages.get().container(Messages.ERR_CONFIG_SUBSCRIPTIONMANAGER_FROZEN_0));
        }
        m_enabled = enabled;
    }
453817
def setActiveState(self, active):
        
        st = DISABLED
        if active: st = NORMAL
        self.entry.configure(state=st)
        self.inputLabel.configure(state=st)
        self.promptLabel.configure(state=st)
838148
public void setDisabled(boolean disabled) {
		this.disabled = disabled;
		if (disabled) {
			handlerManager.fireEvent(new ToolbarActionDisabledEvent());
		} else {
			handlerManager.fireEvent(new ToolbarActionEnabledEvent());
		}
	}
285021
public void setDisabledClass(java.lang.String disabledClass) {
        getStateHelper().put(PropertyKeys.disabledClass, disabledClass);
    }
175777
public boolean isDisabled() {
		Boolean value = (Boolean) getStateHelper().eval(PropertyKeys.disabled, false);
		return (boolean) value;
	}
1293353
private void addReadOnlyExamples() {
		add(new WHeading(HeadingLevel.H3, "Read-only WRadioButtonSelect examples"));
		add(new ExplanatoryText("These examples all use the same list of options: the states and territories list from the editable examples above. "
				+ "When the readOnly state is specified only that option which is selected is output.\n"
				+ "Since no more than one option is able to be selected the layout and frame settings are ignored in the read only state."));

		WFieldLayout layout = new WFieldLayout();
		add(layout);

		WRadioButtonSelect select = new WRadioButtonSelect("australian_state");
		select.setReadOnly(true);
		layout.addField("Read only with no selection", select);

		select = new SelectWithSelection("australian_state");
		select.setReadOnly(true);
		layout.addField("Read only with selection", select);
	}
1227658
public int setState(boolean bState, boolean bDisplayOption, int iMoveMode)
    {
        int iFieldValue = (int)this.getValue();
        if (!m_bTrueIfMatch)
            bState = !bState; // Do opposite operation
        if (bState)
            iFieldValue |= (1 << m_iBitNumber);     // Set the bit
        else
            iFieldValue &= ~(1 << m_iBitNumber);    // Clear the bit
        return this.setValue(iFieldValue, bDisplayOption, iMoveMode);
    }
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.
	}