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.

PlaceholderDetails.java 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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.sl.usermodel;
  16. /**
  17. * Extended details about placholders
  18. *
  19. * @since POI 4.0.0
  20. */
  21. public interface PlaceholderDetails {
  22. enum PlaceholderSize {
  23. quarter, half, full;
  24. }
  25. Placeholder getPlaceholder();
  26. /**
  27. * Specifies that the corresponding shape should be represented by the generating application
  28. * as a placeholder. When a shape is considered a placeholder by the generating application
  29. * it can have special properties to alert the user that they may enter content into the shape.
  30. * Different types of placeholders are allowed and can be specified by using the placeholder
  31. * type attribute for this element
  32. *
  33. * @param placeholder The shape to use as placeholder or null if no placeholder should be set.
  34. */
  35. void setPlaceholder(Placeholder placeholder);
  36. boolean isVisible();
  37. void setVisible(boolean isVisible);
  38. PlaceholderSize getSize();
  39. void setSize(PlaceholderSize size);
  40. /**
  41. * If the placeholder shape or object stores text, this text is returned otherwise {@code null}.
  42. *
  43. * @return the text of the shape / placeholder
  44. *
  45. * @since POI 4.0.0
  46. */
  47. String getText();
  48. /**
  49. * If the placeholder shape or object stores text, the given text is stored otherwise this is a no-op.
  50. *
  51. * @param text the placeholder text
  52. *
  53. * @since POI 4.0.0
  54. */
  55. void setText(String text);
  56. }