public class ShapeComponent extends ComponentBase
emptyRectangle
Constructor and Description |
---|
ShapeComponent()
Initializes a new instance of the ShapeComponent class.
|
Modifier and Type | Method and Description |
---|---|
protected android.graphics.Path |
createGeneralPath()
Creates a GeneralPath object representing the shape.
|
android.graphics.Path |
createOutlinePath(android.graphics.RectF bounds,
float rotationAngle)
ComponentBase.createOutlinePath override.
|
void |
draw(android.graphics.Canvas g2d,
RenderOptions options)
ComponentBase.draw override.
|
Brush |
getBrush()
Gets the brush used to fill the component.
|
boolean |
getIsOutline()
Gets a value indicating whether this component defines the outline of its host.
|
Pen |
getPen()
Gets the pen used to stroke the outline of the component.
|
Shape |
getShape()
Gets the Shape object defining the outline 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 |
setBrush(Brush value)
Sets the brush used to fill the component.
|
void |
setIsOutline(boolean value)
Sets a value indicating whether this component defines the outline of its host.
|
void |
setPen(Pen value)
Sets the pen used to stroke the outline of the component.
|
void |
setShape(Shape value)
Sets the Shape object defining the outline of the component.
|
void |
writeExternal(java.io.ObjectOutput out)
ComponentBase.writeExternal override.
|
arrangeComponents, contains, find, getBounds, getChildCount, getCursor, getDesiredSize, 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 ShapeComponent()
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.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
readExternal
in class ComponentBase
java.io.IOException
java.lang.ClassNotFoundException
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 draw(android.graphics.Canvas g2d, RenderOptions options)
draw
in class ComponentBase
g2d
- The drawing target.options
- A RenderOptions object specifying the drawing context.public android.graphics.Path createOutlinePath(android.graphics.RectF bounds, float rotationAngle)
createOutlinePath
in class ComponentBase
protected android.graphics.Path createGeneralPath()
public void setShape(Shape value)
value
- An instance of the Shape class.public Shape getShape()
public void setPen(Pen value)
value
- An instance of the Pen class. The default is null.public Pen getPen()
public void setBrush(Brush value)
value
- An instance of a Brush-derived class. The default is null.public Brush getBrush()
public void setIsOutline(boolean value)
value
- true to mark this component as the node's outline, otherwise false. The default value is false.public boolean getIsOutline()