A layout is an area of an application's GUI which a user can customise by adding, removing and/or moving
module:caplin/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.
- Implementations:
Members
-
(static) EVENT_NAMES :Object
-
A map of events that classes implementing this interface will trigger.
Type:
- Object
- Implementations:
- module:caplin/layout/testing/LayoutStub.EVENT_NAMES
Methods
-
getName() → {String}
-
Returns the name of the layout. This is a display name only, and should not be used for identification.
- Implementations:
Returns:
The name of the layout.- Type
- String
-
getProperty(propertyName) → {String}
-
Returns the value of the layout's property.
Parameters:
Name Type Description propertyName
String The name of the property to retrieve. - Implementations:
Returns:
- Type
- String
-
insertComponent(component, name)
-
Inserts the given component into the layout.
Parameters:
Name Type Description component
module:caplin/component/Component The component to be added to the layout. name
String The display name for the component. - Implementations:
-
isClosable() → {Boolean}
-
Returns
true
if this layout can be closed,false
otherwise.- Implementations:
Returns:
- Type
- Boolean
-
isSaved() → {Boolean}
-
Returns
true
if this layout is saved,false
otherwise.- Implementations:
Returns:
- Type
- Boolean
-
isWritable(component, name)
-
Returns
true
if this layout can be saved,false
otherwise. Attempting to callmodule:caplin/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, usemodule:caplin/layout/LayoutService#saveAs
instead.Parameters:
Name Type Description component
module:caplin/component/Component The component to be added to the layout. name
String The display name for the component. - Implementations:
-
setName(name)
-
Updates the name of the layout.
Parameters:
Name Type Description name
String The new name of the layout. - Implementations: