Class SelectionEvent

java.lang.Object
com._1c.g5.aef2.events.ViewModelEvent
com._1c.g5.aef2.standard.events.SelectionEvent
All Implemented Interfaces:
IEvent
Direct Known Subclasses:
TableSelectionEvent, TreeSelectionEvent

public class SelectionEvent extends ViewModelEvent
Selection event.
  • Constructor Details

    • SelectionEvent

      public SelectionEvent(SelectionEvent.SelectionType type, IViewModel... viewModels)
      Instantiates a new event with the given type.
      Parameters:
      type - the type of the selection event.
      viewModels - the view models, cannot be null
    • SelectionEvent

      public SelectionEvent(IViewModel... viewModels)
      Instantiates a new event.
      Parameters:
      viewModels - the view models, cannot be null
  • Method Details

    • getType

      public SelectionEvent.SelectionType getType()
      Returns:
      the type of the event.
    • getSelectedViewModels

      public IViewModel[] getSelectedViewModels()
      Returns the event selected view models.
      Returns:
      the IViewModels
    • getFirstSelectedViewModel

      public IViewModel getFirstSelectedViewModel()
      Returns the first view mpdel in this selection, or null if the selection is empty.
      Returns:
      an element, or null if none