diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
commit | ed5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch) | |
tree | 7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /android/source/src/java/org/libreoffice/canvas/SelectionHandleStart.java | |
parent | Initial commit. (diff) | |
download | libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.tar.xz libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.zip |
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'android/source/src/java/org/libreoffice/canvas/SelectionHandleStart.java')
-rw-r--r-- | android/source/src/java/org/libreoffice/canvas/SelectionHandleStart.java | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/android/source/src/java/org/libreoffice/canvas/SelectionHandleStart.java b/android/source/src/java/org/libreoffice/canvas/SelectionHandleStart.java new file mode 100644 index 000000000..ad28826f6 --- /dev/null +++ b/android/source/src/java/org/libreoffice/canvas/SelectionHandleStart.java @@ -0,0 +1,34 @@ +package org.libreoffice.canvas; + +import org.libreoffice.LibreOfficeMainActivity; + +import org.libreoffice.R; + +/** + * Selection handle for showing and manipulating the start of a selection. + */ +public class SelectionHandleStart extends SelectionHandle { + public SelectionHandleStart(LibreOfficeMainActivity context) { + super(context, getBitmapForDrawable(context, R.drawable.handle_alias_start)); + } + + /** + * Change the position of the handle on the screen. Take into account the + * handle alignment to the right. + */ + @Override + public void reposition(float x, float y) { + super.reposition(x, y); + // align to the right + float offset = mScreenPosition.width(); + mScreenPosition.offset(-offset, 0); + } + + /** + * Define the type of the handle. + */ + @Override + public HandleType getHandleType() { + return HandleType.START; + } +}
\ No newline at end of file |