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

org.jmeterplugins.repository.PluginCheckbox Maven / Gradle / Ivy

There is a newer version: 1.10
Show newest version
package org.jmeterplugins.repository;

import javax.swing.JCheckBox;


class PluginCheckbox extends JCheckBox {

    /**
     *
     */
    private static final long serialVersionUID = 3604852617806921883L;
    private Plugin plugin;

    public PluginCheckbox(String name) {
        super(name);
    }

    public void setPlugin(Plugin plugin) {
        this.plugin = plugin;
        if (!plugin.canUninstall()) {
            super.setEnabled(false);
        }
    }

    public Plugin getPlugin() {
        return plugin;
    }

    @Override
    public void setEnabled(boolean b) {
        if (!plugin.canUninstall()) {
            super.setEnabled(false);
        } else {
            super.setEnabled(b);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy