/src/main/java/com/googlecode/charts4j/Priority.java

http://charts4j.googlecode.com/ · Java · 67 lines · 14 code · 5 blank · 48 comment · 0 complexity · 4322a45af916339d2d3e2560259a451f MD5 · raw file

  1. /**
  2. *
  3. * The MIT License
  4. *
  5. * Copyright (c) 2011 the original author or authors.
  6. *
  7. * Permission is hereby granted, free of charge, to any person obtaining a copy
  8. * of this software and associated documentation files (the "Software"), to deal
  9. * in the Software without restriction, including without limitation the rights
  10. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  11. * copies of the Software, and to permit persons to whom the Software is
  12. * furnished to do so, subject to the following conditions:
  13. * The above copyright notice and this permission notice shall be included in
  14. * all copies or substantial portions of the Software.
  15. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  17. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  18. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  19. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  20. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  21. * THE SOFTWARE.
  22. */
  23. package com.googlecode.charts4j;
  24. /**
  25. * Determines the order in which the chart elements (ex: shape markers) are
  26. * drawn. LOW specifies the element is drawn before all other parts of the
  27. * chart. This means the element will be at least partially obscured if another
  28. * chart element is drawn in the same place. NORMAL is the default. HIGH
  29. * specifies the element is drawn on top of all other parts of the chart. This
  30. * means it will at least partially hide another chart elements if it is drawn
  31. * in the same place.
  32. *
  33. * @author Julien Chastang (julien.c.chastang at gmail dot com)
  34. */
  35. public enum Priority {
  36. /** Low priority. **/
  37. LOW(-1),
  38. /** Normal priority. **/
  39. NORMAL(0),
  40. /** High priority. **/
  41. HIGH(1);
  42. /** Number for the Google Chart API. **/
  43. private final int priority;
  44. /**
  45. * Constructor.
  46. *
  47. * @param priority
  48. * Number for the Google Chart API
  49. */
  50. Priority(final int priority) {
  51. this.priority = priority;
  52. }
  53. /**
  54. * {@inheritDoc}
  55. */
  56. @Override
  57. public String toString() {
  58. return priority + "";
  59. }
  60. }