d52dbbf7305b00d1cacad7ace58854f0115a5ef4
[jalview.git] / src / jalview / jbgui / FilterOption.java
1 package jalview.jbgui;
2
3 import jalview.gui.structurechooser.StructureChooserQuerySource;
4 import jalview.gui.structurechooser.ThreeDBStructureChooserQuerySource;
5
6 /**
7  * This inner class provides the data model for the structure filter combo-box
8  * 
9  * @author tcnofoegbu
10  *
11  */
12 public class FilterOption
13 {
14   private String name;
15
16   private String value;
17
18   private String view;
19
20   private boolean addSeparatorAfter;
21   
22   private StructureChooserQuerySource querySource;
23
24   /**
25    * Model for structure filter option
26    * 
27    * @param name
28    *          - the name of the Option
29    * @param value
30    *          - the value of the option
31    * @param view
32    *          - the category of the filter option
33    * @param addSeparatorAfter
34    *          - if true, a horizontal separator is rendered immediately after
35    *          this filter option, otherwise
36    * @param structureChooserQuerySource - the query source that actions this filter
37    */
38   public FilterOption(String name, String value, String view,
39           boolean addSeparatorAfter, StructureChooserQuerySource structureChooserQuerySource)
40   {
41     this.name = name;
42     this.value = value;
43     this.view = view;
44     this.querySource=structureChooserQuerySource;
45     this.addSeparatorAfter = addSeparatorAfter;
46   }
47
48   public String getName()
49   {
50     return name;
51   }
52
53   public void setName(String name)
54   {
55     this.name = name;
56   }
57
58   public String getValue()
59   {
60     return value;
61   }
62
63   public void setValue(String value)
64   {
65     this.value = value;
66   }
67
68   public String getView()
69   {
70     return view;
71   }
72
73   public void setView(String view)
74   {
75     this.view = view;
76   }
77
78   @Override
79   public String toString()
80   {
81     return this.name;
82   }
83
84   public boolean isAddSeparatorAfter()
85   {
86     return addSeparatorAfter;
87   }
88
89   public void setAddSeparatorAfter(boolean addSeparatorAfter)
90   {
91     this.addSeparatorAfter = addSeparatorAfter;
92   }
93
94   public StructureChooserQuerySource getQuerySource()
95   {
96     return querySource;
97   }
98 }