Several button type property values are not allowed
11841
function isForbiddenType(sType) {
				var aTypes = [ButtonType.Up, ButtonType.Back, ButtonType.Unstyled];
				return aTypes.indexOf(sType) !== -1;
			}
497232
def _set_properties(self):
        """"""

        self.SetTitle("CSV Export")
        self.SetSize((600, 600))

        for button in [self.button_cancel, self.button_apply, self.button_ok]:
            button.SetMinSize((80, 28))
1019872
@SuppressWarnings("unchecked")
    void onItemClick(MouseEvents.ClickEvent event, Object itemId, Object propertyId) {

        if (!event.isCtrlKey() && !event.isShiftKey()) {

            if (event.getButton().equals(MouseButton.LEFT)) {
                setValue(null);
            }
            changeValueIfNotMultiSelect(itemId);
            // don't interfere with multi-selection using control key
            if (event.getButton().equals(MouseButton.RIGHT) || (propertyId == null)) {
                m_menu.removeAllItems();
                fillContextMenu((Set<Logger>)getValue());
                m_menu.openForTable(event, itemId, propertyId, this);
            }

        }
    }
1032627
@SuppressWarnings("unchecked")
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {
    java.awt.GridBagConstraints gridBagConstraints;

    labelTitle = new javax.swing.JLabel();
    textFieldSearchText = new javax.swing.JTextField();
    buttonPrev = new javax.swing.JButton();
    buttonNext = new javax.swing.JButton();
    labelClose = new javax.swing.JLabel();
    filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0));
    toggleButtonCaseSensitive = new javax.swing.JToggleButton();
    panelButtonsForMap = new javax.swing.JPanel();
    toggleButtonTopicText = new javax.swing.JToggleButton();
    toggleButtonNote = new javax.swing.JToggleButton();
    toggleButtonFile = new javax.swing.JToggleButton();
    toggleButtonURI = new javax.swing.JToggleButton();

    setLayout(new java.awt.GridBagLayout());

    labelTitle.setText("Find:");
    labelTitle.setFocusable(false);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 10.0;
    gridBagConstraints.insets = new java.awt.Insets(0, 16, 0, 8);
    add(labelTitle, gridBagConstraints);

    textFieldSearchText.setFocusTraversalPolicyProvider(true);
    textFieldSearchText.addKeyListener(new java.awt.event.KeyAdapter() {
      public void keyPressed(java.awt.event.KeyEvent evt) {
        textFieldSearchTextKeyPressed(evt);
      }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 16);
    add(textFieldSearchText, gridBagConstraints);

    buttonPrev.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/resultset_previous.png"))); // NOI18N
    buttonPrev.setToolTipText("Find previous (SHFT+ENTER)");
    buttonPrev.setFocusable(false);
    buttonPrev.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(java.awt.event.ActionEvent evt) {
        buttonPrevActionPerformed(evt);
      }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 10.0;
    add(buttonPrev, gridBagConstraints);

    buttonNext.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/resultset_next.png"))); // NOI18N
    buttonNext.setToolTipText("Find next (ENTER)");
    buttonNext.setFocusable(false);
    buttonNext.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(java.awt.event.ActionEvent evt) {
        buttonNextActionPerformed(evt);
      }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 10.0;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 16);
    add(buttonNext, gridBagConstraints);

    labelClose.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    labelClose.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/nimbusCloseFrame.png"))); // NOI18N
    labelClose.setToolTipText("Close search form (ESC)");
    labelClose.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    labelClose.setFocusable(false);
    labelClose.addMouseListener(new java.awt.event.MouseAdapter() {
      public void mouseClicked(java.awt.event.MouseEvent evt) {
        labelCloseMouseClicked(evt);
      }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 7;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 8);
    add(labelClose, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 6;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 100000.0;
    add(filler1, gridBagConstraints);

    toggleButtonCaseSensitive.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/find/case16.png"))); // NOI18N
    toggleButtonCaseSensitive.setToolTipText("Case sensitive mode");
    toggleButtonCaseSensitive.setFocusable(false);
    toggleButtonCaseSensitive.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(java.awt.event.ActionEvent evt) {
        toggleButtonCaseSensitiveActionPerformed(evt);
      }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 4;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 8);
    add(toggleButtonCaseSensitive, gridBagConstraints);

    panelButtonsForMap.setLayout(new java.awt.GridBagLayout());

    toggleButtonTopicText.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/find/text16.png"))); // NOI18N
    toggleButtonTopicText.setToolTipText("Find in topic title");
    toggleButtonTopicText.setFocusable(false);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    panelButtonsForMap.add(toggleButtonTopicText, gridBagConstraints);

    toggleButtonNote.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/find/note16.png"))); // NOI18N
    toggleButtonNote.setToolTipText("Find in topic notes");
    toggleButtonNote.setFocusable(false);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    panelButtonsForMap.add(toggleButtonNote, gridBagConstraints);

    toggleButtonFile.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/find/disk16.png"))); // NOI18N
    toggleButtonFile.setToolTipText("Find in file links");
    toggleButtonFile.setFocusable(false);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    panelButtonsForMap.add(toggleButtonFile, gridBagConstraints);

    toggleButtonURI.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/find/url16.png"))); // NOI18N
    toggleButtonURI.setToolTipText("Find in URI links");
    toggleButtonURI.setFocusable(false);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 3;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    panelButtonsForMap.add(toggleButtonURI, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 5;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    add(panelButtonsForMap, gridBagConstraints);
  }
972320
private void changeValueIfNotMultiSelect(Object itemId) {

        @SuppressWarnings("unchecked")
        Set<String> value = (Set<String>)getValue();
        if (value == null) {
            select(itemId);
        } else if (!value.contains(itemId)) {
            setValue(null);
            select(itemId);
        }
    }
590473
private void initButtons() {

        m_addButton.addChoice(
            m_attributeHandler.getWidgetService(),
            new CmsChoiceMenuEntryBean(m_attributeHandler.getAttributeName()),
            new AsyncCallback<CmsChoiceMenuEntryBean>() {

                public void onFailure(Throwable caught) {

                    // will not be called

                }

                public void onSuccess(CmsChoiceMenuEntryBean selectedEntry) {

                    // nothing to do
                }
            });
        m_addButton.addDomHandler(new ClickHandler() {

            public void onClick(ClickEvent event) {

                m_addButton.hide();
                addNewAttributeValue();
                event.preventDefault();
                event.stopPropagation();

            }
        }, ClickEvent.getType());

        m_editButton.setImageClass(I_CmsButton.PEN_SMALL);
        m_editButton.setButtonStyle(ButtonStyle.FONT_ICON, null);

        m_removeButton.setImageClass(I_CmsButton.CUT_SMALL);
        m_removeButton.setButtonStyle(ButtonStyle.FONT_ICON, null);

        m_upButton.setImageClass(I_CmsButton.EDIT_UP_SMALL);
        m_upButton.setButtonStyle(ButtonStyle.FONT_ICON, null);

        m_downButton.setImageClass(I_CmsButton.EDIT_DOWN_SMALL);
        m_downButton.setButtonStyle(ButtonStyle.FONT_ICON, null);

        if (CmsEditorBase.hasDictionary()) {
            String label = m_widgetService.getAttributeLabel(m_attributeHandler.getAttributeName());
            m_addButton.setTitle(CmsEditorBase.getMessageForKey(CmsEditorBase.GUI_VIEW_ADD_1, label));
            m_removeButton.setTitle(CmsEditorBase.getMessageForKey(CmsEditorBase.GUI_VIEW_DELETE_1, label));
            m_upButton.setTitle(CmsEditorBase.getMessageForKey(CmsEditorBase.GUI_VIEW_MOVE_UP_0));
            m_downButton.setTitle(CmsEditorBase.getMessageForKey(CmsEditorBase.GUI_VIEW_MOVE_DOWN_0));
            m_title = CmsEditorBase.getMessageForKey(CmsEditorBase.GUI_VIEW_EDIT_1, label);
            m_editButton.setTitle(m_title);
        }
    }
483045
def select button
      if button.is_a? String
        ;
      else
        button = button.value
      end
      set_value button
    end
668346
public void setControlValue(Object objValue)
    {
        m_converter.setData(objValue, false, Constants.SCREEN_MOVE);    // DO NOT! Display (will loop)

        for (int i = this.getComponentCount() - 1; i >= 0; i--)
        {
            JComponent component = (JComponent)this.getComponent(i);
            if ((i >= brgComponentsLinkedToConverter.length) || (brgComponentsLinkedToConverter[i]))
                this.setControlValue(objValue, component);
        }
    }
732609
def _set_properties(self):
        """"""

        title = _("CSV Import: {filepath}").format(filepath=self.csvfilename)
        self.SetTitle(title)
        self.SetSize((600, 600))

        for button in [self.button_cancel, self.button_ok]:
            button.SetMinSize((80, 28))
382400
private void setStyle(Button view) {
        final int textSize = styledAttributes.getInt(R.styleable.PinLock_keypadTextSize, 12);
        view.setTextSize(TypedValue.COMPLEX_UNIT_SP, textSize);

        final int color = styledAttributes.getColor(R.styleable.PinLock_keypadTextColor, Color.BLACK);
        view.setTextColor(color);

        final int background = styledAttributes
                .getResourceId(R.styleable.PinLock_keypadButtonShape, R.drawable.rectangle);
        view.setBackgroundResource(background);
    }
77083
function checkSelectPropTypes(props) {
  ReactControlledValuePropTypes.checkPropTypes('select', props, getCurrentFiberStackAddendum$4);

  for (var i = 0; i < valuePropNames.length; i++) {
    var propName = valuePropNames[i];
    if (props[propName] == null) {
      continue;
    }
    var isArray = Array.isArray(props[propName]);
    if (props.multiple && !isArray) {
      warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());
    } else if (!props.multiple && isArray) {
      warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum());
    }
  }
}
1257655
function checkSelectPropTypes(inst, props) {
  var owner = inst._currentElement._owner;
  LinkedValueUtils.checkPropTypes('select', props, owner);

  if (props.valueLink !== undefined && !didWarnValueLink) {
     false ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;
    didWarnValueLink = true;
  }

  for (var i = 0; i < valuePropNames.length; i++) {
    var propName = valuePropNames[i];
    if (props[propName] == null) {
      continue;
    }
    var isArray = Array.isArray(props[propName]);
    if (props.multiple && !isArray) {
       false ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;
    } else if (!props.multiple && isArray) {
       false ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;
    }
  }
}
1299036
function BindedField() {
    var object = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : mandatory("object");
    var property = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : mandatory("property");
    var parent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
    var fieldType = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "input";
    var allowedValues = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
    var hierarchy = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;

    _classCallCheck(this, BindedField);

    // constant
    var _this4 = _possibleConstructorReturn(this, (BindedField.__proto__ || Object.getPrototypeOf(BindedField)).call(this, object, property, hierarchy));

    _this4.VALID_FIELD_TYPE = ["input", "selector", "slider"];

    // field
    _this4.field = null;
    _this4.fieldType = fieldType;
    _this4.fieldHTML = null;
    _this4.allowedValues = allowedValues;
    _this4.tempClass = "binded-" + (typeof object === "undefined" ? "undefined" : _typeof(object)) + property;

    // parent
    _this4.parent = parent;

    // build the field html
    switch (_this4.fieldType) {
      case "input":
        _this4.fieldHTML = "<fieldset class=\"form-group\">" + "<label>" + property + "</label>" + "<input type=\"text\" class=\"form-control " + _this4.tempClass + "\" data-binded=\"" + property + "\">" + "</fieldset>";
        break;
      case "selector":
        if (!allowedValues) {
          throw new Error("fieldType selector needs at least one allowedValues");
        }

        _this4.fieldHTML = "<fieldset class=\"form-group\">" + "<label>" + property + "</label>" + "<select class=\"form-control " + _this4.tempClass + "\" data-binded=\"" + property + "\">";

        for (var i = 0; i < _this4.allowedValues.length; i++) {
          _this4.fieldHTML = _this4.fieldHTML + "<option value=\"" + _this4.allowedValues[i] + "\">" + _this4.allowedValues[i] + "</option>";
        }
        _this4.fieldHTML = _this4.fieldHTML + "</select></fieldset>";
        break;
      case "slider":
        break;
      default:
        throw new Error("fieldType is invalid : input, selector and slider are the only valid type for now");
    }

    if (parent) {
      _this4.placeInParent();
    }
    return _this4;
  }
660684
function BaseButton (props) {
  return (
    <button
      {...props}
      className={props.className}
      onClick={props.onClick}
      name={props.name}
      disabled={props.disabled}
      type='button'
      children={props.children}
    />
  )
}
896045
def __put_buttons_in_buttonframe(choices, default_choice, cancel_choice):
    
    global buttonsFrame, cancel_invoke

    # TODO: I'm using a dict to hold buttons, but this could all be cleaned up if I subclass Button to hold
    #      all the event bindings, etc
    # TODO: Break __buttonEvent out into three: regular keyboard, default
    # select, and cancel select.
    unique_choices = ut.uniquify_list_of_strings(choices)
    # Create buttons dictionary and Tkinter widgets
    buttons = dict()
    for button_text, unique_button_text in zip(choices, unique_choices):
        this_button = dict()
        this_button['original_text'] = button_text
        this_button['clean_text'], this_button[
            'hotkey'], hotkey_position = ut.parse_hotkey(button_text)
        this_button['widget'] = Button(buttonsFrame,
                                       takefocus=1,
                                       text=this_button['clean_text'],
                                       underline=hotkey_position)
        this_button['widget'].pack(
            expand=YES, side=LEFT, padx='1m', pady='1m', ipadx='2m', ipady='1m')
        buttons[unique_button_text] = this_button
    # Bind arrows, Enter, Escape
    for this_button in list(buttons.values()):
        bindArrows(this_button['widget'])
        for selectionEvent in st.STANDARD_SELECTION_EVENTS:
            this_button['widget'].bind("<{}>".format(selectionEvent),
                                       lambda e: __buttonEvent(
                                           e, buttons, virtual_event='select'),
                                       add=True)

    # Assign default and cancel buttons
    if cancel_choice in buttons:
        buttons[cancel_choice]['cancel_choice'] = True
    boxRoot.bind_all('<Escape>', lambda e: __buttonEvent(
        e, buttons, virtual_event='cancel'), add=True)
    boxRoot.protocol('WM_DELETE_WINDOW', lambda: __buttonEvent(
        None, buttons, virtual_event='cancel'))
    if default_choice in buttons:
        buttons[default_choice]['default_choice'] = True
        buttons[default_choice]['widget'].focus_force()
    # Bind hotkeys
    for hk in [button['hotkey'] for button in list(buttons.values()) if button['hotkey']]:
        boxRoot.bind_all(hk, lambda e: __buttonEvent(e, buttons), add=True)

    return
907620
private void setEnabledButtons() {
        int currentStep = getCurrentStep();
        if(currentStep < 0) {
           return;
        }
        
        boolean isPreviousEnabled = true;
        boolean isNextEnabled = true;
        
        if(getNextStep(currentStep) < 0 && currentStep != STEP_THANKS) {
            isNextEnabled = false;
        }

         if(getPreviousStep(currentStep) < 0) {
            isPreviousEnabled = false;
        }

        setIsControlEnable(previousButtonName, isPreviousEnabled);
        setIsControlEnable(nextButtonName, isNextEnabled);

        if(currentStep == STEP_OMISSIONS) {
            setControlText(nextButtonName, I18nLabelsLoader.REPORT_STEP_BUTTONS_SUBMIT);
            if(theCommunityLogic.hasBadInterventions() || theCommunityLogic.hasOmissions()) {
                setIsControlEnable(nextButtonName, true);
            } else {
                 setIsControlEnable(nextButtonName, false);
            }
            
        } else if (currentStep == STEP_THANKS) {
            setControlText(nextButtonName, I18nLabelsLoader.REPORT_STEP_BUTTONS_FINISH);
        } else {
            setControlText(nextButtonName, I18nLabelsLoader.REPORT_STEP_BUTTONS_NEXT);
        }

    }
1254674
function sanitizeProperties (custom_properties) {
  const properties = Object.assign({}, default_properties, custom_properties);

  // convert button keyword to associated number
  if (typeof properties.button === 'string') {
    properties.button = button_keywords[properties.button];
  }

  return properties;
}