Class EventHandlerModel
- java.lang.Object
-
- com._1c.g5.aef2.validators.Validable
-
- com._1c.g5.aef2.models.Model
-
- com._1c.g5.aef2.models.EditableModel
-
- com._1c.g5.aef2.models.value.Value<T>
-
- com._1c.g5.aef2.models.pojo.PojoValue<String>
-
- com._1c.g5.v8.dt.form.ui.properties.models.EventHandlerModel
-
- All Implemented Interfaces:
IEditableModel
,IModel
,IValue<String>
,IValidable
,IModelApiAwareModel
,com._1c.g5.v8.dt.form.internal.ui.properties.models.IFormValue<String,EventHandlerContainer>
,IHandlerModel<EventHandlerContainer>
public class EventHandlerModel extends PojoValue<String> implements IHandlerModel<EventHandlerContainer>
TheIHandlerModel
implementation for event container.
-
-
Constructor Summary
Constructors Constructor Description EventHandlerModel(String initialValue, Event event, Form form, EventHandlerContainer entity, Collection<String> possibleHandlers)
Creates a new model.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addEventHandler(Event event, String handlerName, List<EventHandler> handlers)
Adds a form event handler with the provided parameters to the current list of handlers.protected void
executeCommand(String commandId, Map<String,String> commandParameters)
Executes the provided command in the Eclipse command service with the provided command parameters.IChange
getChange()
Event
getEvent()
Returns the form model object event for this handler.Form
getForm()
Gets form model.Collection<String>
getHanlders()
Returns a collection of possible event handlers.IModelApi
getModelApi()
Returns the model API.EventHandlerContainer
getSelection()
Return the selected object of form model.void
processHandlerInBslModule()
Processes current method selection in the BSL module.protected void
removeEventHandler(Event event, List<EventHandler> handlers)
Removes a handler of the provided event from the current list of handlers.void
setModelApi(IModelApi modelApi)
Sets the specified API to the model.-
Methods inherited from class com._1c.g5.aef2.models.value.Value
addValueListener, createWorkingCopy, discard, dispose, get, getCommittedValue, getUncommittedValue, getValidatorTarget, isEqual, notifyValueChanged, queueNotifyValueChanged, removeValueListener, set, setCommittedValue, setUncommittedValue, setValue, toString
-
Methods inherited from class com._1c.g5.aef2.models.EditableModel
isEditable, setEditable
-
Methods inherited from class com._1c.g5.aef2.models.Model
addModelListener, beginExternalUpdate, checkOffline, checkOnline, commit, endExternalUpdate, getComponent, getCurrentChangeOrigin, getRunnableQueue, isOnline, notifyModelChanged, notifyModelCommitted, removeModelListener, setComponent, setOnline
-
Methods inherited from class com._1c.g5.aef2.validators.Validable
addValidator, removeValidator, validate, validate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com._1c.g5.aef2.models.IModel
addModelListener, commit, discard, dispose, getComponent, isOnline, removeModelListener, setComponent
-
Methods inherited from interface com._1c.g5.aef2.validators.IValidable
addValidator, removeValidator, validate, validate
-
Methods inherited from interface com._1c.g5.aef2.models.value.IValue
addValueListener, createWorkingCopy, get, isEqual, removeValueListener, set
-
-
-
-
Constructor Detail
-
EventHandlerModel
public EventHandlerModel(String initialValue, Event event, Form form, EventHandlerContainer entity, Collection<String> possibleHandlers)
Creates a new model.- Parameters:
initialValue
- the initial method name ornull
if noneevent
- theEvent
, cannot benull
form
- the form object, cannot benull
entity
- theEventContainer
, cannot benull
possibleHandlers
- the collection of possible BSL module handlers, cannot benull
-
-
Method Detail
-
getChange
public IChange getChange()
-
getForm
public Form getForm()
Description copied from interface:com._1c.g5.v8.dt.form.internal.ui.properties.models.IFormValue
Gets form model.- Specified by:
getForm
in interfacecom._1c.g5.v8.dt.form.internal.ui.properties.models.IFormValue<String,EventHandlerContainer>
- Returns:
- the form model.
-
getSelection
public EventHandlerContainer getSelection()
Description copied from interface:com._1c.g5.v8.dt.form.internal.ui.properties.models.IFormValue
Return the selected object of form model.- Specified by:
getSelection
in interfacecom._1c.g5.v8.dt.form.internal.ui.properties.models.IFormValue<String,EventHandlerContainer>
- Returns:
- the selected object.
-
getEvent
public Event getEvent()
Description copied from interface:IHandlerModel
Returns the form model object event for this handler.- Specified by:
getEvent
in interfaceIHandlerModel<EventHandlerContainer>
- Returns:
- the
Event
, nevernull
-
getHanlders
public Collection<String> getHanlders()
Description copied from interface:IHandlerModel
Returns a collection of possible event handlers.- Specified by:
getHanlders
in interfaceIHandlerModel<EventHandlerContainer>
- Returns:
- the collection of handlers for current
event
, nevernull
-
processHandlerInBslModule
public void processHandlerInBslModule()
Description copied from interface:IHandlerModel
Processes current method selection in the BSL module.- Specified by:
processHandlerInBslModule
in interfaceIHandlerModel<EventHandlerContainer>
-
getModelApi
public IModelApi getModelApi()
Description copied from interface:IModelApiAwareModel
Returns the model API.- Specified by:
getModelApi
in interfaceIModelApiAwareModel
- Returns:
- the model API or
null
if it is not set.
-
setModelApi
public void setModelApi(IModelApi modelApi)
Description copied from interface:IModelApiAwareModel
Sets the specified API to the model.- Specified by:
setModelApi
in interfaceIModelApiAwareModel
- Parameters:
modelApi
- the API, can benull
.
-
addEventHandler
protected void addEventHandler(Event event, String handlerName, List<EventHandler> handlers)
Adds a form event handler with the provided parameters to the current list of handlers.- Parameters:
event
- an event to crete handler for, cannot benull
handlerName
- a handler name, cannot benull
handlers
- a collection of handlers to add, cannot benull
-
removeEventHandler
protected void removeEventHandler(Event event, List<EventHandler> handlers)
Removes a handler of the provided event from the current list of handlers.- Parameters:
event
- an event to remove handler for, cannot benull
handlers
- a collection of handlers to remove, cannot benull
-
executeCommand
protected void executeCommand(String commandId, Map<String,String> commandParameters)
Executes the provided command in the Eclipse command service with the provided command parameters.- Parameters:
commandId
- the command identifier, cannot benull
commandParameters
- a map of command parameters, cannot benull
-
-