001/* 002 * The contents of this file are subject to the terms of the Common Development and 003 * Distribution License (the License). You may not use this file except in compliance with the 004 * License. 005 * 006 * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the 007 * specific language governing permission and limitations under the License. 008 * 009 * When distributing Covered Software, include this CDDL Header Notice in each file and include 010 * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL 011 * Header, with the fields enclosed by brackets [] replaced by your own identifying 012 * information: "Portions Copyright [year] [name of copyright owner]". 013 * 014 * Copyright 2008 Sun Microsystems, Inc. 015 */ 016 017package org.opends.guitools.controlpanel.event; 018 019/** 020 * The event that describes that an element of the schema has been selected. 021 * This is used in the dialog 'Manage Schema' to notify that a new schema 022 * element is selected on the tree. 023 * 024 */ 025public class SchemaElementSelectionEvent 026{ 027 private Object source; 028 private Object schemaElement; 029 030 /** 031 * Constructor of the event. 032 * @param source the source of the event. 033 * @param schemaElement the schema element that has been selected. 034 */ 035 public SchemaElementSelectionEvent(Object source, Object schemaElement) 036 { 037 this.source = source; 038 this.schemaElement = schemaElement; 039 } 040 041 /** 042 * Returns the schema element that has been selected. 043 * @return the schema element that has been selected. 044 */ 045 public Object getSchemaElement() 046 { 047 return schemaElement; 048 } 049 050 /** 051 * Returns the source of the event. 052 * @return the source of the event. 053 */ 054 public Object getSource() 055 { 056 return source; 057 } 058}