sk.uniba.euromath.editor.widgets
Class AbstractUserInputWidget

java.lang.Object
  extended by sk.uniba.euromath.editor.widgets.AbstractUserInputWidget
All Implemented Interfaces:
IUserInputWidget
Direct Known Subclasses:
CreateAttributeList, EncodingWidget, EntityList, ExportClassChooser, FileSelector, GraphSelectorWidget, InsertListChooser, MultiWidget, NameListItemChooser, NamespaceSelector, NewPrefixesQuery, XHTMLSerializerPropertiesWidget, XMLSerializerPropertiesWidget

public abstract class AbstractUserInputWidget
extends Object
implements IUserInputWidget

Abstract implementation of widget.

Author:
Martin Vysny

Field Summary
protected  Set<IModifyListener> listeners
          Modify listeners.
protected  Set<IMessagesChangeListener> msgListeners
          Message change listeners.
 
Constructor Summary
protected AbstractUserInputWidget()
          Constructor.
 
Method Summary
 void addMessageListener(IMessagesChangeListener listener)
          Registers given error listener.
 void addModifyListener(IModifyListener listener)
          Registers given modify listener.
protected  void allowModifyEvent()
          Allows the data-modify event to be called.
protected  void fireDataModified()
          Calls all modify listeners.
 void removeMessageListener(IMessagesChangeListener listener)
          Unregisters given error listener.
 void removeModifyListener(IModifyListener listener)
          Unregisters given modify listener.
protected  void suppressModifyEvent()
          Suppresses the data-modify event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface sk.uniba.euromath.editor.widgets.IUserInputWidget
getComposite, getMessages, getState, getStateClass, setState
 

Field Detail

listeners

protected final Set<IModifyListener> listeners
Modify listeners.


msgListeners

protected final Set<IMessagesChangeListener> msgListeners
Message change listeners.

Constructor Detail

AbstractUserInputWidget

protected AbstractUserInputWidget()
Constructor.

Method Detail

fireDataModified

protected void fireDataModified()
Calls all modify listeners.


suppressModifyEvent

protected final void suppressModifyEvent()
Suppresses the data-modify event. This method can be called multiple times. To allow data-modify event to be fired, each call to suppressModifyEvent() must have allowModifyEvent() called.


allowModifyEvent

protected final void allowModifyEvent()
Allows the data-modify event to be called. The data-modify event may still be left suppressed, depending on the number of previous suppressModifyEvent() calls.


addModifyListener

public void addModifyListener(IModifyListener listener)
Description copied from interface: IUserInputWidget
Registers given modify listener.

Specified by:
addModifyListener in interface IUserInputWidget
Parameters:
listener - listener to register.

removeModifyListener

public void removeModifyListener(IModifyListener listener)
Description copied from interface: IUserInputWidget
Unregisters given modify listener.

Specified by:
removeModifyListener in interface IUserInputWidget
Parameters:
listener - listener to unregister.

addMessageListener

public void addMessageListener(IMessagesChangeListener listener)
Description copied from interface: IUserInputWidget
Registers given error listener.

Specified by:
addMessageListener in interface IUserInputWidget
Parameters:
listener - the error listener called when last error changes.

removeMessageListener

public void removeMessageListener(IMessagesChangeListener listener)
Description copied from interface: IUserInputWidget
Unregisters given error listener.

Specified by:
removeMessageListener in interface IUserInputWidget
Parameters:
listener - the error listener called when last error changes.


Copyright © 2003-2006 null. All Rights Reserved.