Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Interacto
* Copyright (C) 2020 Arnaud Blouin
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
package io.github.interacto.jfx.binding;
import io.github.interacto.command.AnonCommand;
import io.github.interacto.command.Command;
import io.github.interacto.jfx.binding.api.BaseBinder;
import io.github.interacto.jfx.binding.api.BaseUpdateBinder;
import io.github.interacto.jfx.binding.api.CmdBinder;
import io.github.interacto.jfx.binding.api.InteractionBinder;
import io.github.interacto.jfx.binding.api.InteractionCmdBinder;
import io.github.interacto.jfx.binding.api.InteractionUpdateBinder;
import io.github.interacto.jfx.binding.api.KeyInteractionBinder;
import io.github.interacto.jfx.command.OpenWebPageJFX;
import io.github.interacto.jfx.command.ShowNode;
import io.github.interacto.jfx.command.ShowStage;
import io.github.interacto.jfx.instrument.JfxInstrument;
import io.github.interacto.jfx.interaction.library.BoxChecked;
import io.github.interacto.jfx.interaction.library.ButtonPressed;
import io.github.interacto.jfx.interaction.library.ColorPicked;
import io.github.interacto.jfx.interaction.library.ComboBoxSelected;
import io.github.interacto.jfx.interaction.library.KeysData;
import io.github.interacto.jfx.interaction.library.KeysPressed;
import io.github.interacto.jfx.interaction.library.MenuItemPressed;
import io.github.interacto.jfx.interaction.library.MultiTouch;
import io.github.interacto.jfx.interaction.library.MultiTouchData;
import io.github.interacto.jfx.interaction.library.SpinnerChanged;
import io.github.interacto.jfx.interaction.library.TabSelected;
import io.github.interacto.jfx.interaction.library.TextInputChanged;
import io.github.interacto.jfx.interaction.library.ToggleButtonPressed;
import io.github.interacto.jfx.interaction.library.WidgetData;
import java.util.function.Supplier;
import javafx.application.HostServices;
import javafx.scene.Node;
import javafx.scene.control.Button;
import javafx.scene.control.CheckBox;
import javafx.scene.control.ColorPicker;
import javafx.scene.control.ComboBox;
import javafx.scene.control.MenuItem;
import javafx.scene.control.Spinner;
import javafx.scene.control.TabPane;
import javafx.scene.control.TextInputControl;
import javafx.scene.control.ToggleButton;
import javafx.stage.Stage;
import javafx.stage.Window;
/**
* Utility class for building widget bindings.
*/
public final class Bindings {
private static BindingsObserver observer = null;
public static void setBindingObserver(final BindingsObserver obs) {
observer = obs;
}
private Bindings() {
super();
}
/**
* Creates binding builder to build a binding between a KeysPressure interaction (done on a Node) and the given command type.
* Do not forget to call bind() at the end of the build to execute the builder.
* @param cmd The anonymous command to produce.
* @return The binding builder. Cannot be null.
* @throws IllegalArgumentException If the given cmd is null.
*/
public static CmdBinder anonCmdBinder(final Runnable cmd) {
return anonCmdBinder(cmd, null);
}
/**
* Creates binding builder to build a binding between a KeysPressure interaction (done on a Node) and the given command type.
* Do not forget to call bind() at the end of the build to execute the builder.
* @param cmd The anonymous command to produce.
* @param ins The instrument that uses the bindings. May be null.
* @return The binding builder. Cannot be null.
* @throws IllegalArgumentException If the given cmd is null.
*/
public static CmdBinder anonCmdBinder(final Runnable cmd, final JfxInstrument ins) {
return new AnonCmdBinder<>(cmd, ins, observer);
}
/**
* Creates binding builder to build a binding between a button interaction and the given command type.
* Do not forget to call bind() at the end of the build to execute the builder.
* @return The binding builder. Cannot be null.
*/
public static InteractionBinder