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

it.unibo.alchemist.boundary.swingui.impl.SimControlButton Maven / Gradle / Ivy

/*
 * Copyright (C) 2010-2022, Danilo Pianini and contributors
 * listed, for each module, in the respective subproject's build.gradle.kts file.
 *
 * This file is part of Alchemist, and is distributed under the terms of the
 * GNU General Public License, with a linking exception,
 * as described in the file LICENSE in the Alchemist distribution's top directory.
 */
package it.unibo.alchemist.boundary.swingui.impl;

import javax.swing.JButton;

/**
 */
@Deprecated
public class SimControlButton extends JButton {

    private static final long serialVersionUID = 5772261651038729446L;

    /**
     * Builds a new Button.
     * 
     * @param imagePath
     *            Path to the image to use
     * @param command
     *            the command for this button
     * @param tooltip
     *            the tooltip message
     */
    public SimControlButton(final String imagePath, final Enum command, final String tooltip) {
        super(AlchemistSwingUI.loadScaledImage(imagePath));
        setActionCommand(command.toString());
        setToolTipText(tooltip);
        // TODO find a better way to do this
        setText(tooltip);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy