com.alee.extended.checkbox.TristateCheckBoxPainter Maven / Gradle / Ivy
package com.alee.extended.checkbox;
import com.alee.laf.checkbox.AbstractStateButtonPainter;
import com.alee.laf.checkbox.CheckState;
import com.alee.painter.decoration.DecorationState;
import com.alee.painter.decoration.IDecoration;
import java.util.List;
/**
* Basic painter for {@link WebTristateCheckBox} component.
* It is used as {@link WTristateCheckBoxUI} default painter.
*
* @param component type
* @param component UI type
* @param decoration type
* @author Alexandr Zernov
*/
public class TristateCheckBoxPainter, D extends IDecoration>
extends AbstractStateButtonPainter implements ITristateCheckBoxPainter
{
@Override
public List getDecorationStates ()
{
final List states = super.getDecorationStates ();
if ( component.getState () == CheckState.checked )
{
states.add ( DecorationState.checked );
}
if ( component.getState () == CheckState.mixed )
{
states.add ( DecorationState.mixed );
}
return states;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy