edu.washington.cs.supple.customization.state
Class HistoryRecord

java.lang.Object
  extended byedu.washington.cs.supple.customization.state.HistoryRecord
Direct Known Subclasses:
HistoryRecordRedo, HistoryRecordReversal

public class HistoryRecord
extends java.lang.Object

A history record represents a logged modification to the UI that was caused by a customization command. Note that one customization command can entail a series of actions each of which is logged by an individual HistoryRecord object.

Author:
raphael

Constructor Summary
HistoryRecord(Command command, Action action, UiObject location)
          Creates a new HistoryRecord.
 
Method Summary
 Action getAction()
          Returns the action which encodes the modification to the UI.
 Command getCreatorCommand()
          Returns a reference to the customization command that caused the modification to the UI which is represented by this history record.
 int getId()
          Returns a unique identifier of this history record.
 UiObject getLocation()
          Returns the part of the UI (UIObject) where the modification to the UI took place.
 java.lang.String toString()
          Returns a string representation of this history record.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HistoryRecord

public HistoryRecord(Command command,
                     Action action,
                     UiObject location)
Creates a new HistoryRecord.

Parameters:
command - Customization command that caused an action (modification) to the UI
action - the actual modification to the UI
location - the part of the UI where the action was applied
Method Detail

getCreatorCommand

public Command getCreatorCommand()
Returns a reference to the customization command that caused the modification to the UI which is represented by this history record.

Returns:

getAction

public Action getAction()
Returns the action which encodes the modification to the UI.

Returns:

getLocation

public UiObject getLocation()
Returns the part of the UI (UIObject) where the modification to the UI took place.

Returns:
part of the UI where modification took place

getId

public int getId()
Returns a unique identifier of this history record.

Returns:
unique identifier

toString

public java.lang.String toString()
Returns a string representation of this history record.

Returns:
string representation of object