CSSable.java 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. package de.tu_darmstadt.informatik.tk.scopviz.ui.css;
  2. import java.util.HashSet;
  3. public interface CSSable {
  4. /**
  5. * Adds a CSS class to the object. classes already added are ignored
  6. * silently. multiple classes can be separated by a '.' or ' '.
  7. *
  8. * @param c
  9. * the classes to add
  10. */
  11. public void addCSSClass(String c);
  12. /**
  13. * Removes a CSS class from the object. classes not part of the object are
  14. * ignored silently. multiple classes can be separated by a '.' or ' '.
  15. *
  16. * @param c
  17. * the classes to remove
  18. */
  19. public void removeCSSClass(String c);
  20. /**
  21. * Toggles a CSS class from the object. multiple classes can be separated by
  22. * a '.' or ' '.
  23. *
  24. * @param c
  25. * the classes to remove
  26. */
  27. public void toggleCSSClass(String c);
  28. /**
  29. * Checks whether the given classes are part of the object. multiple classes
  30. * can be separated by a '.' or ' '.
  31. *
  32. * @param c
  33. * the classes to check
  34. * @return return true if all classes are matched
  35. */
  36. public boolean hasCSSClass(String c);
  37. /**
  38. *
  39. * @return a Set of Strings containing all the previously added CSS classes
  40. */
  41. public HashSet<String> getClasses();
  42. /**
  43. *
  44. * @return the Type of the CSS Object
  45. */
  46. public String getType();
  47. /**
  48. * Updates the stored CSS String
  49. */
  50. public void updateCSS();
  51. /**
  52. *
  53. * @return the stored CSS String
  54. */
  55. public String getCSS();
  56. }