A layout is an area of an application's GUI which a user can customise by adding, removing and/or moving
module:ct-component/Component
s.
This interface allows you to view its properties, and insert components into it.
This interface uses emitr allowing classes implementing this interface to trigger events.
Members
(static) EVENT _NAMES :Object
A map of events that classes implementing this interface will trigger.
Type:
- Object
(static) EVENT _NAMES .PROPERTY _CHANGED :String
Triggered when a layouts property changes.
Type:
- String
Methods
get Name() → {String}
Returns the name of the layout. This is a display name only, and should not be used for identification.
Returns:
The name of the layout.
- Type
- String
get Property(property Name) → {String}
Returns the value of the layout's property.
Parameters:
Name | Type | Description |
---|---|---|
propertyName |
String | The name of the property to retrieve. |
Returns:
- Type
- String
insert Component(component, name)
Inserts the given component into the layout.
Parameters:
Name | Type | Description |
---|---|---|
component |
module:ct-component |
The component to be added to the layout. |
name |
String | The display name for the component. |
is Closable() → {Boolean}
Returns true
if this layout can be closed, false
otherwise.
Returns:
- Type
- Boolean
is Saved() → {Boolean}
Returns true
if this layout is saved, false
otherwise.
Returns:
- Type
- Boolean
is Writable(component, name)
Returns true
if this layout can be saved, false
otherwise.
Attempting to call module:ct-layout/LayoutService#save
with a layout that isn't writable will result in an
error being thrown. To save a layout that isn't writable, use module:ct-layout/LayoutService#saveAs
instead.
Parameters:
Name | Type | Description |
---|---|---|
component |
module:ct-component |
The component to be added to the layout. |
name |
String | The display name for the component. |
set Name(name)
Updates the name of the layout.
Parameters:
Name | Type | Description |
---|---|---|
name |
String | The new name of the layout. |