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

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

public class SimulationFilterUtil
extends java.lang.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,java.lang.String> createFilterModel(java.util.List<java.lang.String> names)
          Create a new filter dialogModel for simulation
static java.util.List<java.lang.String> filterSimulation(FilterModel<SimulationProperties,java.lang.String> model)
          Open the filter simulation dialog and waits for user to accept a non empty filter result.
static java.util.List<java.lang.String> filterSimulation(java.util.List<java.lang.String> names)
          Open the filter simulation dialog and waits for user to accept a non empty filter result.
static java.lang.String selectSimulation(FilterModel<SimulationProperties,java.lang.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 java.lang.String selectSimulation(java.util.List<java.lang.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 java.lang.String selectSimulation(java.util.List<java.lang.String> names)
                                         throws java.text.ParseException,
                                                java.io.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:
java.text.ParseException - if problem while init dialogModel
java.io.IOException - todo

selectSimulation

public static java.lang.String selectSimulation(FilterModel<SimulationProperties,java.lang.String> model)
                                         throws java.text.ParseException,
                                                java.io.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:
java.text.ParseException - if problem while init dialogModel
java.io.IOException - todo

filterSimulation

public static java.util.List<java.lang.String> filterSimulation(java.util.List<java.lang.String> names)
                                                         throws java.text.ParseException,
                                                                java.io.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:
java.text.ParseException - if problem while init model
java.io.IOException - todo

filterSimulation

public static java.util.List<java.lang.String> filterSimulation(FilterModel<SimulationProperties,java.lang.String> model)
                                                         throws java.text.ParseException,
                                                                java.io.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:
java.text.ParseException - if problem while init model
java.io.IOException - todo

createFilterModel

public static FilterModel<SimulationProperties,java.lang.String> createFilterModel(java.util.List<java.lang.String> names)
                                                                            throws java.text.ParseException,
                                                                                   java.io.IOException
Create a new filter dialogModel for simulation

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


Copyright © 1999-2010 CodeLutin. All Rights Reserved.