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

com.sun.jsftemplating.layout.event.EventObjectBase Maven / Gradle / Ivy

/*
 * The contents of this file are subject to the terms 
 * of the Common Development and Distribution License 
 * (the License).  You may not use this file except in
 * compliance with the License.
 * 
 * You can obtain a copy of the license at 
 * https://jsftemplating.dev.java.net/cddl1.html or
 * jsftemplating/cddl1.txt.
 * See the License for the specific language governing 
 * permissions and limitations under the License.
 * 
 * When distributing Covered Code, include this CDDL 
 * Header Notice in each file and include the License file 
 * at jsftemplating/cddl1.txt.  
 * If applicable, add the following below the CDDL Header, 
 * with the fields enclosed by brackets [] replaced by
 * you own identifying information: 
 * "Portions Copyrighted [year] [name of copyright owner]"
 * 
 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
 */
package com.sun.jsftemplating.layout.event;

import java.util.EventObject;

import javax.faces.component.UIComponent;


/**
 *  

This class serves as the base class for EventObjects in * this package.

* * @author Ken Paulsen ([email protected]) */ public class EventObjectBase extends EventObject implements UIComponentHolder { private static final long serialVersionUID = 1L; /** *

This constructor should not be used.

*/ private EventObjectBase() { super(null); } /** *

This constructor is protected to avoid direct instantiation, one * of the sub-classes of this class should be used instead.

* * @param component The UIComponent associated with this * EventObject. */ protected EventObjectBase(UIComponent component) { super(component); } /** *

This constructor should only be used when a * UIComponent is not available.

*/ protected EventObjectBase(Object obj) { super(obj); } /** *

This method returns the UIComponent held by the * Object implementing this interface (or null if the * event source is not a UIComponent).

* * @return The UIComponent. */ public UIComponent getUIComponent() { Object source = getSource(); if (source instanceof UIComponent) { return (UIComponent) getSource(); } return null; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy