com.alee.extended.checkbox.TristateCheckBoxPainter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of weblaf-ui Show documentation
Show all versions of weblaf-ui Show documentation
WebLaf is a Java Swing Look and Feel and extended components library for cross-platform applications
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 WebTristateCheckBox component.
* It is used as WebTristateCheckBoxUI default painter.
*
* @param component type
* @param component UI type
* @param decoration type
* @author Alexandr Zernov
*/
public class TristateCheckBoxPainter>
extends AbstractStateButtonPainter implements ITristateCheckBoxPainter
{
@Override
protected 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