mdlaf.components.MaterialArrowButton Maven / Gradle / Ivy
package mdlaf.components;
import mdlaf.utils.MaterialImageFactory;
import javax.swing.*;
import javax.swing.plaf.UIResource;
import javax.swing.plaf.basic.BasicArrowButton;
import java.awt.*;
/**
* @author https://github.com/vincenzopalazzo
*/
public class MaterialArrowButton extends JButton implements UIResource, SwingConstants {
protected int direction;
public MaterialArrowButton(int direction) {
this.direction = direction;
this.setIcon(MaterialImageFactory.getInstance().getImage(MaterialImageFactory.LEFT_ARROW));
}
public MaterialArrowButton(Icon icon, int direction) {
super(icon);
this.direction = direction;
}
public MaterialArrowButton(String text, int direction) {
super(text);
this.direction = direction;
}
public MaterialArrowButton(Action a, int direction) {
super(a);
this.direction = direction;
}
public MaterialArrowButton(String text, Icon icon, int direction) {
super(text, icon);
this.direction = direction;
}
}