/plugins/JavaSideKick/tags/javasidekick-2-3-6/src/sidekick/java/options/MutableFilterOptions.java

#
Java | 128 lines | 75 code | 27 blank | 26 comment | 9 complexity | 7e9ec278aca8f832f5eefa452ce13137 MD5 | raw file

✨ Summary
  1. /*
  2. * MutableFilterOptions.java - Filter options for JBrowse
  3. *
  4. * Copyright (c) 1999-2001 George Latkiewicz, Andre Kaplan
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License
  8. * as published by the Free Software Foundation; either version 2
  9. * of the License, or any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  19. */
  20. package sidekick.java.options;
  21. /**
  22. * JBrowse Filter options
  23. * @author George Latkiewicz
  24. * @author Andre Kaplan
  25. * @version $Id: MutableFilterOptions.java 1029 2006-07-21 20:00:43Z daleanson $
  26. **/
  27. public class MutableFilterOptions implements FilterOptions
  28. {
  29. // Filter options (WHAT)
  30. private boolean showImports;
  31. private boolean showThrows;
  32. private boolean showFields;
  33. private boolean showVariables;
  34. private boolean showPrimitives;
  35. private boolean showInitializers;
  36. private boolean showGeneralizations;
  37. private int topLevelVisIndex = 0;
  38. private int memberVisIndex = 0;
  39. public boolean equals(Object o) {
  40. MutableFilterOptions fo = (MutableFilterOptions)o;
  41. return showImports == fo.getShowImports() &&
  42. showFields == fo.getShowFields() &&
  43. showThrows == fo.getShowThrows() &&
  44. showVariables == fo.getShowVariables() &&
  45. showPrimitives == fo.getShowPrimitives() &&
  46. showInitializers == fo.getShowInitializers() &&
  47. showGeneralizations == fo.getShowGeneralizations() &&
  48. topLevelVisIndex == fo.getTopLevelVisIndex() &&
  49. memberVisIndex == fo.getMemberVisIndex();
  50. }
  51. public final boolean getShowImports() { return showImports; }
  52. public final boolean getShowFields() { return showFields; }
  53. public final boolean getShowPrimitives() { return showPrimitives; }
  54. public final boolean getShowVariables() { return showVariables; }
  55. public final boolean getShowInitializers() {return showInitializers;}
  56. public final boolean getShowGeneralizations() { return showGeneralizations; }
  57. public final int getTopLevelVisIndex() { return topLevelVisIndex; }
  58. public final int getMemberVisIndex() { return memberVisIndex; }
  59. public final void setShowImports( boolean flag ) {
  60. showImports = flag;
  61. }
  62. public final void setShowFields(boolean flag) {
  63. showFields = flag;
  64. }
  65. public final void setShowVariables(boolean flag) {
  66. showVariables = flag;
  67. }
  68. public final void setShowPrimitives(boolean flag) {
  69. showPrimitives = flag;
  70. }
  71. public final void setShowInitializers(boolean flag) {
  72. showInitializers = flag;
  73. }
  74. public final void setShowGeneralizations(boolean flag) {
  75. showGeneralizations = flag;
  76. }
  77. public final boolean getShowThrows() {
  78. return showThrows;
  79. }
  80. public final void setShowThrows(boolean flag) {
  81. showThrows = flag;
  82. }
  83. public final void setTopLevelVisIndex(int level) {
  84. topLevelVisIndex = level;
  85. }
  86. public final void setMemberVisIndex(int level) {
  87. memberVisIndex = level;
  88. }
  89. public String toString() {
  90. return (
  91. "What to include:"
  92. + "\n\tshowFields = " + showFields
  93. + "\n\tshowVariables = " + showVariables
  94. + "\n\tshowPrimitives = " + showPrimitives
  95. + "\n\tshowInitializers = " + showInitializers
  96. + "\n\tshowGeneralizations = " + showGeneralizations
  97. + "\n\ttopLevelVisIndex = " + topLevelVisIndex
  98. + "\n\tmemberVisIndex = " + memberVisIndex
  99. );
  100. }
  101. }