Documentation of 'org.jhotdraw.beans.PropertyChangeEdit' Java class
PropertyChangeEdit
org.jhotdraw.beans

Class PropertyChangeEdit

  • All Implemented Interfaces:
    java.io.Serializable, javax.swing.undo.UndoableEdit


    public class PropertyChangeEdit
    extends javax.swing.undo.AbstractUndoableEdit
    An UndoableEdit event which can undo a change of a JavaBeans property.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      PropertyChangeEdit(java.lang.Object source, java.lang.String propertyName, boolean oldValue, boolean newValue)
      Creates a new PropertyChangeEdit.
      PropertyChangeEdit(java.lang.Object source, java.lang.String propertyName, char oldValue, char newValue)
      Creates a new PropertyChangeEdit.
      PropertyChangeEdit(java.lang.Object source, java.lang.String propertyName, java.lang.Class<T> type, T oldValue, T newValue)
      Creates a new PropertyChangeEdit.
      PropertyChangeEdit(java.lang.Object source, java.lang.String propertyName, double oldValue, double newValue)
      Creates a new PropertyChangeEdit.
      PropertyChangeEdit(java.lang.Object source, java.lang.String propertyName, float oldValue, float newValue)
      Creates a new PropertyChangeEdit.
      PropertyChangeEdit(java.lang.Object source, java.lang.String propertyName, int oldValue, int newValue)
      Creates a new PropertyChangeEdit.
      PropertyChangeEdit(java.lang.Object source, java.lang.String propertyName, long oldValue, long newValue)
      Creates a new PropertyChangeEdit.
      PropertyChangeEdit(java.lang.Object source, java.lang.String propertyName, java.lang.String oldValue, java.lang.String newValue)
      Creates a new PropertyChangeEdit.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean addEdit(javax.swing.undo.UndoableEdit anEdit)
      Adds the specified edit to this one, if it is a PropertyChangeEdit from the same owner and the same property.
      java.lang.String getPresentationName()
      Returns the presentation name of the undoable edit.
      void redo()
      Redoes the change.
      void setPresentationName(java.lang.String presentationName)
      Sets the presentation name of the undoable edit.
      java.lang.String toString()
      Returns a string representation of this object useful for debugging.
      void undo()
      Undoes the change.
      • Methods inherited from class javax.swing.undo.AbstractUndoableEdit

        canRedo, canUndo, die, getRedoPresentationName, getUndoPresentationName, isSignificant, replaceEdit
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • PropertyChangeEdit

        public PropertyChangeEdit(java.lang.Object source,
                                  java.lang.String propertyName,
                                  java.lang.Class<T> type,
                                  T oldValue,
                                  T newValue)
        Creates a new PropertyChangeEdit.
      • PropertyChangeEdit

        public PropertyChangeEdit(java.lang.Object source,
                                  java.lang.String propertyName,
                                  boolean oldValue,
                                  boolean newValue)
        Creates a new PropertyChangeEdit.
      • PropertyChangeEdit

        public PropertyChangeEdit(java.lang.Object source,
                                  java.lang.String propertyName,
                                  int oldValue,
                                  int newValue)
        Creates a new PropertyChangeEdit.
      • PropertyChangeEdit

        public PropertyChangeEdit(java.lang.Object source,
                                  java.lang.String propertyName,
                                  long oldValue,
                                  long newValue)
        Creates a new PropertyChangeEdit.
      • PropertyChangeEdit

        public PropertyChangeEdit(java.lang.Object source,
                                  java.lang.String propertyName,
                                  float oldValue,
                                  float newValue)
        Creates a new PropertyChangeEdit.
      • PropertyChangeEdit

        public PropertyChangeEdit(java.lang.Object source,
                                  java.lang.String propertyName,
                                  double oldValue,
                                  double newValue)
        Creates a new PropertyChangeEdit.
      • PropertyChangeEdit

        public PropertyChangeEdit(java.lang.Object source,
                                  java.lang.String propertyName,
                                  char oldValue,
                                  char newValue)
        Creates a new PropertyChangeEdit.
      • PropertyChangeEdit

        public PropertyChangeEdit(java.lang.Object source,
                                  java.lang.String propertyName,
                                  java.lang.String oldValue,
                                  java.lang.String newValue)
        Creates a new PropertyChangeEdit.
    • Method Detail

      • undo

        public void undo()
                  throws javax.swing.undo.CannotRedoException
        Undoes the change.
        Specified by:
        undo in interface javax.swing.undo.UndoableEdit
        Overrides:
        undo in class javax.swing.undo.AbstractUndoableEdit
        Throws:
        javax.swing.undo.CannotRedoException
      • redo

        public void redo()
                  throws javax.swing.undo.CannotRedoException
        Redoes the change.
        Specified by:
        redo in interface javax.swing.undo.UndoableEdit
        Overrides:
        redo in class javax.swing.undo.AbstractUndoableEdit
        Throws:
        javax.swing.undo.CannotRedoException
      • getPresentationName

        public java.lang.String getPresentationName()
        Returns the presentation name of the undoable edit. This is the same as the property name, unless you have set a different presentation name.
        Specified by:
        getPresentationName in interface javax.swing.undo.UndoableEdit
        Overrides:
        getPresentationName in class javax.swing.undo.AbstractUndoableEdit
      • setPresentationName

        public void setPresentationName(java.lang.String presentationName)
        Sets the presentation name of the undoable edit.
      • addEdit

        public boolean addEdit(javax.swing.undo.UndoableEdit anEdit)
        Adds the specified edit to this one, if it is a PropertyChangeEdit from the same owner and the same property.
        Specified by:
        addEdit in interface javax.swing.undo.UndoableEdit
        Overrides:
        addEdit in class javax.swing.undo.AbstractUndoableEdit
        Parameters:
        anEdit - Edit to be added.
        Returns:
        True if added.
      • toString

        public java.lang.String toString()
        Returns a string representation of this object useful for debugging.
        Overrides:
        toString in class javax.swing.undo.AbstractUndoableEdit

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.