public abstract class ContainerComponent extends ComponentBase implements AddChild
eventListenerList
Modifier | Constructor and Description |
---|---|
protected |
ContainerComponent()
Initializes a new instance of the ContainerComponent 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(java.awt.geom.Rectangle2D.Float availableSpace,
java.awt.Graphics2D g2d)
ComponentBase.arrangeComponents override.
|
void |
draw(java.awt.Graphics2D g,
RenderOptions ro)
ComponentBase.draw override.
|
int |
getChildCount()
Gets the number of child components of this component.
|
java.util.List<ComponentBase> |
getComponents()
Gets the child components of this container.
|
void |
loadComponents(org.w3c.dom.Element xmlElement,
XmlPersistContext context)
For internal use.
|
void |
loadComponents(com.mindfusion.common.JsonObject obj,
JsonPersistContext context)
Loads the child components from Json.
|
protected void |
loadFromJson(com.mindfusion.common.JsonObject obj,
JsonPersistContext context)
Deserializes the component from a JsonObject.
|
protected void |
loadFromXml(org.w3c.dom.Element xmlElement,
XmlPersistContext context)
ComponentBase.loadFromXml override.
|
void |
readExternal(java.io.ObjectInput in)
ComponentBase.readExternal override.
|
void |
saveComponents(org.w3c.dom.Element xmlElement,
XmlPersistContext context)
For internal use.
|
void |
saveComponents(com.mindfusion.common.JsonObject obj,
JsonPersistContext context)
Saves the child components to Json.
|
protected void |
saveToJson(com.mindfusion.common.JsonObject obj,
JsonPersistContext context)
Serializes the component into a JsonObject.
|
protected void |
saveToXml(org.w3c.dom.Element xmlElement,
XmlPersistContext context)
ComponentBase.saveToXml override.
|
void |
writeExternal(java.io.ObjectOutput out)
ComponentBase.writeExternal override.
|
addComponentEventListener, addComponentMouseEventListener, addComponentValidationEventListener, confirmValidating, contains, createOutlinePath, find, getBounds, getCursor, getDesiredSize, getDocumentBounds, getFocusable, getGridColumn, getGridRow, getHeight, getHorizontalAlignment, getIsEnabled, getIsFocused, getIsHitTestVisible, getIsInteractive, getName, getParent, getParentHost, getVerticalAlignment, getVisible, getWidth, invalidate, invalidateLayout, onAddedToParent, onContextChanged, onGotFocus, onGotFocus, onKeyDown, onKeyPress, onKeyUp, onLostFocus, onLostFocus, onMouseDown, onMouseDown, onMouseMove, onMouseMove, onMouseUp, onMouseUp, onRemovedFromParent, onUnitChanged, onValidated, onValidating, onZoomChanged, raiseValidated, removeComponentEventListener, removeComponentMouseEventListener, removeComponentValidationEventListener, serializeSubcomponents, setBounds, setFocusable, setGridColumn, setGridRow, setHeight, setHorizontalAlignment, setIsEnabled, setIsFocused, setIsHitTestVisible, setIsInteractive, setName, setParent, setVerticalAlignment, setVisible, setWidth, toDocument, toLocal, toParent
protected ContainerComponent()
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
public void addChild(java.lang.Object child)
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) throws javax.xml.transform.TransformerException
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.javax.xml.transform.TransformerException
public void saveComponents(org.w3c.dom.Element xmlElement, XmlPersistContext context)
public void loadComponents(org.w3c.dom.Element xmlElement, XmlPersistContext context) throws javax.xml.transform.TransformerException
javax.xml.transform.TransformerException
protected void saveToJson(com.mindfusion.common.JsonObject obj, JsonPersistContext context)
saveToJson
in class ComponentBase
obj
- An JsonObject containing the ContainerComponent datacontext
- An JsonPersistContext object providing information about the serialization process and some helper methods.protected void loadFromJson(com.mindfusion.common.JsonObject obj, JsonPersistContext context)
loadFromJson
in class ComponentBase
obj
- An JsonObject containing the ContainerComponent datacontext
- An JsonPersistContext object providing information about the serialization process and some helper methods.public void saveComponents(com.mindfusion.common.JsonObject obj, JsonPersistContext context)
obj
- An JsonObject containing the ContainerComponent datacontext
- An JsonPersistContext object providing information
about the serialization process and some helper methods.public void loadComponents(com.mindfusion.common.JsonObject obj, JsonPersistContext context)
obj
- An JsonObject containing the ContainerComponent datacontext
- An JsonPersistContext object providing information
about the serialization process and some helper methods.public void draw(java.awt.Graphics2D g, RenderOptions ro)
draw
in class ComponentBase
g
- The drawing target.ro
- A RenderOptions object specifying the drawing context.public void arrangeComponents(java.awt.geom.Rectangle2D.Float availableSpace, java.awt.Graphics2D g2d)
arrangeComponents
in class ComponentBase
availableSpace
- The space available for arrangement.g2d
- A relevant Graphics2D object.public void accept(ComponentVisitor visitor)
public java.util.List<ComponentBase> getComponents()
public int getChildCount()
getChildCount
in class ComponentBase