Class TranscriptStyleConstants
java.lang.Object
ca.phon.app.session.editor.view.transcript.TranscriptStyleConstants
Keys and methods for setting style attributes on
AttributeSet
s used in
TranscriptView
s.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
Attribute key for setting the click handlerstatic final String
Comment associated with textstatic final String
static final String
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.static final String
Element type for textstatic final String
static final String
Gem associated with textstatic final String
Generic/header tier associated with textstatic final String
Attribute key for setting the label attributestatic final String
static final String
Attribute key for setting media segmentstatic final String
Attribute key for setting the new paragraph attributestatic final String
Attribute key for setting ability to modify the text.static final String
Set the ability to traverse the text with the text caret.static final String
static final String
Parent tier - some tiers are dependent on other tiers considered their 'parent'.static final String
static final String
Record associated with textstatic final String
static final String
Tier associated with textstatic final String
static final String
Attribute key for setting the underline on hover attributestatic final String
Element type for a blind transcription tierstatic final String
Element type for a commentstatic final String
Element type for a gemstatic final String
Element type for a generic/header tierstatic final String
Element type for a record/record tier -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Border
getBorder
(AttributeSet attrs) static BiConsumer
<MouseEvent, AttributeSet> getClickHandler
(AttributeSet attrs) static Comment
getComment
(AttributeSet attrs) Get the comment associated with the given attributesstatic ComponentFactory
getComponentFactory
(AttributeSet attrs) Get the component factory associated with the given attributesstatic String
getElementType
(AttributeSet attrs) Get the element type associated with the given attributesstatic Action
getEnterAction
(AttributeSet attrs) static Gem
getGem
(AttributeSet attrs) Get the gem associated with the given attributesstatic Tier
<?> getGenericTier
(AttributeSet attrs) Get the generic tier associated with the given attributesstatic MediaSegment
getMediaSegment
(AttributeSet attrs) Get the media segment associated with the given attributesstatic Tier
<?> getParentTier
(AttributeSet attrs) Get the parent tier associated with the given attributesstatic Record
getRecord
(AttributeSet attrs) Get the record associated with the given attributesstatic Tier
<?> getTier
(AttributeSet attrs) Get the tier associated with the given attributesstatic String
getTranscriber
(AttributeSet attrs) static boolean
isLabel
(AttributeSet attrs) Get the label attributestatic boolean
isLocked
(MutableAttributeSet attrs) static boolean
isNewParagraph
(AttributeSet attrs) Get the new paragraph attributestatic boolean
isNotEditable
(AttributeSet attrs) Check if the text is not editablestatic boolean
isNotTraversable
(AttributeSet attrs) Check if the text is not traversablestatic boolean
static boolean
isUnderlineOnHover
(AttributeSet attrs) static void
setBorder
(MutableAttributeSet attrs, Border border) static void
setClickHandler
(MutableAttributeSet attrs, BiConsumer<MouseEvent, AttributeSet> clickHandler) static void
setComment
(MutableAttributeSet attrs, Comment comment) Set the comment for the given attributesstatic void
setCommentTier
(MutableAttributeSet attrs, Tier<TierData> commentTier) static void
setComponentFactory
(MutableAttributeSet attrs, ComponentFactory factory) Set the component factory for the given attributesstatic void
setElementType
(MutableAttributeSet attrs, String elementType) Set the element type for the given attributesstatic void
setEnterAction
(MutableAttributeSet attrs, Action action) static void
setGem
(MutableAttributeSet attrs, Gem gem) Set the gem for the given attributesstatic void
setGenericTier
(MutableAttributeSet attrs, Tier<?> genericTier) Set the generic tier for the given attributesstatic void
setLabel
(MutableAttributeSet attrs, boolean label) Set the label attributestatic void
setLocked
(MutableAttributeSet attrs, boolean locked) static void
setMediaSegment
(MutableAttributeSet attrs, MediaSegment segment) Set the media segment for the given attributesstatic void
setNewParagraph
(MutableAttributeSet attrs, boolean newParagraph) Set the new paragraph attributestatic void
setNotEditable
(MutableAttributeSet attrs, boolean notEditable) Set the not editable attributestatic void
setNotTraversable
(MutableAttributeSet attrs, boolean notTraversable) Set the not traversable attributestatic void
setNotTraversableSyllabification
(MutableAttributeSet attrs, boolean notTraversableSyllabification) static void
setParentTier
(MutableAttributeSet attrs, Tier<?> parentTier) Set the parent tier for the given attributesstatic void
setRecord
(MutableAttributeSet attrs, Record record) Set the record for the given attributesstatic void
setTier
(MutableAttributeSet attrs, Tier<?> tier) Set the tier for the given attributesstatic void
setTranscriber
(MutableAttributeSet attrs, String transcriber) static void
setUnderlineOnHover
(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 totrue
the 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 totrue
the 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
null
if 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
null
if 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
null
if 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
null
if 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
null
if 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:
true
if the new paragraph attribute is set,false
otherwise
-
setNewParagraph
Set the new paragraph attribute- Parameters:
attrs
- the attributesnewParagraph
-true
to set the new paragraph attribute,false
to remove it
-
isLabel
Get the label attribute- Parameters:
attrs
- the attributes- Returns:
true
if the label attribute is set,false
otherwise
-
setLabel
Set the label attribute- Parameters:
attrs
- the attributeslabel
-true
to set the label attribute,false
to remove it
-
isNotEditable
Check if the text is not editable- Parameters:
attrs
- the attributes- Returns:
true
if the text is not editable,false
otherwise
-
setNotEditable
Set the not editable attribute- Parameters:
attrs
- the attributesnotEditable
-true
to set the not editable attribute,false
to remove it
-
isNotTraversable
Check if the text is not traversable- Parameters:
attrs
- the attributes- Returns:
true
if the text is not traversable,false
otherwise
-
setNotTraversable
Set the not traversable attribute- Parameters:
attrs
- the attributesnotTraversable
-true
to set the not traversable attribute,false
to 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
null
if 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
null
if 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
-