- All Known Implementing Classes:
public interface IFormattingStrategy
A formatting strategy is assumed to be specialized on formatting text of a particular content type. Each formatting process calls the strategy's methods in the following sequence:
This interface must be implemented by clients. Implementers should be registered with a content formatter in order get involved in the formatting process.
Method SummaryModifier and TypeMethodDescriptionFormats the given string.
voidInforms the strategy about the start of a formatting process in which it will participate.
voidInforms the strategy that the formatting process in which it has participated has been finished.
(String initialIndentation)Informs the strategy about the start of a formatting process in which it will participate.
initialIndentation- the indent string of the first line at which the overall formatting process starts.
formatFormats the given string. During the formatting process this strategy must update the given character positions according to the changes applied to the given string.
content- the initial string to be formatted
isLineStart- indicates whether the beginning of content is a line start in its document
indentation- the indentation string to be used
positions- the character positions to be updated
- the formatted string
formatterStopsvoid formatterStops()Informs the strategy that the formatting process in which it has participated has been finished.