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.
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffimport org.opends.guitools.controlpanel.datamodel.BackupDescriptor;
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffimport org.opends.guitools.controlpanel.datamodel.BackupTableModel;
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffimport org.opends.guitools.controlpanel.ui.ColorAndFontConstants;
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff * Renderer of the table that contains the list of backups (it is used in the
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff * tables of the verify backup and restore panels).
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffpublic class BackupTableCellRenderer extends DefaultTableCellRenderer
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff private static final long serialVersionUID = -4645902129785751854L;
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff private DateFormat formatter = DateFormat.getDateInstance(DateFormat.FULL);
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff private final static Border fullBorder = BorderFactory.createCompoundBorder(
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff * Default constructor.
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff setForeground(ColorAndFontConstants.tableForeground);
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff setBackground(ColorAndFontConstants.tableBackground);
fb0983b09bf447ff3da1fabc5559fe1d7e0eab1djvergara * Sets the path to which the backups are relative.
fb0983b09bf447ff3da1fabc5559fe1d7e0eab1djvergara * @param backupParentPath the path to which the backups are relative.
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff * {@inheritDoc}
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff public Component getTableCellRendererComponent(JTable table, Object value,
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff boolean isSelected, boolean hasFocus, int row, int column)
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff boolean isDate = false;
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff boolean isFull = ((BackupTableModel)table.getModel()).get(row).getType()
fb0983b09bf447ff3da1fabc5559fe1d7e0eab1djvergara boolean isParent = false;
fb0983b09bf447ff3da1fabc5559fe1d7e0eab1djvergara while (f != null)
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff s = "Full";
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff s = "Incremental";
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff "Unknown class for "+value+": "+" row: "+row+ "column: "+column);
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff super.getTableCellRendererComponent(table, s, isSelected, hasFocus, row,
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff return this;