org.apache.poi.hslf.model.textproperties

## Class TextProp

- java.lang.Object
- - org.apache.poi.hslf.model.textproperties.TextProp

- All Implemented Interfaces:
    Duplicatable, GenericRecord
  Direct Known Subclasses:
    BitMaskTextProp, FontAlignmentProp, HSLFTabStopPropCollection, TextAlignmentProp

      public class TextProp
      extends java.lang.Object
      implements Duplicatable, GenericRecord

  Definition of a property of some text, or its paragraph. Defines how to find out if it's present (via the mask on the paragraph or character "contains" header field), how long the value of it is, and how to get and set the value. As the exact form of these (such as mask value, size of data block etc) is different for StyleTextProps and TxMasterTextProps, the definitions of the standard TextProps is stored in the different record classes

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TextProp(int sizeOfDataBlock, int maskInHeader, java.lang.String propName)` Generate the definition of a given type of text property.
    `TextProp(TextProp other)` Clones the property

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `TextProp` | `clone()` Deprecated.
    `TextProp` | `copy()` Clone, eg when you want to actually make use of one of these.
    `boolean` | `equals(java.lang.Object obj)`
    `java.util.Map<java.lang.String,java.util.function.Supplier<?>>` | `getGenericProperties()`
    `int` | `getMask()` Mask in the paragraph or character "contains" header field that indicates that this text property is present.
    `java.lang.String` | `getName()` Name of the text property
    `int` | `getSize()` Size of the data section of the text property (2 or 4 bytes)
    `int` | `getValue()` Fetch the value of the text property (meaning is specific to each different kind of text property)
    `int` | `getWriteMask()` Get the mask that's used at write time.
    `int` | `hashCode()`
    `void` | `setValue(int val)` Set the value of the text property.
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.apache.poi.common.usermodel.GenericRecord

      `getGenericChildren, getGenericRecordType`

- - ### Constructor Detail

    - #### TextProp

          public TextProp(int sizeOfDataBlock,
                          int maskInHeader,
                          java.lang.String propName)

      Generate the definition of a given type of text property.

    - #### TextProp

          public TextProp(TextProp other)

      Clones the property

  - ### Method Detail

    - #### getName

          public java.lang.String getName()

      Name of the text property

    - #### getSize

          public int getSize()

      Size of the data section of the text property (2 or 4 bytes)

    - #### getMask

          public int getMask()

      Mask in the paragraph or character "contains" header field that indicates that this text property is present.

    - #### getWriteMask

          public int getWriteMask()

      Get the mask that's used at write time. Only differs from the result of getMask() for the mask based properties

    - #### getValue

          public int getValue()

      Fetch the value of the text property (meaning is specific to each different kind of text property)

    - #### setValue

          public void setValue(int val)

      Set the value of the text property.

    - #### clone

          @Deprecated
           @Removal(version="5.0.0")
          public TextProp clone()

      Deprecated.
      Overrides:
        `clone` in class `java.lang.Object`

    - #### copy

          public TextProp copy()

      Clone, eg when you want to actually make use of one of these.
      Specified by:
        `copy` in interface `Duplicatable`
      Returns:
        a deep copy of the implementing class / instance

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### equals

          public boolean equals(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### getGenericProperties

          public java.util.Map<java.lang.String,java.util.function.Supplier<?>> getGenericProperties()

      Specified by:
        `getGenericProperties` in interface `GenericRecord`

Copyright 2020 The Apache Software Foundation or its licensors, as applicable.