d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff * CDDL HEADER START
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff * The contents of this file are subject to the terms of the
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff * Common Development and Distribution License, Version 1.0 only
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff * (the "License"). You may not use this file except in compliance
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff * with the License.
8cf870d281dc8c242f083d14dfef05f24aa5fceeJnRouvignac * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
8cf870d281dc8c242f083d14dfef05f24aa5fceeJnRouvignac * or http://forgerock.org/license/CDDLv1.0.html.
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff * See the License for the specific language governing permissions
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff * and limitations under the License.
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff * When distributing Covered Code, include this CDDL HEADER in each
8cf870d281dc8c242f083d14dfef05f24aa5fceeJnRouvignac * file and include the License file at legal-notices/CDDLv1_0.txt.
8cf870d281dc8c242f083d14dfef05f24aa5fceeJnRouvignac * If applicable, add the following below this CDDL HEADER, with the
8cf870d281dc8c242f083d14dfef05f24aa5fceeJnRouvignac * fields enclosed by brackets "[]" replaced with your own identifying
8cf870d281dc8c242f083d14dfef05f24aa5fceeJnRouvignac * information:
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff * Portions Copyright [yyyy] [name of copyright owner]
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff * CDDL HEADER END
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff * Copyright 2008 Sun Microsystems, Inc.
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffpackage org.opends.guitools.controlpanel.ui.components;
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffimport org.opends.guitools.controlpanel.browser.IconPool;
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffimport org.opends.guitools.controlpanel.datamodel.Category;
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffimport org.opends.guitools.controlpanel.ui.ColorAndFontConstants;
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffimport org.opends.guitools.controlpanel.ui.border.SelectedCategoryBorder;
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffimport org.opends.guitools.controlpanel.util.Utilities;
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff * A component that acts as a checkbox but uses some customized buttons to
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff * indicate the selected and unselected states. This component is used in the
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff * 'Import LDIF' and 'Export LDIF' panels to hide parts of the dialog.
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff private static final long serialVersionUID = 6191857253411571940L;
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff * Constructor of the category button.
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff * @param category the category associated with this button.
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff setIcon(Utilities.createImageIcon(IconPool.IMAGE_PATH+"/rightarrow.png"));
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff buttonUnselectedBorder = new EmptyBorder(5, 5, 5, 5);
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff setBorder(isSelected() ? buttonSelectedBorder : buttonUnselectedBorder);
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff setBorder(isSelected() ? buttonSelectedBorder : buttonUnselectedBorder);
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff setForeground(ColorAndFontConstants.categoryForeground);
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff * {@inheritDoc}
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff // some look and feels replace our border, so take it back
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff setBorder(isSelected() ? buttonSelectedBorder : buttonUnselectedBorder);
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff * {@inheritDoc}