Constructor
new module:caplin/layout/testing/LayoutServiceStub()
A stub implementation of the
module:caplin/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:caplin/layout/LayoutService#open
is called.PARAMETERSmodule:caplin/layout/Layout
layout The layout to be opened. - REQUESTED.OPEN_NEW
- Triggered when
module:caplin/layout/LayoutService#openNew
is called.PARAMETERSmodule:caplin/layout/LayoutTemplate
template The layout template to be opened. - REQUESTED.SELECT
- Triggered when
module:caplin/layout/LayoutService#select
is called.PARAMETERSmodule:caplin/layout/Layout
layout The layout to be selected. - REQUESTED.CLOSE
- Triggered when
module:caplin/layout/LayoutService#close
is called.PARAMETERSmodule:caplin/layout/Layout
layout The layout to be closed. - REQUESTED.SAVE
- Triggered when
module:caplin/layout/LayoutService#save
is called.PARAMETERSmodule:caplin/layout/Layout
layout The layout to be saved. - REQUESTED.SAVE_AS
- Triggered when
module:caplin/layout/LayoutService#saveAs
is called.PARAMETERSmodule:caplin/layout/Layout
layout The layout to be saved. String name The name to be given to the new layout. - REQUESTED.DISPOSE
- Triggered when
module:caplin/layout/LayoutService#dispose
is called.PARAMETERSmodule:caplin/layout/Layout
layout The layout to be disposed.
- Implements:
Methods
-
clone()
-
Triggers a
REQUESTED.CLONE
event. -
close()
-
Triggers a
REQUESTED.CLOSE
event. -
createLayout(nameopt, isClosableopt) → {module:caplin/layout/testing.LayoutStub}
-
Creates a new
module:caplin/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:caplin/layout/testing.LayoutStub
-
createLayoutTemplate(nameopt) → {module:caplin/layout/testing/LayoutTemplateStub}
-
Creates a new
module:caplin/layout/testing/LayoutTemplateStub
.Parameters:
Name Type Attributes Description name
String <optional>
Name of the new template. Returns:
-
dispose()
-
Triggers a
REQUESTED.DISPOSE
event. -
doClone()
-
Perform the actual clone of the layout.
-
doClose()
-
Perform the actual closing of the layout.
-
doDispose()
-
Perform the actual deleting of the layout.
-
doOpen()
-
Perform the actual opening of the layout.
-
doOpenNew()
-
Perform the actual openening of a new layout.
-
doSave()
-
Perform the actual save of the layout.
-
doSaveAs()
-
Perform the actual save as of the layout.
-
doSelect()
-
Perform the actual selection of the layout.
-
getAvailable()
-
getOpen()
-
getSelected()
-
getTemplates()
-
open()
-
Triggers a
REQUESTED.OPEN
event. -
openNew()
-
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. -
saveAs()
-
Triggers a
REQUESTED.SAVE_AS
event. -
select()
-
Triggers a
REQUESTED.SELECT
event. -
startEventProxy()
-
Starts the event proxy which automatically responds to any "-requested" events and calls the corresponding "do" method on the stub layout service.
-
stopEventProxy()
-
Stops the event proxy.