Package net.sf.mzmine.parameters

Examples of net.sf.mzmine.parameters.UserParameter


  private int getPeakCount(PeakListRow row, String groupingParameter) {
    if (groupingParameter.contains("Filtering by ")) {
      HashMap<String, Integer> groups = new HashMap<String, Integer>();
      for (RawDataFile file : MZmineCore.getCurrentProject()
          .getDataFiles()) {
        UserParameter params[] = MZmineCore.getCurrentProject()
            .getParameters();
        for (UserParameter p : params) {
          groupingParameter = groupingParameter.replace(
              "Filtering by ", "");
          if (groupingParameter.equals(p.getName())) {
View Full Code Here


    if (coloringType.isByParameter()) {
      // Group files with same parameter value to same group
      MZmineProject project = MZmineCore.getCurrentProject();
      Vector<Object> availableParameterValues = new Vector<Object>();
      UserParameter selectedParameter = coloringType.getParameter();
      for (RawDataFile rawDataFile : selectedRawDataFiles) {
        Object paramValue = project.getParameterValue(
            selectedParameter, rawDataFile);
        if (!availableParameterValues.contains(paramValue))
          availableParameterValues.add(paramValue);
View Full Code Here

  @Override
  public void parametersChanged() {

    // Get the current value of the "Sample parameter" combo
    UserParameter currentParameterSelection = (UserParameter) selDataCombo
        .getSelectedItem();
    if (currentParameterSelection == null)
      return;

    // If the value has changed, update the "Reference group" combo
View Full Code Here

  @Override
  public ExitCode showSetupDialog() {

    // Update the parameter choices
    UserParameter newChoices[] = MZmineCore.getCurrentProject()
        .getParameters();
    getParameter(HeatMapParameters.selectionData).setChoices(newChoices);
    if (newChoices.length > 0) {
      ArrayList<Object> values = new ArrayList<Object>();
      for (RawDataFile dataFile : MZmineCore.getCurrentProject()
View Full Code Here

    // Create labels and components for each parameter
    for (Parameter p : parameterSet.getParameters()) {

      if (!(p instanceof UserParameter))
        continue;
      UserParameter up = (UserParameter) p;

      JComponent comp = up.createEditingComponent();
      comp.setToolTipText(up.getDescription());

      // Set the initial value
      Object value = up.getValue();
      if (value != null)
        up.setValueToComponent(comp, value);

      // Add listeners so we are notified about any change in the values
      addListenersToComponent(comp);

      // By calling this we make sure the components will never be resized
      // smaller than their optimal size
      comp.setMinimumSize(comp.getPreferredSize());

      comp.setToolTipText(up.getDescription());

      JLabel label = new JLabel(p.getName());
      mainPanel.add(label, 0, rowCounter);
      label.setLabelFor(comp);
View Full Code Here

  @SuppressWarnings("unchecked")
  protected void updateParameterSetFromComponents() {
    for (Parameter p : parameterSet.getParameters()) {
      if (!(p instanceof UserParameter))
        continue;
      UserParameter up = (UserParameter) p;
      JComponent component = parametersAndComponents.get(p.getName());
      up.setValueFromComponent(component);
    }
  }
View Full Code Here

TOP

Related Classes of net.sf.mzmine.parameters.UserParameter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.