Author: bobtarling Date: 2009-12-17 11:40:27-0800 New Revision: 17661 Modified: trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLTextArea.java trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLTextField.java
Log: Make the constructors more explicit for what we expect Modified: trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLTextArea.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLTextArea.java?view=diff&pathrev=17661&r1=17660&r2=17661 ============================================================================== --- trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLTextArea.java (original) +++ trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLTextArea.java 2009-12-17 11:40:27-0800 @@ -53,7 +53,7 @@ * Constructor for UMLTextArea2. * @param doc the plain text document */ - public UMLTextArea(UMLDocument doc) { + public UMLTextArea(UMLPlainTextDocument doc) { super(doc); setFont(LookAndFeelMgr.getInstance().getStandardFont()); addCaretListener(ActionCopy.getInstance()); @@ -66,6 +66,10 @@ * @see java.beans.PropertyChangeListener#propertyChange(java.beans.PropertyChangeEvent) */ public void propertyChange(PropertyChangeEvent evt) { - ((UMLDocument) getDocument()).propertyChange(evt); + ((UMLPlainTextDocument) getDocument()).propertyChange(evt); + } + + public void removeNotify() { + ((UMLPlainTextDocument) getDocument()).setFiring(false); } } Modified: trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLTextField.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLTextField.java?view=diff&pathrev=17661&r1=17660&r2=17661 ============================================================================== --- trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLTextField.java (original) +++ trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLTextField.java 2009-12-17 11:40:27-0800 @@ -50,7 +50,7 @@ * * @param doc the plain text document */ - public UMLTextField(UMLDocument doc) { + public UMLTextField(UMLPlainTextDocument doc) { super(doc, null, 0); setFont(LookAndFeelMgr.getInstance().getStandardFont()); addCaretListener(ActionCopy.getInstance()); @@ -63,7 +63,7 @@ * @see java.beans.PropertyChangeListener#propertyChange(java.beans.PropertyChangeEvent) */ public void propertyChange(PropertyChangeEvent evt) { - ((UMLDocument) getDocument()).propertyChange(evt); + ((UMLPlainTextDocument) getDocument()).propertyChange(evt); } public void removeNotify() { ------------------------------------------------------ http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=2431288 To unsubscribe from this discussion, e-mail: [[email protected]].
