Class StyledTextSeg


  • public class StyledTextSeg
    extends java.lang.Object
    Author:
    Group 3
    • Constructor Detail

      • StyledTextSeg

        public StyledTextSeg​(FontProps myStyle,
                             java.lang.String myWord)
        Constructor. Create styled segment of text.
        Parameters:
        myStyle - Text Style.
        myWord - Text to style.
    • Method Detail

      • setHRef

        public final void setHRef​(java.lang.String target,
                                  StyledTextSeg.REF_TYPE type)
        Set an href on this segment.
        Parameters:
        target - href target.
        type - href target type.
      • isHref

        public final java.lang.Boolean isHref()
        Is this an href?
        Returns:
        Boolean.
      • getRefTarget

        public final java.lang.String getRefTarget()
        Get ref target, if it exists. THIS CAN RETURN NULL! ALWAYS CHECK REF STATE FIRST.
        Returns:
        ref target. Will be null if not a ref.
      • getRefType

        public final StyledTextSeg.REF_TYPE getRefType()
        Get ref type, if it exists. THIS CAN RETURN NULL! ALWAYS CHECK REF STATE FIRST.
        Returns:
        ref type - internal or external. Will be null if not a ref.
      • getStyle

        public final FontProps getStyle()
        Get the style.
        Returns:
        FontProps.
      • getString

        public final java.lang.String getString()
        Get the text segment.
        Returns:
        String.