鴻蒙OS CaptionProperties

2022-09-05 10:12 更新

CaptionProperties

java.lang.Object

|---ohos.accessibility.CaptionProperties

  1. public class CaptionProperties
  2. extends Object

配置視頻字幕的視覺(jué)屬性,包括文本大小、語(yǔ)言、前景色、背景色、邊框?qū)傩院妥煮w。

字段摘要

修飾符和類(lèi)型 字段 描述
static String CAPTION_PROP_BACKGROUND_COLOR 指示背景顏色。
static String CAPTION_PROP_EDGE_COLOR 表示邊緣顏色。
static String CAPTION_PROP_EDGE_TYPE 表示邊類(lèi)型。
static String CAPTION_PROP_FOREGROUND_COLOR 表示前景色。
static String CAPTION_PROP_WINDOW_COLOR 指示窗口顏色。

構(gòu)造函數(shù)摘要

構(gòu)造函數(shù) 描述
CaptionProperties() 默認(rèn)構(gòu)造函數(shù)。

方法總結(jié)

修飾符和類(lèi)型 方法 描述
boolean checkProperty(String propertyName) 檢查是否為字幕設(shè)置了視覺(jué)屬性。
從類(lèi) java.lang.Object 繼承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

字段詳細(xì)信息

CAPTION_PROP_BACKGROUND_COLOR

public static final String CAPTION_PROP_BACKGROUND_COLOR

指示背景顏色。

CAPTION_PROP_EDGE_COLOR

public static final String CAPTION_PROP_EDGE_COLOR

表示邊緣顏色。

CAPTION_PROP_EDGE_TYPE

public static final String CAPTION_PROP_EDGE_TYPE

表示邊類(lèi)型。

CAPTION_PROP_FOREGROUND_COLOR

public static final String CAPTION_PROP_FOREGROUND_COLOR

表示前景色。

CAPTION_PROP_WINDOW_COLOR

public static final String CAPTION_PROP_WINDOW_COLOR

指示窗口顏色。

構(gòu)造函數(shù)詳細(xì)信息

CaptionProperties

public CaptionProperties()

默認(rèn)構(gòu)造函數(shù)。

方法詳情

checkProperty

public boolean checkProperty(String propertyName)

檢查是否為字幕設(shè)置了視覺(jué)屬性。 如果尚未設(shè)置屬性,則使用默認(rèn)值。 以下屬性可用:

  • CAPTION_PROP_BACKGROUND_COLOR
  • CAPTION_PROP_EDGE_COLOR
  • CAPTION_PROP_EDGE_TYPE
  • CAPTION_PROP_FOREGROUND_COLOR
  • CAPTION_PROP_WINDOW_COLOR

參數(shù):

參數(shù)名稱(chēng) 參數(shù)描述
propertyName 標(biāo)識(shí)字幕的視覺(jué)屬性。

返回:

如果屬性已設(shè)置,則返回 True; 否則返回 False。

以上內(nèi)容是否對(duì)您有幫助:
在線(xiàn)筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號(hào)
微信公眾號(hào)

編程獅公眾號(hào)