AdaptiveBoxLayout, ComponentContainer, DatePicker, DependentLayout, DirectionalLayout, EventBadge, FlexLayout, ListComponent, ListContainer, MagicLayout, NestedScrollCoordinator, NestedScrollView, PageFlipper, PageSlider, Picker, PositionLayout, RadioContainer, ScrollView, SearchBar, SlideDrawer, StackLayout, TableLayout, TabList, TimePickerpublic interface ComponentParent
This class provides interfaces for a component to interact with its parent component.
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
int |
getChildIndex(Component component) |
Queries the position of a child component.
|
ComponentParent |
getComponentParent() |
Obtains the parent component of a child component.
|
void |
moveChildToFront(Component component) |
Adjusts the z-order of a child component to top the component over all child components.
|
boolean |
onDrag(Component component,
DragEvent event) |
Checks if a drag event is distributed to the parent component.
|
void |
postLayout() |
Requests the parent component to rearrange its layout.
|
void |
removeComponent(Component component) |
Removes a child component from the parent component.
|
void |
removeComponentAt(int index) |
Removes the component from a specified position in the component list.
|
void |
removeComponents(int start,
int count) |
Removes all components from specified positions in a component list.
|
ComponentContainer.LayoutConfig |
verifyLayoutConfig(ComponentContainer.LayoutConfig config) |
Verifies layout parameters based on the current layout type.
|
void postLayout()
int getChildIndex(Component component)
component - Indicates the child component to query.-1 if the child component is not included in the parent component.void removeComponent(Component component)
component - Indicates the child component to remove.void removeComponentAt(int index)
index - Indicates the position index of the component to remove.void removeComponents(int start,
int count)
start - Indicates the position index of the first removed component.count - Indicates the quantity of components to remove.ComponentContainer.LayoutConfig verifyLayoutConfig(ComponentContainer.LayoutConfig config)
config - Indicates a group of layout parameters to be converted into a ComponentContainer instance.LayoutConfig instance, which represents the layout parameters.ComponentParent getComponentParent()
void moveChildToFront(Component component)
An order-dependent layout is changed by the z-order adjustment.
component - Indicates the child component to be moved on the top of all child components.boolean onDrag(Component component, DragEvent event)
component - Indicates the component that receives the drag event.event - Indicates the DragEvent object.true if the drag event has been processed by the parent component; returns false
otherwise.