Class HtmlExportFormatHandler
java.lang.Object
jfx.incubator.scene.control.richtext.model.DataFormatHandler
jfx.incubator.scene.control.richtext.model.HtmlExportFormatHandler
-
Method Summary
Modifier and TypeMethodDescriptioncopy(StyledTextModel model, StyleResolver resolver, TextPos start, TextPos end) Creates an object to be put into the Clipboard for the given text range.createStyledInput(String input, StyleAttributeMap attr) Creates a StyledInput for the given input string.static final HtmlExportFormatHandlerReturns the singleton instance ofHtmlExportFormatHandler.voidsave(StyledTextModel model, StyleResolver resolver, TextPos start, TextPos end, OutputStream out) Save the text range in the handler's format to the output stream (e.g.Methods declared in class jfx.incubator.scene.control.richtext.model.DataFormatHandler
getDataFormat
-
Method Details
-
getInstance
Returns the singleton instance ofHtmlExportFormatHandler.- Returns:
- the singleton instance of
HtmlExportFormatHandler
-
createStyledInput
Description copied from class:DataFormatHandlerCreates a StyledInput for the given input string. When pasting, the caller may pass the style attributesattrat the insertion point. This argument may be used by the implementation if the format contains no styles on its own (for example, in the plain text format case).- Specified by:
createStyledInputin classDataFormatHandler- Parameters:
input- the input stringattr- the style attributes (can be null)- Returns:
- the StyledInput
-
copy
public Object copy(StyledTextModel model, StyleResolver resolver, TextPos start, TextPos end) throws IOException Description copied from class:DataFormatHandlerCreates an object to be put into the Clipboard for the given text range. The caller must guarantee that thestartprecedes theendposition.Typically, the implementation creates an instance of
StyledOutputand callsStyledTextModel.export(TextPos, TextPos, StyledOutput)method.- Specified by:
copyin classDataFormatHandler- Parameters:
model- source modelresolver- view-specific style resolverstart- start text positionend- end text position- Returns:
- an object to be placed to the Clipboard
- Throws:
IOException- when an I/O error occurs
-
save
public void save(StyledTextModel model, StyleResolver resolver, TextPos start, TextPos end, OutputStream out) throws IOException Description copied from class:DataFormatHandlerSave the text range in the handler's format to the output stream (e.g. save to file). The caller must guarantee that thestartprecedes theendposition. It is the responsibility of the caller to close theOutputStream.Typically, the implementation creates an instance of
StyledOutputand callsStyledTextModel.export(TextPos, TextPos, StyledOutput)method.- Specified by:
savein classDataFormatHandler- Parameters:
model- source modelresolver- view-specific style resolverstart- start text positionend- end text positionout- targetOutputStream- Throws:
IOException- when an I/O error occurs
-