// Path: src/main/java/generator/extenders/RandomiserPanel.java
// public abstract class RandomiserPanel extends JPanel implements IGeneratorPanel
// {
//     
//     
// }
// 
// Path: src/main/java/generator/extenders/RandomiserInstance.java
// public class RandomiserInstance
// {
//     //the name of the randomiser type to load
//     private String randomiserType; 
//     
//     //name and description are standard fields for all the user-defined cases.
//     private String name;       
//     private String description;
//     
//     //any object can be stored in the properties hashmap, however, it will be
//     //its String representation that will be saved in the XML file.
//     private LinkedHashMap properties;
//     
//     
//     public RandomiserInstance()
//     {        
//     }
//     
// 
//     public RandomiserInstance( String randomiserType,
//                                String name,
//                                String description,
//                                LinkedHashMap properties)
//     {
//         this.randomiserType = randomiserType;
//         this.name = name;
//         this.description = description;
//         this.properties = properties;
//     }
//     
//     
//     public String getRandomiserType()
//     {
//         return randomiserType;
//     }
// 
//     public void setRandomiserType(String randomiserType)
//     {
//         this.randomiserType = randomiserType;
//     }
// 
//     public String getName()
//     {
//         return name;
//     }
// 
//     public void setName(String name)
//     {
//         this.name = name;
//     }
// 
//     public String getDescription()
//     {
//         return description;
//     }
// 
//     public void setDescription(String description)
//     {
//         this.description = description;
//     }
// 
//     public LinkedHashMap getProperties()
//     {
//         return properties;
//     }
// 
//     public void setProperties(LinkedHashMap properties)
//     {
//         this.properties = properties;
//     }
// 
//     public String toString()
//     {
//         return name;        
//     }
// }


import javax.swing.JOptionPane;
import generator.extenders.RandomiserPanel;
import generator.extenders.RandomiserInstance;
import java.util.LinkedHashMap;

            {
                JOptionPane.showMessageDialog(this,"Please provide a numerical value for the seed.","Invalid field",JOptionPane.ERROR_MESSAGE);
                return false;
            }            
        }
        
        //run checks
        if(name.length()==0)
        {
            JOptionPane.showMessageDialog(this,"Please provide a value for the name.","Required field",JOptionPane.ERROR_MESSAGE);
            return false;
        }
        if( nullField<0 || nullField>100 )
        {
            JOptionPane.showMessageDialog(this,"Please provide a value in the range [0..100] for the Null field.","Invalid field",JOptionPane.ERROR_MESSAGE);
            return false;
        }
        return true;
    }
    
    public RandomiserInstance getRandomiserInstance()
    {
        String name, description, fnameSeed, lnameSeed;
        Integer nullField;
        LinkedHashMap hashMap = new LinkedHashMap();
        RandomiserInstance ri = new RandomiserInstance();
        
        //get field values
        name = txtName.getText().trim();
        description = txtDescription.getText().trim();

// Path: src/main/java/generator/extenders/RandomiserPanel.java
// public abstract class RandomiserPanel extends JPanel implements IGeneratorPanel
// {
//     
//     
// }
// 
// Path: src/main/java/generator/extenders/RandomiserInstance.java
// public class RandomiserInstance
// {
//     //the name of the randomiser type to load
//     private String randomiserType; 
//     
//     //name and description are standard fields for all the user-defined cases.
//     private String name;       
//     private String description;
//     
//     //any object can be stored in the properties hashmap, however, it will be
//     //its String representation that will be saved in the XML file.
//     private LinkedHashMap properties;
//     
//     
//     public RandomiserInstance()
//     {        
//     }
//     
// 
//     public RandomiserInstance( String randomiserType,
//                                String name,
//                                String description,
//                                LinkedHashMap properties)
//     {
//         this.randomiserType = randomiserType;
//         this.name = name;
//         this.description = description;
//         this.properties = properties;
//     }
//     
//     
//     public String getRandomiserType()
//     {
//         return randomiserType;
//     }
// 
//     public void setRandomiserType(String randomiserType)
//     {
//         this.randomiserType = randomiserType;
//     }
// 
//     public String getName()
//     {
//         return name;
//     }
// 
//     public void setName(String name)
//     {
//         this.name = name;
//     }
// 
//     public String getDescription()
//     {
//         return description;
//     }
// 
//     public void setDescription(String description)
//     {
//         this.description = description;
//     }
// 
//     public LinkedHashMap getProperties()
//     {
//         return properties;
//     }
// 
//     public void setProperties(LinkedHashMap properties)
//     {
//         this.properties = properties;
//     }
// 
//     public String toString()
//     {
//         return name;        
//     }
// }


// Path: src/main/java/generator/panels/PanelEmailRandomiser.java
import javax.swing.JOptionPane;
import generator.extenders.RandomiserPanel;
import generator.extenders.RandomiserInstance;
import java.util.LinkedHashMap;

            {
                JOptionPane.showMessageDialog(this,"Please provide a numerical value for the seed.","Invalid field",JOptionPane.ERROR_MESSAGE);
                return false;
            }            
        }
        
        //run checks
        if(name.length()==0)
        {
            JOptionPane.showMessageDialog(this,"Please provide a value for the name.","Required field",JOptionPane.ERROR_MESSAGE);
            return false;
        }
        if( nullField<0 || nullField>100 )
        {
            JOptionPane.showMessageDialog(this,"Please provide a value in the range [0..100] for the Null field.","Invalid field",JOptionPane.ERROR_MESSAGE);
            return false;
        }
        return true;
    }
    
    public RandomiserInstance getRandomiserInstance()
    {
        String name, description, fnameSeed, lnameSeed;
        Integer nullField;
        LinkedHashMap hashMap = new LinkedHashMap();
        RandomiserInstance ri = new RandomiserInstance();
        
        //get field values
        name = txtName.getText().trim();
        description = txtDescription.getText().trim();

        nullField = (Integer) spinNull.getModel().getValue();
