You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

License.java 2.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. /*
  2. *
  3. * Copyright (c) 2006-2010 Chris Smith, Shane Mc Cormack, Gregory Holmes
  4. *
  5. * Permission is hereby granted, free of charge, to any person obtaining a copy
  6. * of this software and associated documentation files (the "Software"), to deal
  7. * in the Software without restriction, including without limitation the rights
  8. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  9. * copies of the Software, and to permit persons to whom the Software is
  10. * furnished to do so, subject to the following conditions:
  11. *
  12. * The above copyright notice and this permission notice shall be included in
  13. * all copies or substantial portions of the Software.
  14. *
  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 THE
  21. * SOFTWARE.
  22. */
  23. package com.dmdirc.addons.ui_swing.dialogs.about;
  24. /**
  25. * Simple class to describe a license.
  26. */
  27. public class License {
  28. private String name;
  29. private String component;
  30. private String body;
  31. /**
  32. * Instantiates a new license with the specified attributes.
  33. *
  34. * @param name Name of the license
  35. * @param component Component the license applies to
  36. * @param body Body of the license
  37. */
  38. public License(final String name, final String component, final String body) {
  39. this.name = name;
  40. this.component = component;
  41. this.body = body;
  42. }
  43. /**
  44. * Get the value of body.
  45. *
  46. * @return the value of body
  47. */
  48. public String getBody() {
  49. return body;
  50. }
  51. /**
  52. * Set the value of body.
  53. *
  54. * @param body new value of body
  55. */
  56. public void setBody(final String body) {
  57. this.body = body;
  58. }
  59. /**
  60. * Get the value of component.
  61. *
  62. * @return the value of component
  63. */
  64. public String getComponent() {
  65. return component;
  66. }
  67. /**
  68. * Set the value of component.
  69. *
  70. * @param component new value of component
  71. */
  72. public void setComponent(final String component) {
  73. this.component = component;
  74. }
  75. /**
  76. * Get the value of name.
  77. *
  78. * @return the value of name
  79. */
  80. public String getName() {
  81. return name;
  82. }
  83. /**
  84. * Set the value of name.
  85. *
  86. * @param name new value of name
  87. */
  88. public void setName(final String name) {
  89. this.name = name;
  90. }
  91. /** {@inheritDoc} */
  92. @Override
  93. public String toString() {
  94. return getComponent();
  95. }
  96. }