@Dependent public class ScenarioSimulationEventHandler extends Object implements AppendColumnEventHandler, AppendRowEventHandler, DeleteColumnEventHandler, DeleteRowEventHandler, DisableRightPanelEventHandler, DuplicateRowEventHandler, EnableRightPanelEventHandler, InsertColumnEventHandler, InsertRowEventHandler, PrependColumnEventHandler, PrependRowEventHandler, RedoEventHandler, ReloadRightPanelEventHandler, ScenarioGridReloadEventHandler, ScenarioNotificationEventHandler, SetCellValueEventHandler, SetInstanceHeaderEventHandler, SetPropertyHeaderEventHandler, UndoEventHandler
Commands.
It follows the GWT standard Event/Handler mechanism
| Modifier and Type | Field and Description |
|---|---|
protected ScenarioSimulationContext |
context |
protected DeletePopupPresenter |
deletePopupPresenter |
protected com.google.gwt.event.shared.EventBus |
eventBus |
protected List<com.google.gwt.event.shared.HandlerRegistration> |
handlerRegistrationList |
protected javax.enterprise.event.Event<org.uberfire.workbench.events.NotificationEvent> |
notificationEvent |
protected PreserveDeletePopupPresenter |
preserveDeletePopupPresenter |
protected ScenarioCommandManager |
scenarioCommandManager |
protected ScenarioCommandRegistry |
scenarioCommandRegistry |
| Constructor and Description |
|---|
ScenarioSimulationEventHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
commonExecution(ScenarioSimulationContext context,
AbstractScenarioSimulationCommand command)
Common method to execute the given
Command inside the given ScenarioSimulationContext
If successful, it adds the command to the ScenarioCommandRegistry, otherwise it fire a new ScenarioNotificationEvent
with error details |
protected void |
commonNotifyError(org.kie.workbench.common.command.client.CommandResult<ScenarioSimulationViolation> status,
String operation) |
void |
handle(ScenarioGridReloadEvent event) |
void |
onEvent(AppendColumnEvent event) |
void |
onEvent(AppendRowEvent event) |
void |
onEvent(DeleteColumnEvent event) |
void |
onEvent(DeleteRowEvent event) |
void |
onEvent(DisableRightPanelEvent event) |
void |
onEvent(DuplicateRowEvent event) |
void |
onEvent(EnableRightPanelEvent event) |
void |
onEvent(InsertColumnEvent event) |
void |
onEvent(InsertRowEvent event) |
void |
onEvent(PrependColumnEvent event) |
void |
onEvent(PrependRowEvent event) |
void |
onEvent(RedoEvent event) |
void |
onEvent(ReloadRightPanelEvent event) |
void |
onEvent(ScenarioNotificationEvent event) |
void |
onEvent(SetCellValueEvent event) |
void |
onEvent(SetInstanceHeaderEvent event) |
void |
onEvent(SetPropertyHeaderEvent event) |
void |
onEvent(UndoEvent event) |
protected void |
registerHandlers() |
void |
setContext(ScenarioSimulationContext context) |
void |
setDeletePopupPresenter(DeletePopupPresenter deletePopupPresenter) |
void |
setEventBus(com.google.gwt.event.shared.EventBus eventBus) |
void |
setNotificationEvent(javax.enterprise.event.Event<org.uberfire.workbench.events.NotificationEvent> notificationEvent) |
void |
setPreserveDeletePopupPresenter(PreserveDeletePopupPresenter preserveDeletePopupPresenter) |
void |
setScenarioCommandManager(ScenarioCommandManager scenarioCommandManager) |
void |
setScenarioCommandRegistry(ScenarioCommandRegistry scenarioCommandRegistry) |
void |
unregisterHandlers() |
protected DeletePopupPresenter deletePopupPresenter
protected PreserveDeletePopupPresenter preserveDeletePopupPresenter
protected com.google.gwt.event.shared.EventBus eventBus
protected List<com.google.gwt.event.shared.HandlerRegistration> handlerRegistrationList
protected javax.enterprise.event.Event<org.uberfire.workbench.events.NotificationEvent> notificationEvent
protected ScenarioSimulationContext context
protected ScenarioCommandRegistry scenarioCommandRegistry
protected ScenarioCommandManager scenarioCommandManager
public void setEventBus(com.google.gwt.event.shared.EventBus eventBus)
public void setDeletePopupPresenter(DeletePopupPresenter deletePopupPresenter)
public void setPreserveDeletePopupPresenter(PreserveDeletePopupPresenter preserveDeletePopupPresenter)
public void setNotificationEvent(javax.enterprise.event.Event<org.uberfire.workbench.events.NotificationEvent> notificationEvent)
public void setContext(ScenarioSimulationContext context)
public void setScenarioCommandRegistry(ScenarioCommandRegistry scenarioCommandRegistry)
public void setScenarioCommandManager(ScenarioCommandManager scenarioCommandManager)
@PreDestroy public void unregisterHandlers()
public void onEvent(AppendColumnEvent event)
onEvent in interface AppendColumnEventHandlerpublic void onEvent(AppendRowEvent event)
onEvent in interface AppendRowEventHandlerpublic void onEvent(DeleteColumnEvent event)
onEvent in interface DeleteColumnEventHandlerpublic void onEvent(DeleteRowEvent event)
onEvent in interface DeleteRowEventHandlerpublic void onEvent(DisableRightPanelEvent event)
onEvent in interface DisableRightPanelEventHandlerpublic void onEvent(DuplicateRowEvent event)
onEvent in interface DuplicateRowEventHandlerpublic void onEvent(EnableRightPanelEvent event)
onEvent in interface EnableRightPanelEventHandlerpublic void onEvent(InsertColumnEvent event)
onEvent in interface InsertColumnEventHandlerpublic void onEvent(InsertRowEvent event)
onEvent in interface InsertRowEventHandlerpublic void onEvent(PrependColumnEvent event)
onEvent in interface PrependColumnEventHandlerpublic void onEvent(PrependRowEvent event)
onEvent in interface PrependRowEventHandlerpublic void onEvent(RedoEvent event)
onEvent in interface RedoEventHandlerpublic void onEvent(ReloadRightPanelEvent event)
onEvent in interface ReloadRightPanelEventHandlerpublic void handle(ScenarioGridReloadEvent event)
handle in interface ScenarioGridReloadEventHandlerpublic void onEvent(ScenarioNotificationEvent event)
onEvent in interface ScenarioNotificationEventHandlerpublic void onEvent(SetCellValueEvent event)
onEvent in interface SetCellValueEventHandlerpublic void onEvent(SetInstanceHeaderEvent event)
onEvent in interface SetInstanceHeaderEventHandlerpublic void onEvent(SetPropertyHeaderEvent event)
onEvent in interface SetPropertyHeaderEventHandlerpublic void onEvent(UndoEvent event)
onEvent in interface UndoEventHandlerprotected void commonExecution(ScenarioSimulationContext context, AbstractScenarioSimulationCommand command)
Command inside the given ScenarioSimulationContext
If successful, it adds the command to the ScenarioCommandRegistry, otherwise it fire a new ScenarioNotificationEvent
with error detailscontext - command - protected void commonNotifyError(org.kie.workbench.common.command.client.CommandResult<ScenarioSimulationViolation> status, String operation)
protected void registerHandlers()
Copyright © 2001–2019 JBoss by Red Hat. All rights reserved.