public class ContentComponent extends ComponentBase implements AddChild
emptyRectangle
Constructor and Description |
---|
ContentComponent()
Initializes a new instance of the ContentComponent class.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(ComponentVisitor visitor)
ComponentBase.accept override.
|
void |
addChild(java.lang.Object child)
Implements AddChild.addChild
|
void |
arrangeComponents(android.graphics.RectF availableSpace,
android.graphics.Canvas g2d)
ComponentBase.arrangeComponents override.
|
void |
draw(android.graphics.Canvas g,
RenderOptions options)
ComponentBase.draw override.
|
int |
getChildCount()
ComponentBase.getChildCount override.
|
ComponentBase |
getContent()
Gets the content of this component.
|
Dimension |
getDesiredSize(Dimension availableSize,
android.graphics.Canvas g2d)
ComponentBase.getDesiredSize override.
|
Thickness |
getPadding()
Gets the padding around this component's content.
|
protected Thickness |
getThickness()
Gets the space around the component's content.
|
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 |
setContent(ComponentBase value)
Sets the content of this component.
|
void |
setPadding(Thickness value)
Sets the padding around this component's content.
|
void |
writeExternal(java.io.ObjectOutput out)
ComponentBase.writeExternal override.
|
contains, createOutlinePath, find, getBounds, 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, toParent
public ContentComponent()
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
writeExternal
in class ComponentBase
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.lang.ClassNotFoundException, java.io.IOException
readExternal
in interface java.io.Externalizable
readExternal
in class ComponentBase
java.lang.ClassNotFoundException
java.io.IOException
protected void saveToXml(org.w3c.dom.Element xmlElement, XmlPersistContext context)
saveToXml
in class ComponentBase
xmlElement
- 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 ComponentBase
xmlElement
- 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 arrangeComponents(android.graphics.RectF availableSpace, android.graphics.Canvas g2d)
arrangeComponents
in class ComponentBase
availableSpace
- The space available for arrangement.g2d
- A relevant Canvas object.public void draw(android.graphics.Canvas g, RenderOptions options)
draw
in class ComponentBase
g
- The drawing target.options
- A RenderOptions object specifying the drawing context.public void addChild(java.lang.Object child)
public Dimension getDesiredSize(Dimension availableSize, android.graphics.Canvas g2d)
getDesiredSize
in class ComponentBase
availableSize
- The available size.g2d
- A relevant Canvas object.protected Thickness getThickness()
public void accept(ComponentVisitor visitor)
public ComponentBase getContent()
public void setContent(ComponentBase value)
value
- An instance of the ComponentBase class representing the sole child of the component.public Thickness getPadding()
public void setPadding(Thickness value)
value
- A Thickness object specifying the spacing between this component and its child. The default is 0.public int getChildCount()
getChildCount
in class ComponentBase