alters the possible entries in level_names combobox to give the user selections for which specimen interpretations to display in the logger
        @param: event -> the wx.COMBOBOXEVENT that triggered this function
425931
def on_select_high_level(self,event,called_by_parent=False):
        
        UPPER_LEVEL=self.level_box.GetValue()

        if UPPER_LEVEL=='sample':
            self.level_names.SetItems(self.parent.samples)
            self.level_names.SetStringSelection(self.parent.Data_hierarchy['sample_of_specimen'][self.parent.s])

        if UPPER_LEVEL=='site':
            self.level_names.SetItems(self.parent.sites)
            self.level_names.SetStringSelection(self.parent.Data_hierarchy['site_of_specimen'][self.parent.s])

        if UPPER_LEVEL=='location':
            self.level_names.SetItems(self.parent.locations)
            self.level_names.SetStringSelection(self.parent.Data_hierarchy['location_of_specimen'][self.parent.s])

        if UPPER_LEVEL=='study':
            self.level_names.SetItems(['this study'])
            self.level_names.SetStringSelection('this study')

        if not called_by_parent:
            self.parent.level_box.SetStringSelection(UPPER_LEVEL)
            self.parent.onSelect_high_level(event,True)

        self.on_select_level_name(event)
806692
def on_menu_previous_interpretation(self, event):
        
        save_current_specimen = self.s
        dlg = wx.FileDialog(
            self, message="choose a file in a pmagpy redo format",
            defaultDir=self.WD,
            defaultFile="thellier_GUI.redo",
            wildcard="*.redo",
            style=wx.FD_OPEN | wx.FD_CHANGE_DIR
        )
        if self.show_dlg(dlg) == wx.ID_OK:
            redo_file = dlg.GetPath()
            if self.test_mode:
                redo_file = "thellier_GUI.redo"
        else:
            redo_file = None
        dlg.Destroy()

        print("redo_file", redo_file)
        if redo_file:
            self.read_redo_file(redo_file)
108702
public void update(TestSuiteStartedEvent event) {
        if (isTitleAnnotationPresent()) {
            event.setTitle(getTitle());
        }

        if (isDescriptionAnnotationPresent()) {
            event.setDescription(getDescription());
        }

        if (isIssueAnnotationPresent()) {
            event.getLabels().add(createIssueLabel(getIssueKey()));
        }

        if (isIssuesAnnotationPresent()) {
            for (String issueKey : getIssueKeys()) {
                event.getLabels().add(createIssueLabel(issueKey));
            }
        }

        event.getLabels().addAll(getStoryLabels());
        event.getLabels().addAll(getFeatureLabels());
    }
619556
function (event) {
				this._sId = event.getParameter("arguments").sampleId;
				this._sEntityId = event.getParameter("arguments").entityId;

				this.byId("page").setBusy(true);
				this.getModel("appView").setProperty("/bHasMaster", false);

				ControlsInfo.loadData().then(this._loadSample.bind(this));
			}
153704
def showEvent(self, event):
        """"""
        selected = self.paramList.selectedIndexes()
        model = self.paramList.model()

        self.visibilityChanged.emit(1)
        if len(selected) > 0:
            # select the correct components in the StimulusView
            self.paramList.parameterChanged.emit(model.selection(selected[0]))
            self.hintRequested.emit('Select parameter to edit. \n\nParameter must have selected components in order to edit fields')
        elif model.rowCount() > 0:
            # just select first item
            self.paramList.selectRow(0)
            self.paramList.parameterChanged.emit(model.selection(model.index(0,0)))
            self.hintRequested.emit('Select parameter to edit. \n\nParameter must have selected components in order to edit fields')
        else:
            model.emptied.emit(True)
            self.hintRequested.emit('To add a parameter, Drag "Add" onto empty auto-parameter table')
517933
def select_combobox(values, combo_label)
      warn "[DEPRECATED] use netzke_find('#{combo_label}', 'combobox').select_values(values)"
      run_js <<-JS
      var values = #{values.split(/,\s*/)};
      #{ext_combo(combo_label)}

      var arr = new Array();
      for(var i=0; i < values.length; i++) {
        arr[i] = combo.findRecordByDisplay(values[i]);
      }
      combo.select(arr);
      if (combo.isExpanded) {
        combo.onTriggerClick();
        return true;
      };
    JS
    end
683657
public void onSelectLayer(LayerSelectedEvent event) {
		for (TreeNode node : tree.getAllNodes()) {
			if (node.getName().equals(event.getLayer().getLabel())) {
				selectedLayerTreeNode = (LayerTreeTreeNode) node;
				treeGrid.selectRecord(selectedLayerTreeNode);
				htmlSelectedLayer.setContents(I18nProvider.getLayerTree().activeLayer(
						selectedLayerTreeNode.getLayer().getLabel()));

				// Canvas[] toolStripMembers = toolStrip.getMembers();
				// updateButtonIconsAndStates(toolStripMembers);
			}
		}
	}
395375
private void cmdDuplicateMappingActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_duplicateMappingButtonActionPerformed
		Object[] currentSelection = mappingList.getSelectedValues();
		if (currentSelection == null) {
			JOptionPane.showMessageDialog(this, "No mappings have been selected", "ERROR", JOptionPane.ERROR_MESSAGE);
			return;
		}
		int confirm = JOptionPane.showConfirmDialog(
				this,
				"This will create copies of the selected mappings. \nNumber of mappings selected = "
				+ currentSelection.length + "\nContinue? ", 
				"Copy confirmation", 
				JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
		
		if (confirm == JOptionPane.NO_OPTION || confirm == JOptionPane.CANCEL_OPTION || confirm == JOptionPane.CLOSED_OPTION) {
			return;
		}
		OBDAModel controller = apic;
		URI current_srcuri = selectedSource.getSourceID();

		for (int i = 0; i < currentSelection.length; i++) {
			SQLPPTriplesMap mapping = (SQLPPTriplesMap) currentSelection[i];

			String id = mapping.getId();

			// Computing the next available ID
			int new_index = -1;
			for (int index = 0; index < 999999999; index++) {
				if (controller.indexOf(current_srcuri, id + "(" + index + ")") == -1) {
					new_index = index;
					break;
				}
			}
			String newId = id + "(" + new_index + ")";

			// inserting the new mapping
			try {

				SQLPPTriplesMap oldmapping = controller.getTriplesMap(id);
				SQLPPTriplesMap newmapping = new OntopNativeSQLPPTriplesMap(newId, oldmapping.getSourceQuery(),
                        oldmapping.getTargetAtoms());
				controller.addTriplesMap(current_srcuri, newmapping, false);

			} catch (DuplicateMappingException e) {
				JOptionPane.showMessageDialog(this, "Duplicate Mapping: " + newId);
				return;
			}
		}

	}
211648
function (event) {
            if (this.data.initialSource) {
                ariaUtilsJson.setValue(this.data, "initialSource", false);
                this.$refresh({
                    section : "controls"
                });
            }
            this.data.tplSrcEdit = event.target.getValue();
        }
265343
private void comboXActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_comboXActionPerformed
        if (visualizer == null) return;
        JComboBox cb = (JComboBox)evt.getSource();
        int dim = cb.getSelectedIndex();
        streamPanel0.setActiveXDim(dim);
        streamPanel1.setActiveXDim(dim);
        if(visualizer!=null)
            visualizer.redraw();
    }
1219452
void setUpOUComboBox(ComboBox combo) {

        combo.removeAllItems();
        try {
            if (m_site != null) {
                String siteOu = getSiteOU();
                combo.addItem(siteOu);
                combo.select(siteOu);
                combo.setEnabled(false);
            } else {
                combo.addItem("/");

                m_clonedCms.getRequestContext().setSiteRoot("");
                List<CmsOrganizationalUnit> ous = OpenCms.getOrgUnitManager().getOrganizationalUnits(
                    m_clonedCms,
                    "/",
                    true);

                for (CmsOrganizationalUnit ou : ous) {

                    if (ouIsOK(ou)) {
                        combo.addItem(ou.getName());
                    }

                }
                combo.select("/");
            }

        } catch (CmsException e) {
            LOG.error("Error on reading OUs", e);
        }
        combo.setNullSelectionAllowed(false);
        combo.setTextInputAllowed(true);
        combo.setFilteringMode(FilteringMode.CONTAINS);
        combo.setNewItemsAllowed(false);

    }
12696
private void addColumnSelectExample() {
		add(new WHeading(HeadingLevel.H3, "WCheckBoxSelect laid out in columns"));
		add(new ExplanatoryText("Setting the layout to COLUMN will make the check boxes be rendered in 'n' columns. The number of columns is"
				+ " determined by the layoutColumnCount property."));
		final WCheckBoxSelect select = new WCheckBoxSelect("australian_state");
		select.setToolTip("Make a selection");
		select.setButtonLayout(WCheckBoxSelect.LAYOUT_COLUMNS);
		select.setButtonColumns(2);
		add(select);

		add(new WHeading(HeadingLevel.H3, "Options equal to columns"));
		String[] options = new String[]{"Dog", "Cat", "Bird"};
		final WCheckBoxSelect select2 = new WCheckBoxSelect(options);
		select2.setToolTip("Animals");
		select2.setButtonColumns(3);
		final WTextField text = new WTextField();
		text.setReadOnly(true);
		text.setText(NO_SELECTION);

		WButton update = new WButton("Select Animals");
		update.setAction(new Action() {
			@Override
			public void execute(final ActionEvent event) {
				String output = select2.getSelected().isEmpty() ? NO_SELECTION : "The selected animals are: "
						+ select2.getSelected();
				text.setText(output);
			}
		});
		select2.setDefaultSubmitButton(update);

		add(select2);
		add(update);
		add(text);
		add(new WAjaxControl(update, text));
	}
892599
def update_combobox(self):
        """"""
        index = self.current_scheme_index
        self.schemes_combobox.blockSignals(True)
        names = self.get_option("names")
        try:
            names.pop(names.index(u'Custom'))
        except ValueError:
            pass
        custom_names = self.get_option("custom_names", [])

        # Useful for retrieving the actual data
        for n in names + custom_names:
            self.scheme_choices_dict[self.get_option('{0}/name'.format(n))] = n

        if custom_names:
            choices = names + [None] + custom_names
        else:
            choices = names

        combobox = self.schemes_combobox
        combobox.clear()

        for name in choices:
            if name is None:
                continue
            combobox.addItem(self.get_option('{0}/name'.format(name)), name)

        if custom_names:
            combobox.insertSeparator(len(names))

        self.schemes_combobox.blockSignals(False)
        self.schemes_combobox.setCurrentIndex(index)
795193
@Override
	public void actionPerformed(ActionEvent event) {

		Object mysource = event.getSource();

		if ( ! (mysource instanceof JComboBox )) {
			super.actionPerformed(event);
			return;
		}

		@SuppressWarnings("unchecked")
		JComboBox<String> source = (JComboBox<String>) event.getSource();
		String value = source.getSelectedItem().toString();
		evalString("save selection; ");

		String selectLigand = "select ligand;wireframe 0.16;spacefill 0.5; color cpk ;";

		if ( value.equals("Cartoon")){
			String script = "hide null; select all;  spacefill off; wireframe off; backbone off;" +
					" cartoon on; " +
					" select ligand; wireframe 0.16;spacefill 0.5; color cpk; " +
					" select *.FE; spacefill 0.7; color cpk ; " +
					" select *.CU; spacefill 0.7; color cpk ; " +
					" select *.ZN; spacefill 0.7; color cpk ; " +
					" select all; ";
			this.executeCmd(script);
		} else if (value.equals("Backbone")){
			String script = "hide null; select all; spacefill off; wireframe off; backbone 0.4;" +
					" cartoon off; " +
					" select ligand; wireframe 0.16;spacefill 0.5; color cpk; " +
					" select *.FE; spacefill 0.7; color cpk ; " +
					" select *.CU; spacefill 0.7; color cpk ; " +
					" select *.ZN; spacefill 0.7; color cpk ; " +
					" select all; ";
			this.executeCmd(script);
		} else if (value.equals("CPK")){
			String script = "hide null; select all; spacefill off; wireframe off; backbone off;" +
					" cartoon off; cpk on;" +
					" select ligand; wireframe 0.16;spacefill 0.5; color cpk; " +
					" select *.FE; spacefill 0.7; color cpk ; " +
					" select *.CU; spacefill 0.7; color cpk ; " +
					" select *.ZN; spacefill 0.7; color cpk ; " +
					" select all; ";
			this.executeCmd(script);

		} else if (value.equals("Ligands")){
			this.executeCmd("restrict ligand; cartoon off; wireframe on;  display selected;");
		} else if (value.equals("Ligands and Pocket")){
			this.executeCmd(" select within (6.0,ligand); cartoon off; wireframe on; backbone off; display selected; ");
		} else if ( value.equals("Ball and Stick")){
			String script = "hide null; restrict not water;  wireframe 0.2; spacefill 25%;" +
					" cartoon off; backbone off; " +
					" select ligand; wireframe 0.16; spacefill 0.5; color cpk; " +
					" select *.FE; spacefill 0.7; color cpk ; " +
					" select *.CU; spacefill 0.7; color cpk ; " +
					" select *.ZN; spacefill 0.7; color cpk ; " +
					" select all; ";
			this.executeCmd(script);
		} else if ( value.equals("By Chain")){
			jmolColorByChain();
			String script = "hide null; select all;set defaultColors Jmol; color_by_chain(\"cartoon\"); color_by_chain(\"\"); " + selectLigand + "; select all; ";
			this.executeCmd(script);
		} else if ( value.equals("Rainbow")) {
			this.executeCmd("hide null; select all; set defaultColors Jmol; color group; color cartoon group; " + selectLigand + "; select all; " );
		} else if ( value.equals("Secondary Structure")){
			this.executeCmd("hide null; select all; set defaultColors Jmol; color structure; color cartoon structure;" + selectLigand + "; select all; " );

		} else if ( value.equals("By Element")){
			this.executeCmd("hide null; select all; set defaultColors Jmol; color cpk; color cartoon cpk; " + selectLigand + "; select all; ");
		} else if ( value.equals("By Amino Acid")){
			this.executeCmd("hide null; select all; set defaultColors Jmol; color amino; color cartoon amino; " + selectLigand + "; select all; " );
		} else if ( value.equals("Hydrophobicity") ){
			this.executeCmd("hide null; set defaultColors Jmol; select hydrophobic; color red; color cartoon red; select not hydrophobic ; color blue ; color cartoon blue; "+ selectLigand+"; select all; ");
		} else if ( value.equals("Suggest Domains")){
			colorByPDP();
		} else if ( value.equals("Show SCOP Domains")){
			colorBySCOP();
		}
		evalString("restore selection; ");
	}
547256
private void chkSameAsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkSameAsActionPerformed
        preference.put(OntopOBDASettings.SAME_AS, String.valueOf(chkSameAs.isSelected()));

    }
510871
@UiHandler("m_workflowSelector")
    protected void onWorkflowChange(ValueChangeEvent<String> event) {

        if (m_initialized) {
            m_publishDialog.setWorkflowId(event.getValue());
            // check for workflow project
            if (!m_publishDialog.getSelectedWorkflow().getId().equals(event.getValue())) {
                m_publishDialog.setProjectId(new CmsUUID(event.getValue()));
                m_projectSelector.setEnabled(false);
            } else {
                m_projectSelector.setEnabled(true);
                m_publishDialog.setProjectId(new CmsUUID(m_projectSelector.getFormValueAsString()));
            }
            m_actions = m_publishDialog.getSelectedWorkflow().getActions();
            m_publishDialog.updateResourceList();
        }
    }
1312497
def _comboBoxActivated(self, index, comboBox=None):
        
        if comboBox is None:
            comboBox = self.sender()
        assert comboBox, "comboBox not defined and not the sender"

        blocked = self.blockChildrenSignals(True)

        # If one of the other combo boxes has the same value, set it to the fake dimension
        curDimIdx = self._comboBoxDimensionIndex(comboBox)
        if curDimIdx < FAKE_DIM_OFFSET:
            otherComboBoxes = [cb for cb in self._comboBoxes if cb is not comboBox]
            for otherComboBox in otherComboBoxes:
                if otherComboBox.currentIndex() == comboBox.currentIndex():
                    #newIdx = otherComboBox.findData(FAKE_DIM_IDX)
                    #otherComboBox.setCurrentIndex(newIdx)
                    otherComboBox.setCurrentIndex(0) # Fake dimension is always the first

        # Show only spin boxes that are not selected
        row = 0
        self._deleteSpinBoxes(row)
        self._createSpinBoxes(row)
        self._updateRtiInfo()

        self.blockChildrenSignals(blocked)

        logger.debug("{} sigContentsChanged signal (comboBox)"
                      .format("Blocked" if self.signalsBlocked() else "Emitting"))
        self.sigContentsChanged.emit(UpdateReason.COLLECTOR_COMBO_BOX)