Package g3.project.graphics
Class StyledTextSeg
- java.lang.Object
-
- g3.project.graphics.StyledTextSeg
-
public class StyledTextSeg extends java.lang.Object
- Author:
- Group 3
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
StyledTextSeg.REF_TYPE
Enumerator for use with refs.
-
Constructor Summary
Constructors Constructor Description StyledTextSeg(FontProps myStyle, java.lang.String myWord)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getRefTarget()
Get ref target, if it exists.StyledTextSeg.REF_TYPE
getRefType()
Get ref type, if it exists.java.lang.String
getString()
Get the text segment.FontProps
getStyle()
Get the style.java.lang.Boolean
isHref()
Is this an href?void
setHRef(java.lang.String target, StyledTextSeg.REF_TYPE type)
Set an href on this segment.
-
-
-
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.
-
-