public class ImageComponent extends ComponentBase
emptyRectangle| Constructor and Description |
|---|
ImageComponent()
Initializes a new instance of the ImageComponent class.
|
| Modifier and Type | Method and Description |
|---|---|
void |
draw(android.graphics.Canvas g2d,
RenderOptions options)
ComponentBase.draw override.
|
Dimension |
getDesiredSize(Dimension availableSize,
android.graphics.Canvas g2d)
ComponentBase.getDesiredSize override.
|
android.graphics.Bitmap |
getImage()
Gets the displayed image.
|
ImageAlign |
getImageAlign()
Gets the alignment of the displayed image relative to the bounds of the component.
|
protected void |
loadFromXml(org.w3c.dom.Element xmlElement,
XmlPersistContext context)
ComponentBase.loadFromXml override.
|
void |
readExternal(java.io.ObjectInput in)
ComponentBase.readExternal override.
|
protected void |
saveToXml(org.w3c.dom.Element xmlElement,
XmlPersistContext context)
ComponentBase.saveToXml override.
|
void |
setImage(android.graphics.Bitmap value)
Sets the displayed image.
|
void |
setImageAlign(ImageAlign value)
ComponentBase.onMouseDown override.
|
void |
writeExternal(java.io.ObjectOutput out)
ComponentBase.writeExternal override.
|
arrangeComponents, contains, createOutlinePath, find, getBounds, getChildCount, getCursor, getDocumentBounds, getFocusable, getGridColumn, getGridRow, getHeight, getHorizontalAlignment, getIsEnabled, getIsFocused, getIsHitTestVisible, getIsInteractive, getName, getParent, getParentHost, getVerticalAlignment, getVisible, getWidth, invalidate, invalidateLayout, onAddedToParent, onContextChanged, onGotFocus, onKeyPress, onLostFocus, onMouseDown, onMouseMove, onMouseUp, onRemovedFromParent, onUnitChanged, onZoomChanged, serializeSubcomponents, setBounds, setFocusable, setGridColumn, setGridRow, setHeight, setHorizontalAlignment, setIsEnabled, setIsFocused, setIsHitTestVisible, setIsInteractive, setName, setParent, setVerticalAlignment, setVisible, setWidth, toDocument, toLocal, toParentpublic ImageComponent()
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.ExternalizablewriteExternal in class ComponentBasejava.io.IOExceptionpublic void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.ExternalizablereadExternal in class ComponentBasejava.io.IOExceptionjava.lang.ClassNotFoundExceptionprotected void saveToXml(org.w3c.dom.Element xmlElement,
XmlPersistContext context)
saveToXml in class ComponentBasexmlElement - An Element the component's data should be stored into.context - An XmlPersistContext object providing contextual information about the serialization process and some helper serialization methods.protected void loadFromXml(org.w3c.dom.Element xmlElement,
XmlPersistContext context)
loadFromXml in class ComponentBasexmlElement - An Element containing the component's data.context - An XmlPersistContext object providing contextual information about the serialization process and some helper serialization methods.public void draw(android.graphics.Canvas g2d,
RenderOptions options)
draw in class ComponentBaseg2d - The drawing target.options - A RenderOptions object specifying the drawing context.public Dimension getDesiredSize(Dimension availableSize, android.graphics.Canvas g2d)
getDesiredSize in class ComponentBaseavailableSize - The available size.g2d - A relevant Canvas object.public void setImageAlign(ImageAlign value)
public ImageAlign getImageAlign()
public void setImage(android.graphics.Bitmap value)
value - An instance of the Image class. The default is null.public android.graphics.Bitmap getImage()