com.ephox.editlive.java2.editor.operation
Interface Operation


public interface Operation


Method Summary
 boolean affectsRange(int startOffset, int endOffset)
          Determine whether or not this operation affects the specified range.
 String getAuthor()
          Get the name of the user that performed this operation.
 Date getDate()
          Get the date / time for this operation.
 String getDescription()
          Retrieves a human readable, internationalized description of this operation.
 int getEndAffectedRange()
          Get the end of the affected range for this operation.
 int getLengthDelta()
          Get the change in length of the document after this operation was applied.
 long getLocalId()
          Get the local ID for this operation.
 int getStartAffectedRange()
          Get the start of the affected range for this operation.
 boolean isApplied()
          Determine if this operation has been applied or not.
 boolean isDottedUnderlinePainted()
          Whether or not the user color is painted as a background instead of changing the text color.
 boolean isStrikeThrough()
          Whether or not this operation should be rendered with a strike through.
 boolean isUnderline()
          Whether or not this operation should be rendered with an underline.
 void setAuthor(String author)
          Set the name of the user that performed this operation.
 void setDate(Date opDate)
          Set the date / time for this operation.
 

Method Detail

affectsRange

boolean affectsRange(int startOffset,
                     int endOffset)
Determine whether or not this operation affects the specified range.

Parameters:
startOffset - start offset of range
endOffset - end offset of range
Returns:
true when the range is affected, otherwise false

getStartAffectedRange

int getStartAffectedRange()
Get the start of the affected range for this operation. All changes caused by this operation must occur after the offset returned by this method.

Returns:
the start of the affected range.

getEndAffectedRange

int getEndAffectedRange()
Get the end of the affected range for this operation. All changes caused by this operation must occur before the offset returned by this method.

Returns:
the end of the affected range.

getLengthDelta

int getLengthDelta()
Get the change in length of the document after this operation was applied.

Returns:
the change in length of the document that this operation caused or will cause.

isApplied

boolean isApplied()
Determine if this operation has been applied or not.

Returns:
true if this operation has been applied, otherwise false.

isStrikeThrough

boolean isStrikeThrough()
Whether or not this operation should be rendered with a strike through.

Returns:
true if the operation should be rendered with a strike through, otherwise false.

isUnderline

boolean isUnderline()
Whether or not this operation should be rendered with an underline.

Returns:
true if the operation should be rendered with an underline, otherwise false.

isDottedUnderlinePainted

boolean isDottedUnderlinePainted()
Whether or not the user color is painted as a background instead of changing the text color.

Returns:
true if the user's color should be painted as the background, false if it should be used as the foreground color.

getDescription

String getDescription()
Retrieves a human readable, internationalized description of this operation.

Returns:
the description of this operation.

getAuthor

String getAuthor()
Get the name of the user that performed this operation.

Returns:
the username of the author that performed this operation.

setAuthor

void setAuthor(String author)
Set the name of the user that performed this operation.

Parameters:
author - the username of the author that performed this operation.

getLocalId

long getLocalId()
Get the local ID for this operation. The local ID must be unique for all Operation instances created within this editor.

Returns:
the local ID for this operation.

getDate

Date getDate()
Get the date / time for this operation.

Returns:
the time this operation was created

setDate

void setDate(Date opDate)
Set the date / time for this operation.

Parameters:
opDate - the new time for the operation

Copyright (c) 2005-2012 Ephox Pty Ltd. All rights reserved.