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

de.lessvoid.nifty.controls.RadioButtonStateChangedEvent 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 a single RadioButton changes its state. It
 * gets selected or unselected. If you're more interested in the state of a whole
 * RadioGroup (a linked collection of individual RadioButtons with only a single
 * one being allowed to be active) you might want to look at the
 * RadioGroupSelectionChangedEvent.
 *
 * @author void
 */
public class RadioButtonStateChangedEvent implements NiftyEvent {
  @Nonnull
  private final RadioButton radioButton;
  private final boolean selected;

  public RadioButtonStateChangedEvent(@Nonnull final RadioButton radioButton, final boolean newSelected) {
    this.radioButton = radioButton;
    this.selected = newSelected;
  }

  @Nonnull
  public RadioButton getRadioButton() {
    return radioButton;
  }

  public boolean isSelected() {
    return selected;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy