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

org.valkyriercp.command.config.DefaultCommandButtonConfigurer Maven / Gradle / Ivy

There is a newer version: 1.3
Show newest version
package org.valkyriercp.command.config;

import org.springframework.util.Assert;
import org.valkyriercp.command.support.AbstractCommand;

import javax.swing.*;

public class DefaultCommandButtonConfigurer implements CommandButtonConfigurer {

    /**
     * {@inheritDoc}
     */
    public void configure(AbstractButton button, AbstractCommand command, CommandFaceDescriptor faceDescriptor) {
        Assert.notNull(button, "The button to configure cannot be null.");
        Assert.notNull(faceDescriptor, "The command face descriptor cannot be null.");
        faceDescriptor.configureLabel(button);
        faceDescriptor.configureIcon(button);
        faceDescriptor.configureColor(button);
        button.setToolTipText(faceDescriptor.getCaption());
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy