Class TranscriptDocument
java.lang.Object
javax.swing.text.AbstractDocument
javax.swing.text.DefaultStyledDocument
ca.phon.app.session.editor.view.transcript.TranscriptDocument
- All Implemented Interfaces:
IExtendable
,Serializable
,Document
,StyledDocument
Text document for a
Session
that displays the transcript including all tiers, comments, and gems.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
A wrapper record for a list ofLanguage
static final record
A wrapper record for a start and end indexNested classes/interfaces inherited from class javax.swing.text.DefaultStyledDocument
DefaultStyledDocument.AttributeUndoableEdit, DefaultStyledDocument.ElementBuffer, DefaultStyledDocument.ElementSpec, DefaultStyledDocument.SectionElement
Nested classes/interfaces inherited from class javax.swing.text.AbstractDocument
AbstractDocument.AbstractElement, AbstractDocument.AttributeContext, AbstractDocument.BranchElement, AbstractDocument.Content, AbstractDocument.DefaultDocumentEvent, AbstractDocument.ElementEdit, AbstractDocument.LeafElement
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic int
Header tier transcript element indexstatic int
Transcript element index not foundFields inherited from class javax.swing.text.DefaultStyledDocument
buffer, BUFFER_SIZE_DEFAULT
Fields inherited from class javax.swing.text.AbstractDocument
BAD_LOCATION, BidiElementName, ContentElementName, ElementNameAttribute, listenerList, ParagraphElementName, SectionElementName
Fields inherited from interface javax.swing.text.Document
StreamDescriptionProperty, TitleProperty
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addComment
(Comment comment, int transcriptElementIndex) Adds a comment to the document and the transcript at the given transcript element indexvoid
addDocumentPropertyChangeListener
(String propertyName, PropertyChangeListener propertyChangeListener) Adds a property change listener that responds to changes in the document property with the given key / namevoid
void
void
addNotEditableAttribute
(String attributeKey) Adds the given attribute to the set of "not editable" attributesvoid
Adds a record to the documentvoid
Insert tier at given tier view index for all records using the provided suppliercharPosToSessionLocation
(int charPos) Converts a character position in the document into aTranscriptElementLocation
objectboolean
Checks if the provided attribute set contains any attributes that are currently considered "not editable"void
deleteRecord
(int elementIndex, int recordIndex, Record removedRecord) Removes a record from the documentvoid
deleteTranscriptElement
(int elementIndex, Transcript.Element elem) Deletes a given transcript element from the documentint
findLastParagraphElementIndexForTier
(int elementIndex, String tierName) Find final paragraph index for tier including dependent tiers.int
findParagraphElementIndexForSessionElementIndex
(int sessionElementIndex) Binary search for the first paragraph element index for the given session element indexint
findParagraphElementIndexForTier
(int elementIndex, String tierName) Find paragraph element index for given tiergetCharAtPos
(int pos) Gets the character at the specified position in the documentint
getCommentContentEnd
(Comment comment) Gets the end position of the specified commentint
getCommentContentStart
(Comment comment) Gets the start position of the specified commentgetCommentContentStartEnd
(Comment comment) Return the range for the given comment contentint
getCommentEnd
(Comment comment) Gets the end position of the specified commentgetCommentLabelStartEnd
(Comment comment) Gets the start/end position of the specified comment labelint
getCommentStart
(Comment comment) Get the start position of the specified comment including labelgetCommentStartEnd
(Comment comment) Return string range for given commentGets the object associated with a given key from the document propertiesgetDocumentPropertyOrDefault
(String key, Object defaultValue) Gets the object associated with a given key from the document properties and returns a given default value if none is present<T> T
getExtension
(Class<T> cap) Get the requested extension if available.Return all extension types supportedint
getGemContentEnd
(Gem gem) Gets the end position of the specified gemint
getGemContentStart
(Gem gem) Gets the start position of the specified gemgetGemContentStartEnd
(Gem gem) Get the range for the given gem's contentint
Gets the end position of the specified gemgetGemLabelStartEnd
(Gem gem) Return string range for given gem labelint
getGemStart
(Gem gem) Gets the start position of the specified gemgetGemStartEnd
(Gem gem) Return string range for given gemint
getGenericContentEnd
(Tier<?> genericTier) Gets the end position of the specified "generic tier"int
getGenericContentStart
(Tier<?> genericTier) Gets the start position of the specified "generic tier"int
getGenericContentStart
(String genericTierName) Gets the start position of the "generic tier" with the specified namegetGenericContentStartEnd
(Tier<?> genericTier) Get the range of the given generic tier content (header tier)getGenericContentStartEnd
(String genericTierName) Get the range of the given generic tier content (header tier)int
getGenericEnd
(Tier<?> genericTier) Gets the end position of the specified "generic tier"int
getGenericEnd
(String genericTierName) Gets the end position of the "generic tier" with the specified nameint
getGenericStart
(Tier<?> genericTier) Gets the start position of the "generic tier" with the specified nameint
getGenericStart
(String genericTierName) Gets the start position of the "generic tier" with the specified namegetGenericStartEnd
(Tier<?> genericTier) Get the range of the given generic tier (header tier)getGenericStartEnd
(String genericTierName) Get the range of the given generic tier (header tier)int
getOffsetInContent
(int pos) Gets the offset from the preceding label of a given position in the documentgetParagraphAttributes
(int paragraphIdx) getRangeForSessionElementIndex
(int sessionElementIndex) Return the range for the given transcript element indexint
getRecordElementIndex
(int position) Gets the element index of the record containing the specified positionint
getRecordEnd
(int recordIndex) Gets the end position of the record at the specified indexint
getRecordEnd
(Record record) Gets the end position of the specified recordint
getRecordIndex
(int position) Gets the index of the record containing the specified positionint
getRecordStart
(int recordIndex) Gets the start of the record with the specified indexint
getRecordStart
(Record record) Gets the start position of the given recordgetRecordStartEnd
(int recordIndex) Return the range of the given recordIndexgetRecordStartEnd
(Record record) Return string range for given recordgetSegmentBounds
(MediaSegment segment, int includedPos) Gets a record containing the start and end of a specified segment assuming the specified position is somewhere between the twoint
boolean
Tier
<?> getTier
(int position) Gets the tier containing the specified positionint
getTierContentEnd
(int recordIndex, String tierName) Gets the end position of a tier with the specified name in the record at the specified index.int
getTierContentStart
(int recordIndex, String tierName) Gets the start position of a tier with the specified name in the record at the specified indexgetTierContentStartEnd
(int recordIndex, String tierName) Get the range of the given tier's content not including the new tier label or newline at end of tierint
getTierEnd
(int recordIndex, String tierName) Gets the end position of a tier with the specified name in the record at the specified index.getTierLabelStartEnd
(int recordIndex, String tierName) Get the start and end position of the given tier labelint
getTierStart
(int recordIndex, String tierName) Gets the start position of a tier with the specified name in the record at the specified indexgetTierStartEnd
(int recordIndex, String tierName) Get tier start/endgetTierText
(Tier<?> tier, String transcriber) Gets the text value of a given tier for a given transcriberGet the transcriber for the documentboolean
Returns whether the next call ofremove()
from the document will bypass the document filterboolean
boolean
Determine if the document is currently being populatedvoid
moveRecord
(int oldRecordIndex, int newRecordIndex, int oldElementIndex, int newElementIndex) Moves a record in the documentvoid
onChangeCommentType
(Comment comment) Updates the displayed type of the given comment in the documentvoid
onChangeGemType
(Gem gem) Updates the displayed type of the given gem in the documentvoid
onChangeSpeaker
(Record record) Updates the speaker on the separator / record headervoid
onTierDataChanged
(Record record, Tier<?> tier) Updates the data of the specified tiervoid
processBatchUpdates
(int offs, List<DefaultStyledDocument.ElementSpec> batch) Adds the contents of the batch to the document at the specified offset, and sets the global paragraph attributesvoid
putDocumentProperty
(String key, Object value) Adds a given key-value pair to the document properties<T> T
putExtension
(Class<T> cap, T impl) Add a new extension.void
reload()
Empties the document and repopulates it with up-to-date datavoid
removeDocumentPropertyChangeListener
(PropertyChangeListener propertyChangeListener) Removes a document property change listener<T> T
removeExtension
(Class<T> cap) Remove a capability.boolean
void
removeNotEditableAttribute
(String attributeKey) Removes the given attribute from the set of "not editable" attributesvoid
removeTier
(String tierName) Remove tier from all recordsint
sessionLocationToCharPos
(TranscriptElementLocation transcriptLocation) Converts a session location into a character position in the documentvoid
setBypassDocumentFilter
(boolean bypassDocumentFilter) Sets whether the next call ofremove()
from the document will bypass the document filtervoid
setChatTierNamesShown
(boolean chatTierNamesShown) void
setEventManager
(EditorEventManager eventManager) void
setSession
(Session session) Sets the session and reloads the content of the document accordinglyvoid
setSingleRecordIndex
(int singleRecordIndex) Sets the index of the record that will be used in single record mode, and reloads the document if it is currently in single record modevoid
setSingleRecordView
(boolean singleRecordView) Sets whether the document is in "single-record view" and reloads the document if it has changedvoid
setTierItemViewLocked
(String tierName, boolean locked) Sets whether aTierViewItem
with the provided name is lockedvoid
setTranscriber
(Transcriber transcriber) Set transcriber for the document, this will not reload the documentvoid
setUndoSupport
(SessionEditUndoSupport undoSupport) void
void
updateParagraphAttributes
(Element paraEle) void
updateRecord
(Record record) Update record text in the documentvoid
Methods inherited from class javax.swing.text.DefaultStyledDocument
addDocumentListener, addStyle, create, createDefaultRoot, getBackground, getCharacterElement, getDefaultRootElement, getFont, getForeground, getLogicalStyle, getParagraphElement, getStyle, getStyleNames, insert, insertUpdate, removeDocumentListener, removeElement, removeStyle, removeUpdate, setCharacterAttributes, setLogicalStyle, setParagraphAttributes, styleChanged
Methods inherited from class javax.swing.text.AbstractDocument
addUndoableEditListener, createBranchElement, createLeafElement, createPosition, dump, fireChangedUpdate, fireInsertUpdate, fireRemoveUpdate, fireUndoableEditUpdate, getAsynchronousLoadPriority, getAttributeContext, getBidiRootElement, getContent, getCurrentWriter, getDocumentFilter, getDocumentListeners, getDocumentProperties, getEndPosition, getLength, getListeners, getProperty, getRootElements, getStartPosition, getText, getText, getUndoableEditListeners, insertString, postRemoveUpdate, putProperty, readLock, readUnlock, remove, removeUndoableEditListener, render, replace, setAsynchronousLoadPriority, setDocumentFilter, setDocumentProperties, writeLock, writeUnlock
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.swing.text.Document
addUndoableEditListener, createPosition, getEndPosition, getLength, getProperty, getRootElements, getStartPosition, getText, getText, insertString, putProperty, remove, removeUndoableEditListener, render
-
Field Details
-
HEADER_TIER_TRANSCRIPT_ELEMENT_INDEX
public static int HEADER_TIER_TRANSCRIPT_ELEMENT_INDEXHeader tier transcript element index -
TRANSCRIPT_ELEMENT_INDEX_NOT_FOUND
public static int TRANSCRIPT_ELEMENT_INDEX_NOT_FOUNDTranscript element index not found
-
-
Constructor Details
-
TranscriptDocument
Constructor
-
-
Method Details
-
getSession
-
setSession
Sets the session and reloads the content of the document accordingly- Parameters:
session
- The session to be displayed
-
setTranscriber
Set transcriber for the document, this will not reload the document -
getTranscriber
Get the transcriber for the document -
getSingleRecordView
public boolean getSingleRecordView() -
setSingleRecordView
public void setSingleRecordView(boolean singleRecordView) Sets whether the document is in "single-record view" and reloads the document if it has changed- Parameters:
singleRecordView
- whether the document will be in single record view
-
getSingleRecordIndex
public int getSingleRecordIndex() -
setSingleRecordIndex
public void setSingleRecordIndex(int singleRecordIndex) Sets the index of the record that will be used in single record mode, and reloads the document if it is currently in single record mode- Parameters:
singleRecordIndex
- the index of the new record for single record mode
-
updateSingleRecord
public void updateSingleRecord() -
getUndoSupport
-
setUndoSupport
-
getEventManager
-
setEventManager
-
getSessionFactory
-
isBypassDocumentFilter
public boolean isBypassDocumentFilter()Returns whether the next call ofremove()
from the document will bypass the document filter- Returns:
- whether the remove will be bypassed
-
setBypassDocumentFilter
public void setBypassDocumentFilter(boolean bypassDocumentFilter) Sets whether the next call ofremove()
from the document will bypass the document filter- Parameters:
bypassDocumentFilter
- whether the remove will be bypassed
-
isChatTierNamesShown
public boolean isChatTierNamesShown() -
setChatTierNamesShown
public void setChatTierNamesShown(boolean chatTierNamesShown) -
getTranscriptStyleContext
-
getTierText
Gets the text value of a given tier for a given transcriber- Parameters:
tier
- the tier that the value will come fromtranscriber
- the transcriber whose text will be returned- Returns:
- the text value of a given tier for a given transcriber (or the regular text for the tier if the transcriber is the validator or
null
)
-
processBatchUpdates
public void processBatchUpdates(int offs, List<DefaultStyledDocument.ElementSpec> batch) throws BadLocationException Adds the contents of the batch to the document at the specified offset, and sets the global paragraph attributes- Parameters:
offs
- the offset to insert the batch atbatch
- the batch containing the batch to insert- Throws:
BadLocationException
-
findParagraphElementIndexForTier
Find paragraph element index for given tier- Parameters:
elementIndex
-tierName
-
-
findLastParagraphElementIndexForTier
Find final paragraph index for tier including dependent tiers.- Parameters:
elementIndex
-tierName
-- Returns:
- the last paragraph index for the given tier or -1 if not found
-
getParagraphAttributes
-
findParagraphElementIndexForSessionElementIndex
public int findParagraphElementIndexForSessionElementIndex(int sessionElementIndex) Binary search for the first paragraph element index for the given session element index- Parameters:
sessionElementIndex
- the session element index- Returns:
- the first paragraph element index for the given element index or -1 if not found
-
getRangeForSessionElementIndex
Return the range for the given transcript element index- Parameters:
sessionElementIndex
- the session element index- Returns:
- the range for the given transcript element index or StartEnd(-1, -1) if not found
-
getRecordStartEnd
Return string range for given record- Parameters:
record
-- Returns:
- the range for the given record or Range(-1, -1) if not found
-
getRecordStart
public int getRecordStart(int recordIndex) Gets the start of the record with the specified index- Parameters:
recordIndex
- the index of the record- Returns:
- the position in the document at the beginning of the records content
-
getRecordEnd
Gets the end position of the specified record- Parameters:
record
- the record whose end is trying to be found- Returns:
- the position in the document immediately after the final character of the records content (newlines included)
-
getRecordStartEnd
Return the range of the given recordIndex- Parameters:
recordIndex
-- Returns:
- the range of the given recordIndex
-
getRecordStart
Gets the start position of the given record- Parameters:
record
- the record whose start position is trying to be found- Returns:
- the position in the document at the beginning of the records content
-
getRecordEnd
public int getRecordEnd(int recordIndex) Gets the end position of the record at the specified index- Parameters:
recordIndex
- the index of the record whose end is trying to be found- Returns:
- the position in the document immediately after the final character of the records content (newlines included)
-
getCommentLabelStartEnd
Gets the start/end position of the specified comment label- Parameters:
comment
- the comment whose start position is trying to be found- Returns:
- the position in the document at the beginning of the comments label or StartEnd(-1, -1) if not found
-
getCommentContentStartEnd
Return the range for the given comment content- Parameters:
comment
-- Returns:
- the range for the given comment content, or StartEnd(-1, -1) if not found
-
getCommentStart
Get the start position of the specified comment including label- Parameters:
comment
- the comment whose start position is trying to be found- Returns:
- the position in the document at the beginning of the comment label
-
getCommentContentStart
Gets the start position of the specified comment- Parameters:
comment
- the comment whose start position is trying to be found- Returns:
- the position in the document at the beginning of the comments content
-
getCommentContentEnd
Gets the end position of the specified comment- Parameters:
comment
- the comment whose end position is trying to be found- Returns:
- the position in the document immediately after the final character of the comments content (newlines excluded)
-
getGemStart
Gets the start position of the specified gem- Parameters:
gem
- the gem whose start position is trying to be found- Returns:
- the position in the document at the beginning of the gem label
-
getGemContentStartEnd
Get the range for the given gem's content- Parameters:
gem
-- Returns:
- the range for the given gem's content
-
getGemContentStart
Gets the start position of the specified gem- Parameters:
gem
- the gem whose start position is trying to be found- Returns:
- the position in the document at the beginning of the gems content
-
getGemContentEnd
Gets the end position of the specified gem- Parameters:
gem
- the gem whose end position is trying to be found- Returns:
- the position in the document immediately after the final character of the gems content (newlines excluded)
-
getCommentStartEnd
Return string range for given comment- Parameters:
comment
-- Returns:
- the range for the given comment or Range(-1, -1) if not found
-
getCommentEnd
Gets the end position of the specified comment- Parameters:
comment
- the comment whose end position is trying to be found- Returns:
- the position in the document immediately after the final character of the comments content (newlines included)
-
getGemEnd
Gets the end position of the specified gem- Parameters:
gem
- the gem whose end position is trying to be found- Returns:
- the position in the document immediately after the final character of the gems content (newlines included)
-
getTierStartEnd
Get tier start/end- Parameters:
tierName
-- Returns:
- the range for the given tier or StartEnd(-1, -1) if not found
-
getTierStart
Gets the start position of a tier with the specified name in the record at the specified index- Parameters:
recordIndex
- the index of the record that contains the tiertierName
- the name of the tier- Returns:
- the position in the document at the beginning of the tier label
-
getTierEnd
Gets the end position of a tier with the specified name in the record at the specified index. End includes newline at the end of the tier.- Parameters:
recordIndex
- the index of the record that contains the tiertierName
- the name of the tier- Returns:
- the position in the document immediately after the final character of the tiers content (newlines included)
-
getTierContentStartEnd
Get the range of the given tier's content not including the new tier label or newline at end of tier- Parameters:
recordIndex
-tierName
-- Returns:
- the start/end of the given tier's content, (-1, -1) if not found
-
getTierContentStart
Gets the start position of a tier with the specified name in the record at the specified index- Parameters:
recordIndex
- the index of the record that contains the tiertierName
- the name of the tier- Returns:
- the position in the document at the beginning of the tiers content
-
getTierContentEnd
Gets the end position of a tier with the specified name in the record at the specified index. End does not include newline at the end of the tier.- Parameters:
recordIndex
- the index of the record that contains the tiertierName
- the name of the tier- Returns:
- the position in the document immediately after the final character of the tiers content (newlines included)
-
getTierLabelStartEnd
Get the start and end position of the given tier label- Parameters:
recordIndex
-tierName
-- Returns:
- the start and end position of the given tier label or StartEnd(-1, -1) if not found, the position will not include the starting whitespace char(s) or the ending : char
-
getGenericStartEnd
Get the range of the given generic tier (header tier)- Parameters:
genericTier
-- Returns:
- the range of the given generic tier or Range(-1, -1) if not found
-
getGenericStartEnd
Get the range of the given generic tier (header tier)- Parameters:
genericTierName
-- Returns:
- the range of the given generic tier or Range(-1, -1) if not found
-
getGenericContentStartEnd
Get the range of the given generic tier content (header tier)- Parameters:
genericTier
-- Returns:
- the range of the given generic tier or Range(-1, -1) if not found
-
getGenericContentStartEnd
Get the range of the given generic tier content (header tier)- Parameters:
genericTierName
-- Returns:
- the range of the given generic tier or StartEnd(-1, -1) if not found
-
getGenericContentStart
Gets the start position of the specified "generic tier"- Parameters:
genericTier
- a reference to the generic tier whose start position is trying to be found- Returns:
- the position in the document at the beginning of the generic tiers content
-
getGenericContentEnd
Gets the end position of the specified "generic tier"- Parameters:
genericTier
- a reference to the generic tier whose end position is trying to be found- Returns:
- the position in the document immediately after the final character of the generic tiers content (newlines excluded)
-
getGenericStart
Gets the start position of the "generic tier" with the specified name- Parameters:
genericTierName
- the name of the generic tier whose start position is trying to be found- Returns:
- the position in the document at the beginning of the generic tiers label
-
getGenericStart
Gets the start position of the "generic tier" with the specified name- Parameters:
genericTier
- the generic tier whose start position is trying to be found- Returns:
- the position in the document at the beginning of the generic tiers label
-
getGenericContentStart
Gets the start position of the "generic tier" with the specified name- Parameters:
genericTierName
- the name of the generic tier whose start position is trying to be found- Returns:
- the position in the document at the beginning of the generic tiers content
-
getGenericEnd
Gets the end position of the specified "generic tier"- Parameters:
genericTier
- the generic tier whose end position is trying to be found- Returns:
- the position in the document immediately after the final character of the generic tiers content (newlines included)
-
getGenericEnd
Gets the end position of the "generic tier" with the specified name- Parameters:
genericTierName
- the name of the generic tier whose end position is trying to be found- Returns:
- the position in the document immediately after the final character of the generic tiers content (newlines included)
-
getGemStartEnd
Return string range for given gem- Parameters:
gem
-- Returns:
- the range for the given gem or Range(-1, -1) if not found
-
getGemLabelStartEnd
Return string range for given gem label- Parameters:
gem
-- Returns:
- the range for the given gem label or StartEnd(-1, -1) if not found
-
getSegmentBounds
Gets a record containing the start and end of a specified segment assuming the specified position is somewhere between the two- Parameters:
segment
- the segment that the bounds are being calculated forincludedPos
- a position included in the bounds of the segment- Returns:
- a record containing the start and end of the segment
-
getCharAtPos
Gets the character at the specified position in the document- Parameters:
pos
- the position to get the character from- Returns:
- the character at the specified position
-
getRecordIndex
public int getRecordIndex(int position) Gets the index of the record containing the specified position- Parameters:
position
- a position in the document in a record- Returns:
- the index of the record
-
getRecordElementIndex
public int getRecordElementIndex(int position) Gets the element index of the record containing the specified position- Parameters:
position
- a position in the document in a record- Returns:
- the element index of the record
-
getTier
Gets the tier containing the specified position- Parameters:
position
- a position in the document in a record- Returns:
- a reference to the tier
-
getOffsetInContent
public int getOffsetInContent(int pos) Gets the offset from the preceding label of a given position in the document- Parameters:
pos
- the position that the offset will come from
-
charPosToSessionLocation
Converts a character position in the document into aTranscriptElementLocation
object- Parameters:
charPos
- the position in the document- Returns:
- the converted session location object
-
sessionLocationToCharPos
Converts a session location into a character position in the document- Parameters:
transcriptLocation
- the session location object- Returns:
- the converted character position
-
updateGlobalParagraphAttributes
public void updateGlobalParagraphAttributes() -
updateParagraphAttributes
-
deleteTranscriptElement
Deletes a given transcript element from the document -
onChangeCommentType
Updates the displayed type of the given comment in the document -
onChangeGemType
Updates the displayed type of the given gem in the document -
moveRecord
public void moveRecord(int oldRecordIndex, int newRecordIndex, int oldElementIndex, int newElementIndex) Moves a record in the document- Parameters:
oldRecordIndex
- the existing index of the recordnewRecordIndex
- the new index of the recordoldElementIndex
- the existing element index of the recordnewElementIndex
- the new element index of the record
-
onChangeSpeaker
Updates the speaker on the separator / record header -
onTierDataChanged
-
addComment
Adds a comment to the document and the transcript at the given transcript element index -
addGem
-
updateRecord
Update record text in the document- Parameters:
record
- the record whose media segment is being updated
-
addRecord
Adds a record to the document- Parameters:
addedRecord
- the record that gets added
-
deleteRecord
Removes a record from the document- Parameters:
removedRecord
- the record that gets removed
-
addTier
-
removeTier
-
setTierItemViewLocked
Sets whether aTierViewItem
with the provided name is locked- Parameters:
tierName
- the name of the tier that will be locked or unlockedlocked
- whether the tier will be locked or unlocked
-
getDocumentProperty
-
getDocumentPropertyOrDefault
Gets the object associated with a given key from the document properties and returns a given default value if none is present- Parameters:
key
- the key to get the object with the objectdefaultValue
- the object to be returned if there is no object associated with the key- Returns:
- the object associated with the key or the default if no object is present
-
putDocumentProperty
-
addDocumentPropertyChangeListener
public void addDocumentPropertyChangeListener(String propertyName, PropertyChangeListener propertyChangeListener) Adds a property change listener that responds to changes in the document property with the given key / name- Parameters:
propertyName
- the name / key of the property that will be listened topropertyChangeListener
- the listener that contains some behavior that will happen when the property changes
-
removeDocumentPropertyChangeListener
Removes a document property change listener- Parameters:
propertyChangeListener
- the listener that was listening for changes in a document property
-
containsNotEditableAttribute
Checks if the provided attribute set contains any attributes that are currently considered "not editable"- Parameters:
attrs
- the attribute set that will be checked- Returns:
- whether there were any "not editable" attributes
-
addNotEditableAttribute
Adds the given attribute to the set of "not editable" attributes- Parameters:
attributeKey
- the attribute that will be added to the set
-
removeNotEditableAttribute
Removes the given attribute from the set of "not editable" attributes- Parameters:
attributeKey
- the attribute that will be removed from the set
-
isPopulating
public boolean isPopulating()Determine if the document is currently being populated -
reload
public void reload()Empties the document and repopulates it with up-to-date data -
getInsertionHooks
-
addInsertionHook
-
removeInsertionHook
-
getExtensions
Description copied from interface:IExtendable
Return all extension types supported- Specified by:
getExtensions
in interfaceIExtendable
-
getExtension
Description copied from interface:IExtendable
Get the requested extension if available.- Specified by:
getExtension
in interfaceIExtendable
- Returns:
- the capability object or
null
if the cability is not available
-
putExtension
Description copied from interface:IExtendable
Add a new extension.- Specified by:
putExtension
in interfaceIExtendable
- Parameters:
cap
- the extension to add- Returns:
- the added extension implementation
-
removeExtension
Description copied from interface:IExtendable
Remove a capability.- Specified by:
removeExtension
in interfaceIExtendable
- Parameters:
cap
- the capability to remove
-