net.sf.jguiraffe.gui.platform.swing.builder.event
Class FocusEventAdapter

java.lang.Object
  extended by net.sf.jguiraffe.gui.platform.swing.builder.event.SwingEventAdapter
      extended by net.sf.jguiraffe.gui.platform.swing.builder.event.FocusEventAdapter
All Implemented Interfaces:
java.awt.event.FocusListener, java.util.EventListener

 class FocusEventAdapter
extends SwingEventAdapter
implements java.awt.event.FocusListener

A specific event adapter for Swing focus events.

Version:
$Id: FocusEventAdapter.java 34 2006-06-24 14:48:00Z oheger $
Author:
Oliver Heger

Constructor Summary
FocusEventAdapter(FormEventManager eventManager, ComponentHandler handler, java.lang.String name)
          Creates a new instance of FocusEventAdapter.
 
Method Summary
protected  FormFocusEvent createFocusEvent(java.awt.event.FocusEvent event, int type)
          Creates a general form focus event from the passed in Swing focus event.
protected  void fireFocusEvent(java.awt.event.FocusEvent event, int type)
          Sends a focus event to the event manager.
 void focusGained(java.awt.event.FocusEvent event)
          Call back for focus gained events.
 void focusLost(java.awt.event.FocusEvent event)
          Call back for focus lost events.
protected  FormListenerType getListenerType()
          Returns the form listener type for this adapter.
 
Methods inherited from class net.sf.jguiraffe.gui.platform.swing.builder.event.SwingEventAdapter
fireEvent, getEventManager, getHandler, getName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FocusEventAdapter

public FocusEventAdapter(FormEventManager eventManager,
                         ComponentHandler handler,
                         java.lang.String name)
Creates a new instance of FocusEventAdapter.

Parameters:
eventManager - the event manager
handler - the component handler
name - the component's name
Method Detail

focusGained

public void focusGained(java.awt.event.FocusEvent event)
Call back for focus gained events.

Specified by:
focusGained in interface java.awt.event.FocusListener
Parameters:
event - the event

focusLost

public void focusLost(java.awt.event.FocusEvent event)
Call back for focus lost events.

Specified by:
focusLost in interface java.awt.event.FocusListener
Parameters:
event - the event

fireFocusEvent

protected void fireFocusEvent(java.awt.event.FocusEvent event,
                              int type)
Sends a focus event to the event manager. The form event is created from the passed in focus event.

Parameters:
event - the Swing focus event
type - the event type

createFocusEvent

protected FormFocusEvent createFocusEvent(java.awt.event.FocusEvent event,
                                          int type)
Creates a general form focus event from the passed in Swing focus event.

Parameters:
event - the original event
type - the event type
Returns:
the form event

getListenerType

protected FormListenerType getListenerType()
Returns the form listener type for this adapter.

Specified by:
getListenerType in class SwingEventAdapter
Returns:
the listener type


Copyright 2007 null. All Rights Reserved.