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

mdlaf.components.MaterialArrowButton Maven / Gradle / Ivy

There is a newer version: 1.1.4
Show newest version
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;
    }



}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy