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.

Hyperlink.java 2.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /* ====================================================================
  2. Licensed to the Apache Software Foundation (ASF) under one or more
  3. contributor license agreements. See the NOTICE file distributed with
  4. this work for additional information regarding copyright ownership.
  5. The ASF licenses this file to You under the Apache License, Version 2.0
  6. (the "License"); you may not use this file except in compliance with
  7. the License. You may obtain a copy of the License at
  8. http://www.apache.org/licenses/LICENSE-2.0
  9. Unless required by applicable law or agreed to in writing, software
  10. distributed under the License is distributed on an "AS IS" BASIS,
  11. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. See the License for the specific language governing permissions and
  13. limitations under the License.
  14. ==================================================================== */
  15. package org.apache.poi.common.usermodel;
  16. /**
  17. * Represents a hyperlink.
  18. */
  19. public interface Hyperlink {
  20. /**
  21. * Link to an existing file or web page
  22. */
  23. public static final int LINK_URL = 1;
  24. /**
  25. * Link to a place in this document
  26. */
  27. public static final int LINK_DOCUMENT = 2;
  28. /**
  29. * Link to an E-mail address
  30. */
  31. public static final int LINK_EMAIL = 3;
  32. /**
  33. * Link to a file
  34. */
  35. public static final int LINK_FILE = 4;
  36. /**
  37. * Hyperlink address. Depending on the hyperlink type it can be URL, e-mail, path to a file, etc.
  38. *
  39. * @return the address of this hyperlink
  40. */
  41. public String getAddress();
  42. /**
  43. * Hyperlink address. Depending on the hyperlink type it can be URL, e-mail, path to a file, etc.
  44. *
  45. * @param address the address of this hyperlink
  46. */
  47. public void setAddress(String address);
  48. /**
  49. * Return text label for this hyperlink
  50. *
  51. * @return text to display
  52. */
  53. public String getLabel();
  54. /**
  55. * Sets text label for this hyperlink
  56. *
  57. * @param label text label for this hyperlink
  58. */
  59. public void setLabel(String label);
  60. /**
  61. * Return the type of this hyperlink
  62. *
  63. * @return the type of this hyperlink
  64. */
  65. public int getType();
  66. }