org.jpedal.objects.acroforms.actions.JavaFX.JavaFXRadioListener Maven / Gradle / Ivy
/*
* ===========================================
* Java Pdf Extraction Decoding Access Library
* ===========================================
*
* Project Info: http://www.idrsolutions.com
* Help section for developers at http://www.idrsolutions.com/support/
*
* (C) Copyright 1997-2017 IDRsolutions and Contributors.
*
* This file is part of JPedal/JPDF2HTML5
*
@LICENSE@
*
* ---------------
* JavaFXRadioListener.java
* ---------------
*/
package org.jpedal.objects.acroforms.actions.JavaFX;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.scene.control.ToggleButton;
import org.jpedal.objects.raw.FormObject;
public class JavaFXRadioListener implements ChangeListener {
final ToggleButton comp;
final FormObject form;
public JavaFXRadioListener(final ToggleButton comp, final FormObject form) {
this.comp = comp;
this.form = form;
}
@Override
public void changed(final ObservableValue ov, final Boolean t, final Boolean t1) {
form.updateValue(comp.getText(), comp.isSelected(), false);
}
}