001/* 002 * CDDL HEADER START 003 * 004 * The contents of this file are subject to the terms of the 005 * Common Development and Distribution License, Version 1.0 only 006 * (the "License"). You may not use this file except in compliance 007 * with the License. 008 * 009 * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt 010 * or http://forgerock.org/license/CDDLv1.0.html. 011 * See the License for the specific language governing permissions 012 * and limitations under the License. 013 * 014 * When distributing Covered Code, include this CDDL HEADER in each 015 * file and include the License file at legal-notices/CDDLv1_0.txt. 016 * If applicable, add the following below this CDDL HEADER, with the 017 * fields enclosed by brackets "[]" replaced with your own identifying 018 * information: 019 * Portions Copyright [yyyy] [name of copyright owner] 020 * 021 * CDDL HEADER END 022 * 023 * 024 * Copyright 2008-2010 Sun Microsystems, Inc. 025 * Portions Copyright 2015 ForgeRock AS. 026 */ 027package org.opends.guitools.controlpanel.ui.nodes; 028 029import javax.swing.tree.DefaultMutableTreeNode; 030 031/** 032 * Abstract class with some common methods for all the nodes in the 033 * 'Manage Index' tree. 034 */ 035public abstract class AbstractIndexTreeNode extends DefaultMutableTreeNode 036{ 037 private static final long serialVersionUID = 8055748310817873273L; 038 private String name; 039 /** 040 * Constructor. 041 * @param name the name of the node. 042 */ 043 protected AbstractIndexTreeNode(String name) 044 { 045 super(name); 046 this.name = name; 047 } 048 049 /** 050 * Returns the name. 051 * 052 * @return the name 053 */ 054 public String getName() 055 { 056 return name; 057 } 058 059 /** {@inheritDoc} */ 060 @Override 061 public boolean isRoot() 062 { 063 return false; 064 } 065 066 /** {@inheritDoc} */ 067 @Override 068 public boolean isLeaf() 069 { 070 return true; 071 } 072}