fr.ifremer.isisfish.ui.simulator.filter
Class SimulationFilterUtil

java.lang.Object
  extended by fr.ifremer.isisfish.ui.simulator.filter.SimulationFilterUtil

public class SimulationFilterUtil
extends Object

This class offers methods to select or filter simulation name via an ui

See Also:
selectSimulation(List), selectSimulation(FilterModel), filterSimulation(List), filterSimulation(FilterModel)

Constructor Summary
protected SimulationFilterUtil()
           
 
Method Summary
static FilterModel<SimulationProperties,String> createFilterModel(List<String> names)
          Create a new filter dialogModel for simulation
static List<String> filterSimulation(FilterModel<SimulationProperties,String> model)
          Open the filter simulation dialog and waits for user to accept a non empty filter result.
static List<String> filterSimulation(List<String> names)
          Open the filter simulation dialog and waits for user to accept a non empty filter result.
static String selectSimulation(FilterModel<SimulationProperties,String> model)
          Open the filter simulation filter dialog using directly a given FilterModel, and waits for user to select a simualtion in a non empty filter result.
static String selectSimulation(List<String> names)
          Open the filter simulation filter dialog using list of simualtion names to create FilterModel, and waits for user to select a simualtion in a non empty filter result.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimulationFilterUtil

protected SimulationFilterUtil()
Method Detail

selectSimulation

public static String selectSimulation(List<String> names)
                               throws ParseException,
                                      IOException
Open the filter simulation filter dialog using list of simualtion names to create FilterModel, and waits for user to select a simualtion in a non empty filter result.

If user cancels, it returns null

Parameters:
names - the list of simulation names to used
Returns:
name of the simulation choosed by user or null if it cancel operation
Throws:
ParseException - if problem while init dialogModel
IOException - todo

selectSimulation

public static String selectSimulation(FilterModel<SimulationProperties,String> model)
                               throws ParseException,
                                      IOException
Open the filter simulation filter dialog using directly a given FilterModel, and waits for user to select a simualtion in a non empty filter result.

Parameters:
model - model to used
Returns:
name of the simulation choosed by user or null if it cancel operation
Throws:
ParseException - if problem while init dialogModel
IOException - todo

filterSimulation

public static List<String> filterSimulation(List<String> names)
                                     throws ParseException,
                                            IOException
Open the filter simulation dialog and waits for user to accept a non empty filter result. It used a list of simulation names to create FilterModel.

If user cancels, it returns an empty list.

Parameters:
names - the list of simulation names to used
Returns:
list of simulation's names selected by user
Throws:
ParseException - if problem while init model
IOException - todo

filterSimulation

public static List<String> filterSimulation(FilterModel<SimulationProperties,String> model)
                                     throws ParseException,
                                            IOException
Open the filter simulation dialog and waits for user to accept a non empty filter result. It used directly the given FilterModel.

If user cancels, it returns the previous result list.

Parameters:
model - filterModel to use
Returns:
list of simulation's names selected by user
Throws:
ParseException - if problem while init model
IOException - todo

createFilterModel

public static FilterModel<SimulationProperties,String> createFilterModel(List<String> names)
                                                                  throws ParseException,
                                                                         IOException
Create a new filter dialogModel for simulation

Parameters:
names - list of simulation's names to use
Returns:
the filter dialogModel
Throws:
ParseException - if any problem while init dialogModel
IOException - todo


Copyright © 1999-2011 CodeLutin. All Rights Reserved.