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

com.alee.laf.separator.AbstractSeparatorPainter Maven / Gradle / Ivy

There is a newer version: 1.2.14
Show newest version
package com.alee.laf.separator;

import com.alee.painter.decoration.AbstractDecorationPainter;
import com.alee.painter.decoration.DecorationState;
import com.alee.painter.decoration.IDecoration;

import javax.swing.*;
import javax.swing.plaf.SeparatorUI;
import java.util.List;

/**
 * Abstract painter for {@link JSeparator} component.
 *
 * @param  component type
 * @param  component UI type
 * @param  decoration type
 * @author Alexandr Zernov
 * @author Mikle Garin
 */
public abstract class AbstractSeparatorPainter>
        extends AbstractDecorationPainter implements IAbstractSeparatorPainter
{
    @Override
    public List getDecorationStates ()
    {
        final List states = super.getDecorationStates ();
        states.add ( component.getOrientation () == SwingConstants.HORIZONTAL ? DecorationState.horizontal : DecorationState.vertical );
        return states;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy