Package limelight.ui.events.panel

Source Code of limelight.ui.events.panel.PanelEventHandler

//- Copyright © 2008-2011 8th Light, Inc. All Rights Reserved.
//- Limelight and all included source files are distributed under terms of the MIT License.

package limelight.ui.events.panel;

import limelight.events.Event;
import limelight.events.EventHandler;
import limelight.ui.Panel;

public class PanelEventHandler extends EventHandler
{
  private Panel panel;

  public PanelEventHandler(Panel panel)
  {
    this.panel = panel;
  }

  @Override
  protected void handleUndispatchedEvent(Event e)
  {
    PanelEvent event = (PanelEvent)e;
    if(event.isInheritable())
    {
      Panel parent = panel.getParent();
      if(parent != null)
        event.dispatch(parent);
    }
  }
}
TOP

Related Classes of limelight.ui.events.panel.PanelEventHandler

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.