public class ImageRichStyle extends RichStyle
RichText instance.
An inserted image replaces the text in a given range.
RichText.setRichStyle(RichStyle, int, int, RangedRichStyle.Flag)| 限定符和类型 | 类 | 说明 |
|---|---|---|
static class |
ImageRichStyle.ImageAlignment |
Enumerates vertical alignment modes of an image in the line where the image is located.
|
RichStyle.Capability, RichStyle.TypeId| 构造器 | 说明 |
|---|---|
ImageRichStyle(Element element) |
A constructor used to create an
ImageRichStyle instance based on the specified element. |
ImageRichStyle(Element element,
ImageRichStyle.ImageAlignment alignment) |
A constructor used to create an
ImageRichStyle instance based on the specified element
and alignment. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
Element |
getElement() |
Obtains the image in this
ImageRichStyle instance. |
ImageRichStyle.ImageAlignment |
getImageAlign() |
Obtains the vertical alignment mode of the image in this
ImageRichStyle instance. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCapability, getRichStyleTypeIdpublic ImageRichStyle(Element element)
ImageRichStyle instance based on the specified element.
The image uses ImageAlignment#BOTTOM as the vertical alignment mode.
element - Indicates an image.IllegalArgumentException - Throws this exception if the specified element is null.public ImageRichStyle(Element element, ImageRichStyle.ImageAlignment alignment)
ImageRichStyle instance based on the specified element
and alignment.element - Indicates an image.alignment - Indicates the vertical alignment mode of the image in the line. If this parameter is left
empty, ImageAlignment#BOTTOM is used.IllegalArgumentException - Throws this exception if the specified element is null.ImageRichStyle.ImageAlignmentpublic Element getElement()
ImageRichStyle instance.public ImageRichStyle.ImageAlignment getImageAlign()
ImageRichStyle instance.