org.tbee.swing
Class JPanelWithEvent

java.lang.Object
  extended by org.tbee.swing.JPanelWithEvent

public class JPanelWithEvent
extends Object

This panel has event support that means listeners can register and are notified when an event occurs. The event is non specific (it is not known what event occurred), so the object has to be examined to determine the cause. This panel is convenient when building quick components, for example a quick entry screen. This panel is then often placed in a modal Dialog (suspending execution in the caller), but the caller needs to be informed when execution should be resumed (by hiding the modal dialog). To do this the entry panel must fire "an event" and the calling object can then hide the dialog and resume execution; thus this JPanel. Another approach is to write the quick entry as a "extends JDialog" instead of JPanel.

Version:
$Revision: 1.1 $

Nested Class Summary
static interface JPanelWithEvent.EventListener
           
 
Constructor Summary
JPanelWithEvent()
           
 
Method Summary
 void addEventListener(JPanelWithEvent.EventListener e)
           
protected  void fireEventListeners(int eventId)
           
 void removeEventListener(JPanelWithEvent.EventListener e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JPanelWithEvent

public JPanelWithEvent()
Method Detail

addEventListener

public void addEventListener(JPanelWithEvent.EventListener e)

removeEventListener

public void removeEventListener(JPanelWithEvent.EventListener e)

fireEventListeners

protected void fireEventListeners(int eventId)


Copyright © 2011 KnowledgePlaza. All Rights Reserved.