All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.lessvoid.nifty.controls.DropDownSelectionChangedEvent Maven / Gradle / Ivy

There is a newer version: 1.4.3
Show newest version
package de.lessvoid.nifty.controls;

import de.lessvoid.nifty.NiftyEvent;

import javax.annotation.Nonnull;

/**
 * Nifty generates this event when the selection of the DropDown changes.
 *
 * @author void
 */
public class DropDownSelectionChangedEvent implements NiftyEvent {
  @Nonnull
  private final DropDown dropDown;
  @Nonnull
  private final T selection;
  private final int selectionItemIndex;

  public DropDownSelectionChangedEvent(
      @Nonnull final DropDown dropDown,
      @Nonnull final T selection,
      final int selectionItemIndex) {
    this.dropDown = dropDown;
    this.selection = selection;
    this.selectionItemIndex = selectionItemIndex;
  }

  @Nonnull
  public DropDown getDropDown() {
    return dropDown;
  }

  @Nonnull
  public T getSelection() {
    return selection;
  }

  public int getSelectionItemIndex() {
    return selectionItemIndex;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy