Package com._1c.g5.aef2.scenes
Class Scene
- java.lang.Object
-
- com._1c.g5.aef2.scenes.Scene
-
- All Implemented Interfaces:
IServiceEventTracker
,IScene
public final class Scene extends Object implements IScene
DefaultIScene
implementation.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addSceneListener(ISceneListener listener)
Adds this scene listener.IState
clearState(IComponent<?> component)
Clears state for the givencomponent
.void
commit(IComponent<?> component)
Commits the model for the given component.void
dispose()
Disposes this scene.IComponent<?>
getComponent()
Returns the root component of this scene.IEngine
getEngine()
IRenderer<?>
getRenderer()
IState
getState(IComponent<?> component)
Returns the current state for the givencomponent
.void
handleComponentEvent(IComponent<?> component, IEvent event)
Notifies the scene that a component-specific event has happened.IState
putState(IComponent<?> component, IState state)
Puts the specifiedstate
for the givencomponent
.void
queueEvent(Object query, IClientEvent event)
Finds a component by a query using the registered search providers and queues an event for it.void
refresh()
Refreshes this scene presentation completely.void
refresh(IComponent<?> component)
Refreshes this scene's subtree presentation starting at the given component.void
registerSearchProvider(IComponentSearchProvider searchProvider)
Registers a provider to be used by the scene for searching components.void
registerServiceConsumer(IServiceConsumer<?> serviceConsumer)
Registers a given service consumer instance.void
relayout()
Triggers this scene's layout processing.void
removeSceneListener(ISceneListener listener)
Removes this scene listener.void
setComponent(IComponent<?> component)
Sets the root component of this scene.void
setRenderer(IRenderer<?> renderer)
Sets this scene renderer.void
trackEvent(IServiceEvent event)
Tracks the given event.void
unregisterSearchProvider(IComponentSearchProvider searchProvider)
Unregisters a provider used by the scene for searching components.
-
-
-
Constructor Detail
-
Scene
public Scene(IEngine engine)
Instantiates a new scene.- Parameters:
engine
- the engine to construct a scene for.
-
-
Method Detail
-
getEngine
public IEngine getEngine()
-
getRenderer
public IRenderer<?> getRenderer()
- Specified by:
getRenderer
in interfaceIScene
- Returns:
- this scene renderer.
-
setComponent
public void setComponent(IComponent<?> component)
Description copied from interface:IScene
Sets the root component of this scene.- Specified by:
setComponent
in interfaceIScene
- Parameters:
component
- the component to set as the root.
-
getComponent
public final IComponent<?> getComponent()
Description copied from interface:IScene
Returns the root component of this scene.- Specified by:
getComponent
in interfaceIScene
- Returns:
- the root component of this scene.
-
setRenderer
public void setRenderer(IRenderer<?> renderer)
Description copied from interface:IScene
Sets this scene renderer.- Specified by:
setRenderer
in interfaceIScene
- Parameters:
renderer
- the renderer to set.
-
refresh
public void refresh()
Description copied from interface:IScene
Refreshes this scene presentation completely.
-
relayout
public void relayout()
Description copied from interface:IScene
Triggers this scene's layout processing.
-
refresh
public void refresh(IComponent<?> component)
Description copied from interface:IScene
Refreshes this scene's subtree presentation starting at the given component.
-
commit
public void commit(IComponent<?> component)
Description copied from interface:IScene
Commits the model for the given component.- Specified by:
commit
in interfaceIScene
- Parameters:
component
- the component to perform commit for.- See Also:
IComponent.commit()
,IComponent.areChildCommitsEnabled()
,IModel.commit()
-
addSceneListener
public void addSceneListener(ISceneListener listener)
Description copied from interface:IScene
Adds this scene listener.- Specified by:
addSceneListener
in interfaceIScene
- Parameters:
listener
- the listener to add.
-
removeSceneListener
public void removeSceneListener(ISceneListener listener)
Description copied from interface:IScene
Removes this scene listener.- Specified by:
removeSceneListener
in interfaceIScene
- Parameters:
listener
- the listener to remove.
-
dispose
public void dispose()
Description copied from interface:IScene
Disposes this scene.
-
registerServiceConsumer
public void registerServiceConsumer(IServiceConsumer<?> serviceConsumer)
Description copied from interface:IScene
Registers a given service consumer instance.- Specified by:
registerServiceConsumer
in interfaceIScene
- Parameters:
serviceConsumer
- a service consumer.- See Also:
IServiceConsumer
,IServiceEventTracker
-
trackEvent
public void trackEvent(IServiceEvent event)
Description copied from interface:IServiceEventTracker
Tracks the given event.- Specified by:
trackEvent
in interfaceIServiceEventTracker
- Parameters:
event
- the service event.
-
registerSearchProvider
public void registerSearchProvider(IComponentSearchProvider searchProvider)
Description copied from interface:IScene
Registers a provider to be used by the scene for searching components.- Specified by:
registerSearchProvider
in interfaceIScene
- Parameters:
searchProvider
- The search provider
-
unregisterSearchProvider
public void unregisterSearchProvider(IComponentSearchProvider searchProvider)
Description copied from interface:IScene
Unregisters a provider used by the scene for searching components.- Specified by:
unregisterSearchProvider
in interfaceIScene
-
queueEvent
public void queueEvent(Object query, IClientEvent event)
Description copied from interface:IScene
Finds a component by a query using the registered search providers and queues an event for it.- Specified by:
queueEvent
in interfaceIScene
- Parameters:
query
- The query for identifying the component to queue the event toevent
- The event to be queued- See Also:
IScene.registerSearchProvider(IComponentSearchProvider)
-
handleComponentEvent
public void handleComponentEvent(IComponent<?> component, IEvent event)
Description copied from interface:IScene
Notifies the scene that a component-specific event has happened.- Specified by:
handleComponentEvent
in interfaceIScene
- Parameters:
component
- The component from which originates the eventevent
- The event that has happened with the component
-
putState
public IState putState(IComponent<?> component, IState state)
Description copied from interface:IScene
Puts the specifiedstate
for the givencomponent
.
-
clearState
public IState clearState(IComponent<?> component)
Description copied from interface:IScene
Clears state for the givencomponent
.- Specified by:
clearState
in interfaceIScene
- Parameters:
component
- the component, cannot benull
.- Returns:
- the previous stored state, can be
null
if there are no state for the specifiedcomponent
.
-
getState
public IState getState(IComponent<?> component)
Description copied from interface:IScene
Returns the current state for the givencomponent
.
-
-