Button
类:Button组件类
Constructor
new Glodon.Bimface.Tiles.UI.Button(option)
构造按钮组件对象
Parameters:
| Name | Type | Description |
|---|---|---|
| option | Object | 构造按钮对象的配置项 |
Methods
addClass(class)
对组件增加CSS样式
Parameters:
| Name | Type | Description |
|---|---|---|
| class | String | CSS类名 |
getDimensions()
获取组件的尺寸信息
Returns:
| Type | Description |
|---|---|
| Object | 组件的尺寸信息 |
getId()
获取ID
Returns:
| Type | Description |
|---|---|
| String | ID |
getPosition()
获取组件的位置信息
Returns:
| Type | Description |
|---|---|
| Object | 组件的位置信息 |
getText()
获取按钮文字内容
Returns:
| Type | Description |
|---|---|
| String | 按钮文字内容 |
hide()
隐藏
isSelectable()
获取按钮是否允许选中
Returns:
| Type | Description |
|---|---|
| Boolean | 按钮是否允许选中 |
isSelected()
获取按钮当前的选中状态
Returns:
| Type | Description |
|---|---|
| Boolean | 按钮当前的选中状态 |
isVisible()
获取可见性状态
Returns:
| Type | Description |
|---|---|
| Boolean | 可见性状态 |
removeClass(class)
对组件移除CSS样式
Parameters:
| Name | Type | Description |
|---|---|---|
| class | String | CSS类名 |
setPosition(position)
设置组件的位置信息
Parameters:
| Name | Type | Description |
|---|---|---|
| position | Object | 组件的位置信息 |
setSelected(select)
设置按钮当前的选中状态
Parameters:
| Name | Type | Description |
|---|---|---|
| select | Boolean | 按钮当前的选中状态 |
setText(test)
设置按钮文字内容
Parameters:
| Name | Type | Description |
|---|---|---|
| test | String | 按钮文字内容 |
show()
显示
← TilesetLayer Checkbox →