com.pixelduke.control.skin.FXButtonSkin Maven / Gradle / Ivy
/*
* FXSkins,
* Copyright (C) 2021 PixelDuke (Pedro Duque Vieira - www.pixelduke.com)
*
* 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 com.pixelduke.control.skin;
import impl.com.pixelduke.control.skin.ButtonAnimationHelper;
import javafx.beans.property.BooleanProperty;
import javafx.css.CssMetaData;
import javafx.css.SimpleStyleableBooleanProperty;
import javafx.css.Styleable;
import javafx.css.StyleableProperty;
import javafx.css.converter.BooleanConverter;
import javafx.scene.control.Button;
import javafx.scene.control.SkinBase;
import javafx.scene.control.skin.ButtonSkin;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class FXButtonSkin extends ButtonSkin {
private ButtonAnimationHelper buttonAnimationHelper;
public FXButtonSkin(Button button) {
super(button);
buttonAnimationHelper = ButtonAnimationHelper.setupButton(button, shrinkAnimateOnPressProperty());
}
/********** CSS Properties ****************/
private static final CssMetaData