org.argouml.uml.ui
Class UMLModelElementCommentDocument
java.lang.Object
javax.swing.text.AbstractDocument
javax.swing.text.PlainDocument
org.argouml.uml.ui.UMLPlainTextDocument
org.argouml.uml.ui.UMLModelElementCommentDocument
- All Implemented Interfaces:
- Document, EventListener, PropertyChangeListener, Serializable, TargetListener, UMLDocument
- public class UMLModelElementCommentDocument
- extends UMLPlainTextDocument
This class provides a text field that can be used to display
the text of all Comments associated with an annotated ModelElement.
TODO: This could use more work. Currently it returns all
Comment.name or Comment.body attributes concatenated together
into a single read-only document.
- Since:
- 1 Nov 2005
- See Also:
- Serialized Form
|
Constructor Summary |
UMLModelElementCommentDocument(boolean useBody)
Creates a UMLPlainTextDocument object that represents the text of a
Comment associated with a ModelElement |
|
Method Summary |
protected String |
getProperty()
Get the text of all comments annotating this Model Element |
protected void |
setProperty(String text)
Add a Comment with the given string
TODO: Currently a no-op, doc is read only |
| Methods inherited from class org.argouml.uml.ui.UMLPlainTextDocument |
getEventName, getTarget, insertString, isEditing, propertyChange, remove, setEditing, setEventName, setTarget, targetAdded, targetRemoved, targetSet |
| Methods inherited from class javax.swing.text.AbstractDocument |
addDocumentListener, 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, postRemoveUpdate, putProperty, readLock, readUnlock, removeDocumentListener, 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 |
addDocumentListener, addUndoableEditListener, createPosition, getDefaultRootElement, getEndPosition, getLength, getProperty, getRootElements, getStartPosition, getText, getText, putProperty, removeDocumentListener, removeUndoableEditListener, render |
UMLModelElementCommentDocument
public UMLModelElementCommentDocument(boolean useBody)
- Creates a UMLPlainTextDocument object that represents the text of a
Comment associated with a ModelElement
- Parameters:
useBody - use the UML 1.4 body attribute instead of the UML 1.3 name
attribute
setProperty
protected void setProperty(String text)
- Add a Comment with the given string
TODO: Currently a no-op, doc is read only
- Specified by:
setProperty in class UMLPlainTextDocument
- Parameters:
text - the property
getProperty
protected String getProperty()
- Get the text of all comments annotating this Model Element
- Specified by:
getProperty in class UMLPlainTextDocument
- Returns:
- the text of all comments