All Downloads are FREE. Search and download functionalities are using the official Maven repository.

us.ihmc.simulationconstructionset.gui.config.GraphConfigurationList Maven / Gradle / Ivy

There is a newer version: 0.25.2
Show newest version
package us.ihmc.simulationconstructionset.gui.config;

import java.util.ArrayList;

import us.ihmc.simulationconstructionset.GraphConfiguration;

public class GraphConfigurationList
{
   private ArrayList configs = new ArrayList<>();

   public GraphConfigurationList()
   {
      addGraphConfiguration(GraphConfiguration.getStandardAutoScalingConfiguration());
   }

   public void addGraphConfiguration(GraphConfiguration config)
   {
      configs.add(config);
   }

   public String[] getGraphConfigurationNames()
   {
      int n = configs.size();
      String[] ret = new String[n];

      for (int i = 0; i < n; i++)
      {
         ret[i] = (configs.get(i)).getName();
      }

      return ret;
   }

   public GraphConfiguration getGraphConfiguration(String name)
   {
      int n = configs.size();

      for (int i = 0; i < n; i++)
      {
         GraphConfiguration config = (configs.get(i));

         if (config.getName().equals(name))
            return config;
      }

      return null;
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy