Class TranscriptStyleConstants

java.lang.Object
ca.phon.app.session.editor.view.transcript.TranscriptStyleConstants

public class TranscriptStyleConstants extends Object
Keys and methods for setting style attributes on AttributeSets used in TranscriptViews.
  • Field Details

    • ATTR_KEY_RECORD

      public static final String ATTR_KEY_RECORD
      Record associated with text
      See Also:
    • ATTR_KEY_TIER

      public static final String ATTR_KEY_TIER
      Tier associated with text
      See Also:
    • ATTR_KEY_PARENT_TIER

      public static final String ATTR_KEY_PARENT_TIER
      Parent tier - some tiers are dependent on other tiers considered their 'parent'. When a parent tier is moved or changed, the dependent tier should also be updated.
      See Also:
    • ATTR_KEY_COMMENT

      public static final String ATTR_KEY_COMMENT
      Comment associated with text
      See Also:
    • ATTR_KEY_GEM

      public static final String ATTR_KEY_GEM
      Gem associated with text
      See Also:
    • ATTR_KEY_GENERIC_TIER

      public static final String ATTR_KEY_GENERIC_TIER
      Generic/header tier associated with text
      See Also:
    • ATTR_KEY_ELEMENT_TYPE

      public static final String ATTR_KEY_ELEMENT_TYPE
      Element type for text
      See Also:
    • ELEMENT_TYPE_RECORD

      public static final String ELEMENT_TYPE_RECORD
      Element type for a record/record tier
      See Also:
    • ELEMENT_TYPE_COMMENT

      public static final String ELEMENT_TYPE_COMMENT
      Element type for a comment
      See Also:
    • ELEMENT_TYPE_GEM

      public static final String ELEMENT_TYPE_GEM
      Element type for a gem
      See Also:
    • ELEMENT_TYPE_GENERIC

      public static final String ELEMENT_TYPE_GENERIC
      Element type for a generic/header tier
      See Also:
    • ELEMENT_TYPE_BLIND_TRANSCRIPTION

      public static final String ELEMENT_TYPE_BLIND_TRANSCRIPTION
      Element type for a blind transcription tier
      See Also:
    • ATTR_KEY_NEW_PARAGRAPH

      public static final String ATTR_KEY_NEW_PARAGRAPH
      Attribute key for setting the new paragraph attribute
      See Also:
    • ATTR_KEY_LABEL

      public static final String ATTR_KEY_LABEL
      Attribute key for setting the label attribute
      See Also:
    • ATTR_KEY_NOT_EDITABLE

      public static final String ATTR_KEY_NOT_EDITABLE
      Attribute key for setting ability to modify the text. If this attribute is set to true the text will not be editable unless a custom filter is set.
      See Also:
    • ATTR_KEY_NOT_TRAVERSABLE

      public static final String ATTR_KEY_NOT_TRAVERSABLE
      Set the ability to traverse the text with the text caret. If this attribute is set to true the text will not be traversable.
      See Also:
    • ATTR_KEY_NOT_TRAVERSABLE_SYLLABIFICATION

      public static final String ATTR_KEY_NOT_TRAVERSABLE_SYLLABIFICATION
      See Also:
    • ATTR_KEY_UNDERLINE_ON_HOVER

      public static final String ATTR_KEY_UNDERLINE_ON_HOVER
      Attribute key for setting the underline on hover attribute
      See Also:
    • ATTR_KEY_CLICK_HANDLER

      public static final String ATTR_KEY_CLICK_HANDLER
      Attribute key for setting the click handler
      See Also:
    • ATTR_KEY_COMPONENT_FACTORY

      public static final String ATTR_KEY_COMPONENT_FACTORY
      Attribute key for setting the component factory for text components, the component factory will create a component for the given text which will be inserted in the view.
      See Also:
    • ATTR_KEY_MEDIA_SEGMENT

      public static final String ATTR_KEY_MEDIA_SEGMENT
      Attribute key for setting media segment
      See Also:
    • ATTR_KEY_LOCKED

      public static final String ATTR_KEY_LOCKED
      See Also:
    • ATTR_KEY_SYLLABIFICATION

      public static final String ATTR_KEY_SYLLABIFICATION
      See Also:
    • ATTR_KEY_PHONE

      public static final String ATTR_KEY_PHONE
      See Also:
    • ATTR_KEY_COMMENT_TIER

      public static final String ATTR_KEY_COMMENT_TIER
      See Also:
    • ATTR_KEY_BLIND_TRANSCRIPTION

      public static final String ATTR_KEY_BLIND_TRANSCRIPTION
      See Also:
    • ATTR_KEY_TRANSCRIBER

      public static final String ATTR_KEY_TRANSCRIBER
      See Also:
    • ATTR_KEY_ENTER_ACTION

      public static final String ATTR_KEY_ENTER_ACTION
      See Also:
    • ATTR_KEY_BORDER

      public static final String ATTR_KEY_BORDER
      See Also:
  • Constructor Details

    • TranscriptStyleConstants

      public TranscriptStyleConstants()
  • Method Details

    • getRecord

      public static Record getRecord(AttributeSet attrs)
      Get the record associated with the given attributes
      Parameters:
      attrs - the attributes
      Returns:
      the record or null if not set
    • setRecord

      public static void setRecord(MutableAttributeSet attrs, Record record)
      Set the record for the given attributes
      Parameters:
      attrs - the attributes
      record - the record
    • getTier

      public static Tier<?> getTier(AttributeSet attrs)
      Get the tier associated with the given attributes
      Parameters:
      attrs - the attributes
      Returns:
      the tier or null if not set
    • setTier

      public static void setTier(MutableAttributeSet attrs, Tier<?> tier)
      Set the tier for the given attributes
      Parameters:
      attrs - the attributes
      tier - the tier
    • getParentTier

      public static Tier<?> getParentTier(AttributeSet attrs)
      Get the parent tier associated with the given attributes
      Parameters:
      attrs - the attributes
      Returns:
      the parent tier or null if not set
    • setParentTier

      public static void setParentTier(MutableAttributeSet attrs, Tier<?> parentTier)
      Set the parent tier for the given attributes
      Parameters:
      attrs - the attributes
      parentTier - the parent tier
    • getComment

      public static Comment getComment(AttributeSet attrs)
      Get the comment associated with the given attributes
      Parameters:
      attrs - the attributes
      Returns:
      the comment or null if not set
    • setComment

      public static void setComment(MutableAttributeSet attrs, Comment comment)
      Set the comment for the given attributes
      Parameters:
      attrs - the attributes
      comment - the comment
    • getGem

      public static Gem getGem(AttributeSet attrs)
      Get the gem associated with the given attributes
      Parameters:
      attrs -
      Returns:
    • setGem

      public static void setGem(MutableAttributeSet attrs, Gem gem)
      Set the gem for the given attributes
      Parameters:
      attrs -
      gem -
    • getGenericTier

      public static Tier<?> getGenericTier(AttributeSet attrs)
      Get the generic tier associated with the given attributes
      Parameters:
      attrs -
      Returns:
    • setGenericTier

      public static void setGenericTier(MutableAttributeSet attrs, Tier<?> genericTier)
      Set the generic tier for the given attributes
      Parameters:
      attrs -
      genericTier -
    • getElementType

      public static String getElementType(AttributeSet attrs)
      Get the element type associated with the given attributes
      Parameters:
      attrs - the attributes
      Returns:
      the element type or null if not set
    • setElementType

      public static void setElementType(MutableAttributeSet attrs, String elementType)
      Set the element type for the given attributes
      Parameters:
      attrs - the attributes
      elementType - the element type
    • isNewParagraph

      public static boolean isNewParagraph(AttributeSet attrs)
      Get the new paragraph attribute
      Parameters:
      attrs - the attributes
      Returns:
      true if the new paragraph attribute is set, false otherwise
    • setNewParagraph

      public static void setNewParagraph(MutableAttributeSet attrs, boolean newParagraph)
      Set the new paragraph attribute
      Parameters:
      attrs - the attributes
      newParagraph - true to set the new paragraph attribute, false to remove it
    • isLabel

      public static boolean isLabel(AttributeSet attrs)
      Get the label attribute
      Parameters:
      attrs - the attributes
      Returns:
      true if the label attribute is set, false otherwise
    • setLabel

      public static void setLabel(MutableAttributeSet attrs, boolean label)
      Set the label attribute
      Parameters:
      attrs - the attributes
      label - true to set the label attribute, false to remove it
    • isNotEditable

      public static boolean isNotEditable(AttributeSet attrs)
      Check if the text is not editable
      Parameters:
      attrs - the attributes
      Returns:
      true if the text is not editable, false otherwise
    • setNotEditable

      public static void setNotEditable(MutableAttributeSet attrs, boolean notEditable)
      Set the not editable attribute
      Parameters:
      attrs - the attributes
      notEditable - true to set the not editable attribute, false to remove it
    • isNotTraversable

      public static boolean isNotTraversable(AttributeSet attrs)
      Check if the text is not traversable
      Parameters:
      attrs - the attributes
      Returns:
      true if the text is not traversable, false otherwise
    • setNotTraversable

      public static void setNotTraversable(MutableAttributeSet attrs, boolean notTraversable)
      Set the not traversable attribute
      Parameters:
      attrs - the attributes
      notTraversable - true to set the not traversable attribute, false to remove it
    • isNotTraversableSyllabification

      public static boolean isNotTraversableSyllabification(MutableAttributeSet attrs)
    • setNotTraversableSyllabification

      public static void setNotTraversableSyllabification(MutableAttributeSet attrs, boolean notTraversableSyllabification)
    • isUnderlineOnHover

      public static boolean isUnderlineOnHover(AttributeSet attrs)
    • setUnderlineOnHover

      public static void setUnderlineOnHover(MutableAttributeSet attrs, boolean clickable)
    • getClickHandler

      public static BiConsumer<MouseEvent,AttributeSet> getClickHandler(AttributeSet attrs)
    • setClickHandler

      public static void setClickHandler(MutableAttributeSet attrs, BiConsumer<MouseEvent,AttributeSet> clickHandler)
    • getComponentFactory

      public static ComponentFactory getComponentFactory(AttributeSet attrs)
      Get the component factory associated with the given attributes
      Parameters:
      attrs - the attributes
      Returns:
      the component factory or null if not set
    • setComponentFactory

      public static void setComponentFactory(MutableAttributeSet attrs, ComponentFactory factory)
      Set the component factory for the given attributes
      Parameters:
      attrs - the attributes
      factory - the component factory
    • getMediaSegment

      public static MediaSegment getMediaSegment(AttributeSet attrs)
      Get the media segment associated with the given attributes
      Parameters:
      attrs - the attributes
      Returns:
      the media segment or null if not set
    • setMediaSegment

      public static void setMediaSegment(MutableAttributeSet attrs, MediaSegment segment)
      Set the media segment for the given attributes
      Parameters:
      attrs - the attributes
      segment - the media segment
    • isLocked

      public static boolean isLocked(MutableAttributeSet attrs)
    • setLocked

      public static void setLocked(MutableAttributeSet attrs, boolean locked)
    • getCommentTier

      public static Tier<TierData> getCommentTier(MutableAttributeSet attrs)
    • setCommentTier

      public static void setCommentTier(MutableAttributeSet attrs, Tier<TierData> commentTier)
    • getTranscriber

      public static String getTranscriber(AttributeSet attrs)
    • setTranscriber

      public static void setTranscriber(MutableAttributeSet attrs, String transcriber)
    • getEnterAction

      public static Action getEnterAction(AttributeSet attrs)
    • setEnterAction

      public static void setEnterAction(MutableAttributeSet attrs, Action action)
    • getBorder

      public static Border getBorder(AttributeSet attrs)
    • setBorder

      public static void setBorder(MutableAttributeSet attrs, Border border)