日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷解決方案
創(chuàng)新互聯(lián)鴻蒙OS教程:鴻蒙OSComponentParent

ComponentParent

我們提供的服務(wù)有:網(wǎng)站建設(shè)、成都網(wǎng)站建設(shè)、微信公眾號(hào)開發(fā)、網(wǎng)站優(yōu)化、網(wǎng)站認(rèn)證、鎮(zhèn)寧ssl等。為成百上千家企事業(yè)單位解決了網(wǎng)站和推廣的問題。提供周到的售前咨詢和貼心的售后服務(wù),是有科學(xué)管理、有技術(shù)的鎮(zhèn)寧網(wǎng)站制作公司

public interface ComponentParent

定義父組件的特征。

此類為組件提供與其父組件交互的接口。

方法總結(jié)

修飾符和類型 方法 描述
int getChildIndex(Component component) 查詢子組件的位置。
ComponentParent getComponentParent() 獲取子組件的父組件。
void moveChildToFront(Component component) 調(diào)整子組件的 z 順序,使其位于所有子組件之上。
boolean onDrag(Component component, DragEvent event) 檢查拖動(dòng)事件是否分發(fā)到父組件。
void postLayout() 請(qǐng)求父組件重新排列其布局。
void removeComponent(Component component) 從父組件中移除子組件。
void removeComponentAt(int index) 從組件列表中的指定位置移除組件。
void removeComponents(int start, int count) 從組件列表中的指定位置移除所有組件。
ComponentContainer.LayoutConfig verifyLayoutConfig(ComponentContainer.LayoutConfig config) 根據(jù)當(dāng)前布局類型驗(yàn)證布局參數(shù)。

方法詳情

postLayout

void postLayout()

請(qǐng)求父組件重新排列其布局。

getChildIndex

int getChildIndex(Component component)

查詢子組件的位置。

參數(shù):

參數(shù)名稱 參數(shù)描述
component 指示要查詢的子組件。

返回:

返回一個(gè)正整數(shù),表示子組件在父組件中的位置; 如果子組件不包含在父組件中,則返回 -1。

removeComponent

void removeComponent(Component component)

從父組件中移除子組件。

參數(shù):

參數(shù)名稱 參數(shù)描述
component 指示要移除的子組件。

removeComponentAt

void removeComponentAt(int index)

從組件列表中的指定位置移除組件。

參數(shù):

參數(shù)名稱 參數(shù)描述
index 指示要移除的組件的位置索引。

removeComponents

void removeComponents(int start, int count)

從組件列表中的指定位置移除所有組件。

參數(shù):

參數(shù)名稱 參數(shù)描述
start 表示第一個(gè)移除的組件的位置索引。
count 表示要移除的組件數(shù)量。

verifyLayoutConfig

ComponentContainer.LayoutConfig verifyLayoutConfig(ComponentContainer.LayoutConfig config)

根據(jù)當(dāng)前布局類型驗(yàn)證布局參數(shù)。

參數(shù):

參數(shù)名稱 參數(shù)描述
config 指示要轉(zhuǎn)換為 ComponentContainer 實(shí)例的一組布局參數(shù)。

返回:

返回 LayoutConfig 實(shí)例,它表示布局參數(shù)。

getComponentParent

ComponentParent getComponentParent()

獲取子組件的父組件。

返回:

返回子組件的父組件。

moveChildToFront

void moveChildToFront(Component component)

調(diào)整子組件的 z 順序,使其位于所有子組件之上。

z 順序調(diào)整會(huì)更改順序相關(guān)的布局。

參數(shù):

參數(shù)名稱 參數(shù)描述
component 指示要移動(dòng)到所有子組件頂部的子組件。

onDrag

boolean onDrag(Component component, DragEvent event)

檢查拖動(dòng)事件是否分發(fā)到父組件。

參數(shù):

參數(shù)名稱 參數(shù)描述
component 表示接收拖動(dòng)事件的組件。
event 指示 DragEvent 對(duì)象。

返回:

如果拖動(dòng)事件已經(jīng)被父組件處理,則返回 true; 否則返回 false。


分享標(biāo)題:創(chuàng)新互聯(lián)鴻蒙OS教程:鴻蒙OSComponentParent
本文網(wǎng)址:http://www.5511xx.com/article/dhdihhi.html