com.tensegrity.gui.document.event
Class DocumentEventMultiplexer

java.lang.Object
  extended bycom.tensegrity.generic.event.EventMultiplexer
      extended bycom.tensegrity.gui.document.event.DocumentEventMultiplexer
All Implemented Interfaces:
DocumentListener, EventListenerTag

public class DocumentEventMultiplexer
extends EventMultiplexer
implements DocumentListener

Multiplexer for mdicomponent/document events.

Version:
$Id: DocumentEventMultiplexer.java,v 1.8 2004/02/09 13:06:50 sr Exp $
Author:
Stepan Rutz

Constructor Summary
DocumentEventMultiplexer(EventListenerTag a, EventListenerTag b)
          Constructs a new DocumentEventMultiplexer instance with the two given children.
 
Method Summary
static EventListenerTag combine(EventListenerTag a, EventListenerTag b)
          Combines two given eventlisteners to a new eventlistener.
 void documentAdded(DocumentEvent documentevent)
          Invoked after a document was added to the mdicomponent.
 void documentModelChanged(DocumentEvent documentevent)
          Invoked after a document's model has changed.
 void documentPreAdd(DocumentEvent documentevent)
          Invoked when a document is about to be added to a mdicomponent.
 void documentPreRemove(DocumentEvent documentevent)
          Invoked when a document is about to be removed from a mdicomponent.
 void documentRemoved(DocumentEvent documentevent)
          Invoked after a document was removed from the mdicomponent.
 void documentSelected(DocumentEvent documentevent)
          Invoked after a document was selected in the mdicomponent.
 void documentUnselected(DocumentEvent documentevent)
          Invoked after a document was unselected in the mdicomponent.
static DocumentListener multiplex(DocumentListener a, DocumentListener b)
          Multiplexes two DocumentListener instances and returns the multiplexed DocumentListener.
 EventListenerTag separate(EventListenerTag listener)
          Separation helper.
static EventListenerTag separate(EventListenerTag a, EventListenerTag b)
          Separates the eventlistener b from the eventlistener a and returns the eventlistener structure.
static DocumentListener unmultiplex(DocumentListener a, DocumentListener b)
          Unmultiplexes two DocumentListener instances and returns the unmultiplexed DocumentListener.
 
Methods inherited from class com.tensegrity.generic.event.EventMultiplexer
a, b, countEventListeners, listenersToArrayList, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DocumentEventMultiplexer

public DocumentEventMultiplexer(EventListenerTag a,
                                EventListenerTag b)
Constructs a new DocumentEventMultiplexer instance with the two given children.

Parameters:
a - child one.
b - child two.
Method Detail

combine

public static EventListenerTag combine(EventListenerTag a,
                                       EventListenerTag b)
Combines two given eventlisteners to a new eventlistener.

Parameters:
a - the first eventlistener to combine.
b - the second eventlistener to combine.
Returns:
the new eventlistener that combines the two given eventlisteners.

separate

public static EventListenerTag separate(EventListenerTag a,
                                        EventListenerTag b)
Separates the eventlistener b from the eventlistener a and returns the eventlistener structure.

Parameters:
a - the first eventlistener to separate
b - the second eventlistener to separate.
Returns:
the new eventlistener that separates b from a.

separate

public EventListenerTag separate(EventListenerTag listener)
Separation helper.

Parameters:
listener - the listener to separate.
Returns:
separated listener.

multiplex

public static DocumentListener multiplex(DocumentListener a,
                                         DocumentListener b)
Multiplexes two DocumentListener instances and returns the multiplexed DocumentListener.

Parameters:
a - the first DocumentListener.
Returns:
the multiplexed DocumentListener.

unmultiplex

public static DocumentListener unmultiplex(DocumentListener a,
                                           DocumentListener b)
Unmultiplexes two DocumentListener instances and returns the unmultiplexed DocumentListener.

Parameters:
a - the first DocumentListener.
Returns:
the unmultiplexed DocumentListener.

documentPreAdd

public void documentPreAdd(DocumentEvent documentevent)
                    throws DocumentEventVetoException
Description copied from interface: DocumentListener
Invoked when a document is about to be added to a mdicomponent. If the implementor throws the declared exception then the documentevent will be veto'd and the corresponding action will not be commence.

Specified by:
documentPreAdd in interface DocumentListener
Parameters:
documentevent - the documentevent structure carrying information.
Throws:
DocumentEventVetoException - indicates that the documentevent is not desired.

documentPreRemove

public void documentPreRemove(DocumentEvent documentevent)
                       throws DocumentEventVetoException
Description copied from interface: DocumentListener
Invoked when a document is about to be removed from a mdicomponent. If the implementor throws the declared exception then the documentevent will be veto'd and the corresponding action will not be commence.

Specified by:
documentPreRemove in interface DocumentListener
Parameters:
documentevent - the documentevent structure carrying information.
Throws:
DocumentEventVetoException - indicates that the documentevent is not desired.

documentAdded

public void documentAdded(DocumentEvent documentevent)
Description copied from interface: DocumentListener
Invoked after a document was added to the mdicomponent.

Specified by:
documentAdded in interface DocumentListener
Parameters:
documentevent - the documentevent structure carrying information.

documentRemoved

public void documentRemoved(DocumentEvent documentevent)
Description copied from interface: DocumentListener
Invoked after a document was removed from the mdicomponent.

Specified by:
documentRemoved in interface DocumentListener
Parameters:
documentevent - the documentevent structure carrying information.

documentSelected

public void documentSelected(DocumentEvent documentevent)
Description copied from interface: DocumentListener
Invoked after a document was selected in the mdicomponent.

Specified by:
documentSelected in interface DocumentListener
Parameters:
documentevent - the documentevent structure carrying information.

documentUnselected

public void documentUnselected(DocumentEvent documentevent)
Description copied from interface: DocumentListener
Invoked after a document was unselected in the mdicomponent.

Specified by:
documentUnselected in interface DocumentListener
Parameters:
documentevent - the documentevent structure carrying information.

documentModelChanged

public void documentModelChanged(DocumentEvent documentevent)
Description copied from interface: DocumentListener
Invoked after a document's model has changed. This means the data behind the document has changed subtantially and needs to be rehashed.

Specified by:
documentModelChanged in interface DocumentListener
Parameters:
documentevent - the documentevent structure carrying information.


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.