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

org.pepsoft.worldpainter.util.TristateCheckBox Maven / Gradle / Ivy

There is a newer version: 2.23.2
Show newest version
package org.pepsoft.worldpainter.util;

import javax.swing.ButtonModel;
import javax.swing.Icon;

public final class TristateCheckBox extends com.jidesoft.swing.TristateCheckBox {
    public TristateCheckBox() {
        // Do nothing
    }
    
    public TristateCheckBox(String text) {
        super(text);
    }

    public TristateCheckBox(String text, Icon icon) {
        super(text, icon);
    }

    public void setTristateMode(boolean tristateMode) {
        ((TristateButtonModel) getModel()).setTristateMode(tristateMode);
    }
    
    public boolean isTristateMode() {
        return ((TristateButtonModel) getModel()).isTristateMode();
    }

    @Override
    protected ButtonModel createButtonModel() {
        return new TristateButtonModel();
    }
    
    private static final long serialVersionUID = 1L;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy