new module:ct-layout /testing /Layout Service Stub()
A stub implementation of the module:ct-layout/LayoutService
that can be used as a replacement for the real
implementation in workbenches and tests.
This class shouldn't be instantiated directly. It is available trough the service registry under the
caplin.layout-service
alias when you are running the "dev" scenario (workbench and tests).
- Implements:
Members
(static) EVENT _NAMES
A map of "requested" events that will get triggered when user code interacts with the
caplin.layout-service
service.
Contains the following events:
- REQUESTED.OPEN
-
Triggered when
module:ct-layout/LayoutService#open
is called.PARAMETERSmodule:ct-layout/Layout
layout The layout to be opened. - REQUESTED.OPEN_NEW
- Triggered when
module:ct-layout/LayoutService#openNew
is called.PARAMETERSmodule:ct-layout/LayoutTemplate
template The layout template to be opened. - REQUESTED.SELECT
- Triggered when
module:ct-layout/LayoutService#select
is called.PARAMETERSmodule:ct-layout/Layout
layout The layout to be selected. - REQUESTED.CLOSE
- Triggered when
module:ct-layout/LayoutService#close
is called.PARAMETERSmodule:ct-layout/Layout
layout The layout to be closed. - REQUESTED.SAVE
- Triggered when
module:ct-layout/LayoutService#save
is called.PARAMETERSmodule:ct-layout/Layout
layout The layout to be saved. - REQUESTED.SAVE_AS
- Triggered when
module:ct-layout/LayoutService#saveAs
is called.PARAMETERSmodule:ct-layout/Layout
layout The layout to be saved. String name The name to be given to the new layout. - REQUESTED.DISPOSE
- Triggered when
module:ct-layout/LayoutService#dispose
is called.PARAMETERSmodule:ct-layout/Layout
layout The layout to be disposed.
Methods
clone()
Triggers a REQUESTED.CLONE
event.
- Implements:
- See:
close()
Triggers a REQUESTED.CLOSE
event.
- Implements:
- See:
create Layout(nameopt, is Closableopt) → {module:ct-layout/t esting .Layout Stub}
Creates a new module:ct-layout/testing/LayoutStub
.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
name |
String |
<optional> |
Name of the new layout. |
isClosable |
Boolean |
<optional> |
Can the newly created layout be closed or not. |
Returns:
- Type
-
module:ct-layout
/testing .Layout Stub
create Layout Template(nameopt) → {module:ct-layout /testing /Layout Template Stub}
Creates a new module:ct-layout/testing/LayoutTemplateStub
.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
name |
String |
<optional> |
Name of the new template. |
Returns:
dispose()
Triggers a REQUESTED.DISPOSE
event.
do Clone()
Perform the actual clone of the layout.
do Close()
Perform the actual closing of the layout.
do Dispose()
Perform the actual deleting of the layout.
do Open()
Perform the actual opening of the layout.
do Open New()
Perform the actual openening of a new layout.
do Save()
Perform the actual save of the layout.
do Save As()
Perform the actual save as of the layout.
do Select()
Perform the actual selection of the layout.
get Available()
- Implements:
- See:
get Open()
get Selected()
- Implements:
- See:
get Templates()
- Implements:
- See:
open()
Triggers a REQUESTED.OPEN
event.
- Implements:
- See:
open New()
Triggers a REQUESTED.OPEN_NEW
event. If no template is passed, the first template in the service's list
of templates will be used as a default.
save()
Triggers a REQUESTED.SAVE
event.
- Implements:
- See:
save As()
Triggers a REQUESTED.SAVE_AS
event.
select()
Triggers a REQUESTED.SELECT
event.
start Event Proxy()
Starts the event proxy which automatically responds to any "-requested" events and calls the corresponding "do" method on the stub layout service.
stop Event Proxy()
Stops the event proxy.