Class TranscriptStyleConstants
java.lang.Object
ca.phon.app.session.editor.view.transcript.TranscriptStyleConstants
Keys and methods for setting style attributes on
AttributeSets used in
TranscriptViews.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final StringAttribute key for setting the click handlerstatic final StringComment associated with textstatic final Stringstatic final StringAttribute 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.static final StringElement type for textstatic final Stringstatic final StringGem associated with textstatic final StringGeneric/header tier associated with textstatic final StringAttribute key for setting the label attributestatic final Stringstatic final StringAttribute key for setting media segmentstatic final StringAttribute key for setting the new paragraph attributestatic final StringAttribute key for setting ability to modify the text.static final StringSet the ability to traverse the text with the text caret.static final Stringstatic final StringParent tier - some tiers are dependent on other tiers considered their 'parent'.static final Stringstatic final StringRecord associated with textstatic final Stringstatic final StringTier associated with textstatic final Stringstatic final StringAttribute key for setting the underline on hover attributestatic final StringElement type for a blind transcription tierstatic final StringElement type for a commentstatic final StringElement type for a gemstatic final StringElement type for a generic/header tierstatic final StringElement type for a record/record tier -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BordergetBorder(AttributeSet attrs) static BiConsumer<MouseEvent, AttributeSet> getClickHandler(AttributeSet attrs) static CommentgetComment(AttributeSet attrs) Get the comment associated with the given attributesstatic ComponentFactorygetComponentFactory(AttributeSet attrs) Get the component factory associated with the given attributesstatic StringgetElementType(AttributeSet attrs) Get the element type associated with the given attributesstatic ActiongetEnterAction(AttributeSet attrs) static FontgetFont(AttributeSet attrs) static GemgetGem(AttributeSet attrs) Get the gem associated with the given attributesstatic Tier<?> getGenericTier(AttributeSet attrs) Get the generic tier associated with the given attributesstatic MediaSegmentgetMediaSegment(AttributeSet attrs) Get the media segment associated with the given attributesstatic Tier<?> getParentTier(AttributeSet attrs) Get the parent tier associated with the given attributesstatic RecordgetRecord(AttributeSet attrs) Get the record associated with the given attributesstatic Tier<?> getTier(AttributeSet attrs) Get the tier associated with the given attributesstatic StringgetTranscriber(AttributeSet attrs) static booleanisLabel(AttributeSet attrs) Get the label attributestatic booleanisLocked(MutableAttributeSet attrs) static booleanisNewParagraph(AttributeSet attrs) Get the new paragraph attributestatic booleanisNotEditable(AttributeSet attrs) Check if the text is not editablestatic booleanisNotTraversable(AttributeSet attrs) Check if the text is not traversablestatic booleanstatic booleanisUnderlineOnHover(AttributeSet attrs) static voidsetBorder(MutableAttributeSet attrs, Border border) static voidsetClickHandler(MutableAttributeSet attrs, BiConsumer<MouseEvent, AttributeSet> clickHandler) static voidsetComment(MutableAttributeSet attrs, Comment comment) Set the comment for the given attributesstatic voidsetCommentTier(MutableAttributeSet attrs, Tier<TierData> commentTier) static voidsetComponentFactory(MutableAttributeSet attrs, ComponentFactory factory) Set the component factory for the given attributesstatic voidsetElementType(MutableAttributeSet attrs, String elementType) Set the element type for the given attributesstatic voidsetEnterAction(MutableAttributeSet attrs, Action action) static voidsetGem(MutableAttributeSet attrs, Gem gem) Set the gem for the given attributesstatic voidsetGenericTier(MutableAttributeSet attrs, Tier<?> genericTier) Set the generic tier for the given attributesstatic voidsetLabel(MutableAttributeSet attrs, boolean label) Set the label attributestatic voidsetLocked(MutableAttributeSet attrs, boolean locked) static voidsetMediaSegment(MutableAttributeSet attrs, MediaSegment segment) Set the media segment for the given attributesstatic voidsetNewParagraph(MutableAttributeSet attrs, boolean newParagraph) Set the new paragraph attributestatic voidsetNotEditable(MutableAttributeSet attrs, boolean notEditable) Set the not editable attributestatic voidsetNotTraversable(MutableAttributeSet attrs, boolean notTraversable) Set the not traversable attributestatic voidsetNotTraversableSyllabification(MutableAttributeSet attrs, boolean notTraversableSyllabification) static voidsetParentTier(MutableAttributeSet attrs, Tier<?> parentTier) Set the parent tier for the given attributesstatic voidsetRecord(MutableAttributeSet attrs, Record record) Set the record for the given attributesstatic voidsetTier(MutableAttributeSet attrs, Tier<?> tier) Set the tier for the given attributesstatic voidsetTranscriber(MutableAttributeSet attrs, String transcriber) static voidsetUnderlineOnHover(MutableAttributeSet attrs, boolean clickable)
-
Field Details
-
ATTR_KEY_RECORD
-
ATTR_KEY_TIER
-
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
-
ATTR_KEY_GEM
-
ATTR_KEY_GENERIC_TIER
-
ATTR_KEY_ELEMENT_TYPE
-
ELEMENT_TYPE_RECORD
-
ELEMENT_TYPE_COMMENT
-
ELEMENT_TYPE_GEM
-
ELEMENT_TYPE_GENERIC
-
ELEMENT_TYPE_BLIND_TRANSCRIPTION
Element type for a blind transcription tier- See Also:
-
ATTR_KEY_NEW_PARAGRAPH
Attribute key for setting the new paragraph attribute- See Also:
-
ATTR_KEY_LABEL
-
ATTR_KEY_NOT_EDITABLE
Attribute key for setting ability to modify the text. If this attribute is set totruethe text will not be editable unless a custom filter is set.- See Also:
-
ATTR_KEY_NOT_TRAVERSABLE
Set the ability to traverse the text with the text caret. If this attribute is set totruethe text will not be traversable.- See Also:
-
ATTR_KEY_NOT_TRAVERSABLE_SYLLABIFICATION
- See Also:
-
ATTR_KEY_UNDERLINE_ON_HOVER
Attribute key for setting the underline on hover attribute- See Also:
-
ATTR_KEY_CLICK_HANDLER
Attribute key for setting the click handler- See Also:
-
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
-
ATTR_KEY_LOCKED
- See Also:
-
ATTR_KEY_SYLLABIFICATION
- See Also:
-
ATTR_KEY_PHONE
- See Also:
-
ATTR_KEY_COMMENT_TIER
- See Also:
-
ATTR_KEY_BLIND_TRANSCRIPTION
- See Also:
-
ATTR_KEY_TRANSCRIBER
- See Also:
-
ATTR_KEY_ENTER_ACTION
- See Also:
-
ATTR_KEY_BORDER
- See Also:
-
-
Constructor Details
-
TranscriptStyleConstants
public TranscriptStyleConstants()
-
-
Method Details
-
getRecord
Get the record associated with the given attributes- Parameters:
attrs- the attributes- Returns:
- the record or
nullif not set
-
setRecord
Set the record for the given attributes- Parameters:
attrs- the attributesrecord- the record
-
getTier
Get the tier associated with the given attributes- Parameters:
attrs- the attributes- Returns:
- the tier or
nullif not set
-
setTier
Set the tier for the given attributes- Parameters:
attrs- the attributestier- the tier
-
getParentTier
Get the parent tier associated with the given attributes- Parameters:
attrs- the attributes- Returns:
- the parent tier or
nullif not set
-
setParentTier
Set the parent tier for the given attributes- Parameters:
attrs- the attributesparentTier- the parent tier
-
getComment
Get the comment associated with the given attributes- Parameters:
attrs- the attributes- Returns:
- the comment or
nullif not set
-
setComment
Set the comment for the given attributes- Parameters:
attrs- the attributescomment- the comment
-
getGem
Get the gem associated with the given attributes- Parameters:
attrs-- Returns:
-
setGem
Set the gem for the given attributes- Parameters:
attrs-gem-
-
getGenericTier
Get the generic tier associated with the given attributes- Parameters:
attrs-- Returns:
-
setGenericTier
Set the generic tier for the given attributes- Parameters:
attrs-genericTier-
-
getElementType
Get the element type associated with the given attributes- Parameters:
attrs- the attributes- Returns:
- the element type or
nullif not set
-
setElementType
Set the element type for the given attributes- Parameters:
attrs- the attributeselementType- the element type
-
isNewParagraph
Get the new paragraph attribute- Parameters:
attrs- the attributes- Returns:
trueif the new paragraph attribute is set,falseotherwise
-
setNewParagraph
Set the new paragraph attribute- Parameters:
attrs- the attributesnewParagraph-trueto set the new paragraph attribute,falseto remove it
-
isLabel
Get the label attribute- Parameters:
attrs- the attributes- Returns:
trueif the label attribute is set,falseotherwise
-
setLabel
Set the label attribute- Parameters:
attrs- the attributeslabel-trueto set the label attribute,falseto remove it
-
isNotEditable
Check if the text is not editable- Parameters:
attrs- the attributes- Returns:
trueif the text is not editable,falseotherwise
-
setNotEditable
Set the not editable attribute- Parameters:
attrs- the attributesnotEditable-trueto set the not editable attribute,falseto remove it
-
isNotTraversable
Check if the text is not traversable- Parameters:
attrs- the attributes- Returns:
trueif the text is not traversable,falseotherwise
-
setNotTraversable
Set the not traversable attribute- Parameters:
attrs- the attributesnotTraversable-trueto set the not traversable attribute,falseto remove it
-
isNotTraversableSyllabification
-
setNotTraversableSyllabification
public static void setNotTraversableSyllabification(MutableAttributeSet attrs, boolean notTraversableSyllabification) -
isUnderlineOnHover
-
setUnderlineOnHover
-
getClickHandler
-
setClickHandler
public static void setClickHandler(MutableAttributeSet attrs, BiConsumer<MouseEvent, AttributeSet> clickHandler) -
getComponentFactory
Get the component factory associated with the given attributes- Parameters:
attrs- the attributes- Returns:
- the component factory or
nullif not set
-
setComponentFactory
Set the component factory for the given attributes- Parameters:
attrs- the attributesfactory- the component factory
-
getMediaSegment
Get the media segment associated with the given attributes- Parameters:
attrs- the attributes- Returns:
- the media segment or
nullif not set
-
setMediaSegment
Set the media segment for the given attributes- Parameters:
attrs- the attributessegment- the media segment
-
isLocked
-
setLocked
-
getCommentTier
-
setCommentTier
-
getTranscriber
-
setTranscriber
-
getEnterAction
-
setEnterAction
-
getBorder
-
setBorder
-
getFont
-