Top Description Fields Constructors Methods
com.sun.jfx.incubator.scene.control.richtext

public Class UndoableChange

extends Object
Class Inheritance
Imports
java.io.IOException, jfx.incubator.scene.control.richtext.StyleResolver, .TextPos, jfx.incubator.scene.control.richtext.model.StyledSegment, .StyledTextModel

Represents an undo-able and redo-able change.

Field Summary

Modifier and TypeField and Description
private TextPos
private final TextPos
private final StyledTextModel
private UndoableChange
private UndoableChange
private StyledSegment[]
private final TextPos
private final StyledSegment[]

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static UndoableChange
create(StyledTextModel
source model
model
,
TextPos
start text position
start
,
TextPos
end text position
end
)

Creates an UndoableChange object.

public static UndoableChange
public UndoableChange
public UndoableChange
public TextPos[]
public TextPos[]
public void
redo(StyleResolver resolver)

public void
public void
public void
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public void
undo(StyleResolver resolver)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

endAfterback to summary
private TextPos endAfter
endBeforeback to summary
private final TextPos endBefore
modelback to summary
private final StyledTextModel model
nextback to summary
private UndoableChange next
prevback to summary
private UndoableChange prev
redoback to summary
private StyledSegment[] redo
startback to summary
private final TextPos start
undoback to summary
private final StyledSegment[] undo

Constructor Detail

UndoableChangeback to summary
private UndoableChange(StyledTextModel model, TextPos start, TextPos end, StyledSegment[] undo)

Method Detail

createback to summary
public static UndoableChange create(StyledTextModel model, TextPos start, TextPos end)

Creates an UndoableChange object. This method might return null if an error happened during creation, for example, if the model could not export the affected area as a sequence of StyledSegments.

TODO perhaps it should throw an exception which will be handled by the control, in order to provide user feedback.

Parameters
model:StyledTextModel

source model

start:TextPos

start text position

end:TextPos

end text position

Exceptions
IOException:
if the save point cannot be created
createHeadback to summary
public static UndoableChange createHead()
getNextback to summary
public UndoableChange getNext()
getPrevback to summary
public UndoableChange getPrev()
getSelectionAfterback to summary
public TextPos[] getSelectionAfter()
getSelectionBeforeback to summary
public TextPos[] getSelectionBefore()
redoback to summary
public void redo(StyleResolver resolver) throws IOException
setEndAfterback to summary
public void setEndAfter(TextPos p)
setNextback to summary
public void setNext(UndoableChange ch)
setPrevback to summary
public void setPrev(UndoableChange ch)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
undoback to summary
public void undo(StyleResolver resolver) throws IOException