caltool.edit
Class Edit

java.lang.Object
  extended by java.util.Observable
      extended by mvp.Model
          extended by caltool.edit.Edit
All Implemented Interfaces:
java.io.Serializable

public class Edit
extends mvp.Model

Class Edit is the model class for the Calendar Tool edit handling. It contains methods for all of the operations defined on the Edit menu, which constitute the functional command group for basic editing.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class mvp.Model
view
 
Constructor Summary
Edit(mvp.View v)
          Construct this.
 
Method Summary
 void copy()
          The currently selected text segment is copied into the clipboard;
 void cut()
          The currently selected text segment is copied into the clipboard and removed from its context.
 void delete()
          Delete the currently selected text.
 void find(java.lang.String text)
          Find the given text string in all active windows.
 void paste()
          Paste the contents of the clipboard into the currently selected start position, replacing any selected text from start to end position.
 void redo()
          Redo the last undo.
 void repeat(CalendarToolOperation operation, int repeatTimes)
          Redo the given operation the given number of times.
 void selectAll()
          Select all text in the current workspace window.
 void undo()
          Undo the most recent scheduling operation.
 
Methods inherited from class mvp.Model
dump, exit, getView, setView
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Edit

public Edit(mvp.View v)
Construct this.

Method Detail

undo

public void undo()
Undo the most recent scheduling operation. Only one level of undo/redo is specified here. Successive invocations of undo toggle between the current and previous states of the calendar. Note that the calendar editing operations support undo by saving a snapshot of the input calendar in the previous_state component of the workspace.


redo

public void redo()
Redo the last undo.


repeat

public void repeat(CalendarToolOperation operation,
                   int repeatTimes)
Redo the given operation the given number of times.


cut

public void cut()
The currently selected text segment is copied into the clipboard and removed from its context. The workspace selection in set to empty.


copy

public void copy()
The currently selected text segment is copied into the clipboard;


paste

public void paste()
Paste the contents of the clipboard into the currently selected start position, replacing any selected text from start to end position.


delete

public void delete()
Delete the currently selected text. This function can be specialized by subclasses to delete a tool-specific object.


selectAll

public void selectAll()
Select all text in the current workspace window.


find

public void find(java.lang.String text)
Find the given text string in all active windows.