JAL-3829 refactored FilterOption provider to the StructureChooserQuerySource implemen...
[jalview.git] / src / jalview / jbgui / FilterOption.java
diff --git a/src/jalview/jbgui/FilterOption.java b/src/jalview/jbgui/FilterOption.java
new file mode 100644 (file)
index 0000000..042df23
--- /dev/null
@@ -0,0 +1,86 @@
+package jalview.jbgui;
+
+/**
+ * This inner class provides the data model for the structure filter combo-box
+ * 
+ * @author tcnofoegbu
+ *
+ */
+public class FilterOption
+{
+  private String name;
+
+  private String value;
+
+  private String view;
+
+  private boolean addSeparatorAfter;
+
+  /**
+   * Model for structure filter option
+   * 
+   * @param name
+   *          - the name of the Option
+   * @param value
+   *          - the value of the option
+   * @param view
+   *          - the category of the filter option
+   * @param addSeparatorAfter
+   *          - if true, a horizontal separator is rendered immediately after
+   *          this filter option, otherwise
+   */
+  public FilterOption(String name, String value, String view,
+          boolean addSeparatorAfter)
+  {
+    this.name = name;
+    this.value = value;
+    this.view = view;
+    this.addSeparatorAfter = addSeparatorAfter;
+  }
+
+  public String getName()
+  {
+    return name;
+  }
+
+  public void setName(String name)
+  {
+    this.name = name;
+  }
+
+  public String getValue()
+  {
+    return value;
+  }
+
+  public void setValue(String value)
+  {
+    this.value = value;
+  }
+
+  public String getView()
+  {
+    return view;
+  }
+
+  public void setView(String view)
+  {
+    this.view = view;
+  }
+
+  @Override
+  public String toString()
+  {
+    return this.name;
+  }
+
+  public boolean isAddSeparatorAfter()
+  {
+    return addSeparatorAfter;
+  }
+
+  public void setAddSeparatorAfter(boolean addSeparatorAfter)
+  {
+    this.addSeparatorAfter = addSeparatorAfter;
+  }
+}
\ No newline at end of file