Class EventHandlerModel

    • 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 or null if none
        event - the Event, cannot be null
        form - the form object, cannot be null
        entity - the EventContainer, cannot be null
        possibleHandlers - the collection of possible BSL module handlers, cannot be null
    • Method Detail

      • 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 interface com._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 interface com._1c.g5.v8.dt.form.internal.ui.properties.models.IFormValue<String,​EventHandlerContainer>
        Returns:
        the selected object.
      • 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 be null
        handlerName - a handler name, cannot be null
        handlers - a collection of handlers to add, cannot be null
      • 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 be null
        handlers - a collection of handlers to remove, cannot be null
      • 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 be null
        commandParameters - a map of command parameters, cannot be null