JHotDraw 6.0b1

org.jhotdraw.contrib
Class TextAreaTool.UndoActivity

java.lang.Object
  extended by org.jhotdraw.util.UndoableAdapter
      extended by org.jhotdraw.contrib.TextAreaTool.UndoActivity
All Implemented Interfaces:
Undoable
Enclosing class:
TextAreaTool

public static class TextAreaTool.UndoActivity
extends UndoableAdapter

Handles undo/redo for text areas


Constructor Summary
TextAreaTool.UndoActivity(DrawingView newDrawingView, java.lang.String newOriginalText)
          Constructor for the UndoActivity object
 
Method Summary
 java.lang.String getBackupText()
          Gets the backupText attribute of the UndoActivity
 java.lang.String getOriginalText()
          Gets the originalText attribute of the UndoActivity
protected  boolean isValidText(java.lang.String toBeChecked)
          Validates the text in the undo activity
 boolean redo()
          Redo the activity
 void setBackupText(java.lang.String newBackupText)
          Sets the backupText attribute of the UndoActivity
 void setOriginalText(java.lang.String newOriginalText)
          Sets the originalText attribute of the UndoActivity
protected  void setText(java.lang.String newText)
          Sets the text attribute of the UndoActivity
 boolean undo()
          Undo the activity
 
Methods inherited from class org.jhotdraw.util.UndoableAdapter
duplicateAffectedFigures, getAffectedFigures, getAffectedFiguresCount, getAffectedFiguresReversed, getDrawingView, isRedoable, isUndoable, release, rememberFigures, setAffectedFigures, setDrawingView, setRedoable, setUndoable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextAreaTool.UndoActivity

public TextAreaTool.UndoActivity(DrawingView newDrawingView,
                                 java.lang.String newOriginalText)
Constructor for the UndoActivity object

Parameters:
newDrawingView - Description of the Parameter
newOriginalText - Description of the Parameter
Method Detail

undo

public boolean undo()
Undo the activity

Specified by:
undo in interface Undoable
Overrides:
undo in class UndoableAdapter
Returns:
Description of the Return Value

redo

public boolean redo()
Redo the activity

Specified by:
redo in interface Undoable
Overrides:
redo in class UndoableAdapter
Returns:
Description of the Return Value

isValidText

protected boolean isValidText(java.lang.String toBeChecked)
Validates the text in the undo activity

Parameters:
toBeChecked - Description of the Parameter
Returns:
The validText value

setText

protected void setText(java.lang.String newText)
Sets the text attribute of the UndoActivity

Parameters:
newText - The new text value

setBackupText

public void setBackupText(java.lang.String newBackupText)
Sets the backupText attribute of the UndoActivity

Parameters:
newBackupText - The new backupText value

getBackupText

public java.lang.String getBackupText()
Gets the backupText attribute of the UndoActivity

Returns:
The backupText value

setOriginalText

public void setOriginalText(java.lang.String newOriginalText)
Sets the originalText attribute of the UndoActivity

Parameters:
newOriginalText - The new originalText value

getOriginalText

public java.lang.String getOriginalText()
Gets the originalText attribute of the UndoActivity

Returns:
The originalText value

JHotDraw 6.0b1