Interface
caplin.layout

Layout

A layout is an area of an application's GUI which a user can customise by adding, removing and/or moving caplin.component.Components.

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.

Constructor Summary

Attributes Name and Description
caplin.layout.Layout()

Field Summary

Attributes Name and Description
<static> caplin.layout.Layout.EVENT_NAMES

A map of events that classes implementing this interface will trigger.

Method Summary

Attributes Name and Description
String getName()

Returns the name of the layout.

String getProperty(String propertyName)

Returns the value of the layout's property.

void insertComponent(caplin.component.Component component, String name)

Inserts the given component into the layout.

Boolean isClosable()

Returns true if this layout can be closed, false otherwise.

Boolean isSaved()

Returns true if this layout is saved, false otherwise.

void isWritable(caplin.component.Component component, String name)

Returns true if this layout can be saved, false otherwise.

Constructor Detail

caplin.layout.Layout()

Field Detail

<static> caplin.layout.Layout.EVENT_NAMES

A map of events that classes implementing this interface will trigger.

Method Detail

String getName()

Returns the name of the layout. This is a display name only, and should not be used for identification.

Returns
{String} The name of the layout.

String getProperty(String propertyName)

Returns the value of the layout's property.

Parameters
String propertyName The name of the property to retrieve.
Returns
{String}

void insertComponent(caplin.component.Component component, String name)

Inserts the given component into the layout.

Parameters
caplin.component.Component component The component to be added to the layout.
String name The display name for the component.

Boolean isClosable()

Returns true if this layout can be closed, false otherwise.

Returns
{Boolean}

Boolean isSaved()

Returns true if this layout is saved, false otherwise.

Returns
{Boolean}

void isWritable(caplin.component.Component component, String name)

Returns true if this layout can be saved, false otherwise. Attempting to call 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, use caplin.layout.LayoutService#saveAs instead.

Parameters
caplin.component.Component component The component to be added to the layout.
String name The display name for the component.