Commit 8d6e0bc7 authored by Stephan Kreutzer's avatar Stephan Kreutzer

text_position_retriever_1: Support for absolute end position.

parent adea4d48
/* Copyright (C) 2017 Stephan Kreutzer
/* Copyright (C) 2017-2019 Stephan Kreutzer
*
* This file is part of text_position_retriever_1, a submodule of the
* digital_publishing_workflow_tools package.
......@@ -97,7 +97,7 @@ class MouseEventListener extends MouseAdapter
MessageFormat formatter = new MessageFormat("");
formatter.applyPattern(this.positionFormatString);
Object positions[] = { startPosition, endPosition - startPosition };
Object positions[] = { startPosition, endPosition - startPosition, endPosition };
positionField.setText(formatter.format(positions));
}
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2017 Stephan Kreutzer
Copyright (C) 2017-2019 Stephan Kreutzer
This file is part of text_position_retriever_1, a submodule of the
digital_publishing_workflow_tools package.
......@@ -21,4 +21,8 @@ along with text_position_retriever_1. If not, see <http://www.gnu.org/licenses/>
<input-file path="input.txt"/>
<font-size point="16"/>
<position-format-string format=",start={0,number,#},length={1,number,#}"/>
<!--
https://www.w3.org/TR/annotation-model/#text-position-selector:
<position-format-string format="&lt;selector&gt;&lt;TextPositionSelector&gt;&lt;start&gt;{0,number,#}&lt;/start&gt;&lt;end&gt;{2,number,#}&lt;/end&gt;&lt;/TextPositionSelector&gt;&lt;/selector&gt;"/>
-->
</text-position-retriever-1-jobfile>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment