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
DefaultISceneimplementation.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSceneListener(ISceneListener listener)Adds this scene listener.IStateclearState(IComponent<?> component)Clears state for the givencomponent.voidcommit(IComponent<?> component)Commits the model for the given component.voiddispose()Disposes this scene.IComponent<?>getComponent()Returns the root component of this scene.IEnginegetEngine()IRenderer<?>getRenderer()IStategetState(IComponent<?> component)Returns the current state for the givencomponent.voidhandleComponentEvent(IComponent<?> component, IEvent event)Notifies the scene that a component-specific event has happened.IStateputState(IComponent<?> component, IState state)Puts the specifiedstatefor the givencomponent.voidqueueEvent(Object query, IClientEvent event)Finds a component by a query using the registered search providers and queues an event for it.voidrefresh()Refreshes this scene presentation completely.voidrefresh(IComponent<?> component)Refreshes this scene's subtree presentation starting at the given component.voidregisterSearchProvider(IComponentSearchProvider searchProvider)Registers a provider to be used by the scene for searching components.voidregisterServiceConsumer(IServiceConsumer<?> serviceConsumer)Registers a given service consumer instance.voidrelayout()Triggers this scene's layout processing.voidremoveSceneListener(ISceneListener listener)Removes this scene listener.voidsetComponent(IComponent<?> component)Sets the root component of this scene.voidsetRenderer(IRenderer<?> renderer)Sets this scene renderer.voidtrackEvent(IServiceEvent event)Tracks the given event.voidunregisterSearchProvider(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:
getRendererin interfaceIScene- Returns:
- this scene renderer.
-
setComponent
public void setComponent(IComponent<?> component)
Description copied from interface:ISceneSets the root component of this scene.- Specified by:
setComponentin interfaceIScene- Parameters:
component- the component to set as the root.
-
getComponent
public final IComponent<?> getComponent()
Description copied from interface:ISceneReturns the root component of this scene.- Specified by:
getComponentin interfaceIScene- Returns:
- the root component of this scene.
-
setRenderer
public void setRenderer(IRenderer<?> renderer)
Description copied from interface:ISceneSets this scene renderer.- Specified by:
setRendererin interfaceIScene- Parameters:
renderer- the renderer to set.
-
refresh
public void refresh()
Description copied from interface:ISceneRefreshes this scene presentation completely.
-
relayout
public void relayout()
Description copied from interface:ISceneTriggers this scene's layout processing.
-
refresh
public void refresh(IComponent<?> component)
Description copied from interface:ISceneRefreshes this scene's subtree presentation starting at the given component.
-
commit
public void commit(IComponent<?> component)
Description copied from interface:ISceneCommits the model for the given component.- Specified by:
commitin 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:ISceneAdds this scene listener.- Specified by:
addSceneListenerin interfaceIScene- Parameters:
listener- the listener to add.
-
removeSceneListener
public void removeSceneListener(ISceneListener listener)
Description copied from interface:ISceneRemoves this scene listener.- Specified by:
removeSceneListenerin interfaceIScene- Parameters:
listener- the listener to remove.
-
dispose
public void dispose()
Description copied from interface:ISceneDisposes this scene.
-
registerServiceConsumer
public void registerServiceConsumer(IServiceConsumer<?> serviceConsumer)
Description copied from interface:ISceneRegisters a given service consumer instance.- Specified by:
registerServiceConsumerin interfaceIScene- Parameters:
serviceConsumer- a service consumer.- See Also:
IServiceConsumer,IServiceEventTracker
-
trackEvent
public void trackEvent(IServiceEvent event)
Description copied from interface:IServiceEventTrackerTracks the given event.- Specified by:
trackEventin interfaceIServiceEventTracker- Parameters:
event- the service event.
-
registerSearchProvider
public void registerSearchProvider(IComponentSearchProvider searchProvider)
Description copied from interface:ISceneRegisters a provider to be used by the scene for searching components.- Specified by:
registerSearchProviderin interfaceIScene- Parameters:
searchProvider- The search provider
-
unregisterSearchProvider
public void unregisterSearchProvider(IComponentSearchProvider searchProvider)
Description copied from interface:ISceneUnregisters a provider used by the scene for searching components.- Specified by:
unregisterSearchProviderin interfaceIScene
-
queueEvent
public void queueEvent(Object query, IClientEvent event)
Description copied from interface:ISceneFinds a component by a query using the registered search providers and queues an event for it.- Specified by:
queueEventin 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:ISceneNotifies the scene that a component-specific event has happened.- Specified by:
handleComponentEventin 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:IScenePuts the specifiedstatefor the givencomponent.
-
clearState
public IState clearState(IComponent<?> component)
Description copied from interface:ISceneClears state for the givencomponent.- Specified by:
clearStatein interfaceIScene- Parameters:
component- the component, cannot benull.- Returns:
- the previous stored state, can be
nullif there are no state for the specifiedcomponent.
-
getState
public IState getState(IComponent<?> component)
Description copied from interface:ISceneReturns the current state for the givencomponent.
-
-