Search this API

y.option
Class DefaultCompoundEditor

java.lang.Object
  extended by y.option.DefaultCompoundEditor
All Implemented Interfaces:
ChildChangeReporter, CompoundEditor, Editor

public abstract class DefaultCompoundEditor
extends java.lang.Object
implements CompoundEditor, ChildChangeReporter

Default base class for compound editors.

 

Nested Class Summary
 
Nested classes/interfaces inherited from interface y.option.Editor
Editor.Event, Editor.Listener
 
Constructor Summary
protected DefaultCompoundEditor()
          Creates a new instance of DefaultCompoundEditor.
protected DefaultCompoundEditor(int capacity)
          Creates a new instance of DefaultCompoundEditor with the specified capacity.
 
Method Summary
 void addChildPropertyChangeListener(java.beans.PropertyChangeListener pcl)
          Registers a PropertyChangeListener to receive all PropertyChange events from all PropertyChangeReporter children of this reporter.
 void addChildPropertyChangeListener(java.lang.String pn, java.beans.PropertyChangeListener pcl)
          Registers a PropertyChangeListener to receive specific PropertyChange events from all PropertyChangeReporter children of this reporter.
 void addChildVetoableChangeListener(java.lang.String pn, java.beans.VetoableChangeListener vcl)
          Registers a VetoableChangeListener to receive specific VetoableChange events from all VetoableChangeReporter children of this reporter.
 void addChildVetoableChangeListener(java.beans.VetoableChangeListener vcl)
          Registers a VetoableChangeListener to receive all VetoableChange events from all VetoableChangeReporter children of this reporter.
protected  void addEditor(Editor editor)
          Adds the specified editor to this CompoundEditor.
 void adoptItemValue()
          Resets the values of the contained editors to the values currently stored in the corresponding option items by invoking adoptItemValue() of all contained editors.
protected  void clearEditors()
          Removes all contained editors from this CompoundEditor.
 void commitValue()
          Commits the values of the contained editors that were modified to the corresponding option items by invoking commitValue() of all contained editors.
 int editorCount()
          Returns the number of editors in this compound.
 java.util.Iterator editors()
          Returns an iterator over the editors in this compound.
 Editor getEditor(int index)
          Returns the editor at the specified position.
 void removeChildPropertyChangeListener(java.beans.PropertyChangeListener pcl)
          Unregisters a PropertyChangeListener, that received all PropertyChange events from PropertyChangeReporter children of this reporter.
 void removeChildPropertyChangeListener(java.lang.String pn, java.beans.PropertyChangeListener pcl)
          Unregisters a PropertyChangeListener, that received specific PropertyChange events from PropertyChangeReporter children of this reporter.
 void removeChildVetoableChangeListener(java.lang.String pn, java.beans.VetoableChangeListener vcl)
          Unregisters a VetoableChangeListener, that received specific VetoableChange events from VetoableChangeReporter children of this reporter.
 void removeChildVetoableChangeListener(java.beans.VetoableChangeListener vcl)
          Unregisters a VetoableChangeListener, that received all VetoableChange events from VetoableChangeReporter children of this reporter.
 void resetValue()
          Resets the values of the contained editors by invoking resetValue() of all contained editors.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface y.option.Editor
getComponent
 

Constructor Detail

DefaultCompoundEditor

protected DefaultCompoundEditor()
Creates a new instance of DefaultCompoundEditor.


DefaultCompoundEditor

protected DefaultCompoundEditor(int capacity)
Creates a new instance of DefaultCompoundEditor with the specified capacity.

Parameters:
capacity - the initial capacity of the compound editor
Method Detail

editorCount

public int editorCount()
Returns the number of editors in this compound.

Specified by:
editorCount in interface CompoundEditor
Returns:
the number of editors in this compound

addEditor

protected void addEditor(Editor editor)
Adds the specified editor to this CompoundEditor.

Parameters:
editor - the Editor to add

clearEditors

protected void clearEditors()
Removes all contained editors from this CompoundEditor.


getEditor

public Editor getEditor(int index)
Returns the editor at the specified position.

Specified by:
getEditor in interface CompoundEditor
Parameters:
index - zero-based index of the editor to return
Returns:
the editor at the specified position.

editors

public java.util.Iterator editors()
Returns an iterator over the editors in this compound.

Specified by:
editors in interface CompoundEditor
Returns:
an Iterator over the editors in this compound.

commitValue

public void commitValue()
Commits the values of the contained editors that were modified to the corresponding option items by invoking commitValue() of all contained editors.

Specified by:
commitValue in interface Editor

adoptItemValue

public void adoptItemValue()
Resets the values of the contained editors to the values currently stored in the corresponding option items by invoking adoptItemValue() of all contained editors.

Specified by:
adoptItemValue in interface Editor

resetValue

public void resetValue()
Resets the values of the contained editors by invoking resetValue() of all contained editors.

Specified by:
resetValue in interface Editor

addChildPropertyChangeListener

public void addChildPropertyChangeListener(java.beans.PropertyChangeListener pcl)
Description copied from interface: ChildChangeReporter
Registers a PropertyChangeListener to receive all PropertyChange events from all PropertyChangeReporter children of this reporter.

Specified by:
addChildPropertyChangeListener in interface ChildChangeReporter
Parameters:
pcl - the PropertyChangeListener to be registered

removeChildPropertyChangeListener

public void removeChildPropertyChangeListener(java.beans.PropertyChangeListener pcl)
Description copied from interface: ChildChangeReporter
Unregisters a PropertyChangeListener, that received all PropertyChange events from PropertyChangeReporter children of this reporter.

Specified by:
removeChildPropertyChangeListener in interface ChildChangeReporter
Parameters:
pcl - the PropertyChangeListener to be unregistered

addChildPropertyChangeListener

public void addChildPropertyChangeListener(java.lang.String pn,
                                           java.beans.PropertyChangeListener pcl)
Description copied from interface: ChildChangeReporter
Registers a PropertyChangeListener to receive specific PropertyChange events from all PropertyChangeReporter children of this reporter.

Specified by:
addChildPropertyChangeListener in interface ChildChangeReporter
Parameters:
pn - the name of the property to listen on
pcl - the PropertyChangeListener to be registered

removeChildPropertyChangeListener

public void removeChildPropertyChangeListener(java.lang.String pn,
                                              java.beans.PropertyChangeListener pcl)
Description copied from interface: ChildChangeReporter
Unregisters a PropertyChangeListener, that received specific PropertyChange events from PropertyChangeReporter children of this reporter.

Specified by:
removeChildPropertyChangeListener in interface ChildChangeReporter
Parameters:
pn - the name of the property that was listened on
pcl - the PropertyChangeListener to be unregistered

addChildVetoableChangeListener

public void addChildVetoableChangeListener(java.beans.VetoableChangeListener vcl)
Description copied from interface: ChildChangeReporter
Registers a VetoableChangeListener to receive all VetoableChange events from all VetoableChangeReporter children of this reporter.

Specified by:
addChildVetoableChangeListener in interface ChildChangeReporter
Parameters:
vcl - the VetoableChangeListener to be registered

removeChildVetoableChangeListener

public void removeChildVetoableChangeListener(java.beans.VetoableChangeListener vcl)
Description copied from interface: ChildChangeReporter
Unregisters a VetoableChangeListener, that received all VetoableChange events from VetoableChangeReporter children of this reporter.

Specified by:
removeChildVetoableChangeListener in interface ChildChangeReporter
Parameters:
vcl - the VetoableChangeListener to be unregistered

addChildVetoableChangeListener

public void addChildVetoableChangeListener(java.lang.String pn,
                                           java.beans.VetoableChangeListener vcl)
Description copied from interface: ChildChangeReporter
Registers a VetoableChangeListener to receive specific VetoableChange events from all VetoableChangeReporter children of this reporter.

Specified by:
addChildVetoableChangeListener in interface ChildChangeReporter
Parameters:
pn - the name of the property to listen on
vcl - the VetoableChangeListener to be registered

removeChildVetoableChangeListener

public void removeChildVetoableChangeListener(java.lang.String pn,
                                              java.beans.VetoableChangeListener vcl)
Description copied from interface: ChildChangeReporter
Unregisters a VetoableChangeListener, that received specific VetoableChange events from VetoableChangeReporter children of this reporter.

Specified by:
removeChildVetoableChangeListener in interface ChildChangeReporter
Parameters:
pn - the name of the property that was listened on
vcl - the VetoableChangeListener to be unregistered

© Copyright 2000-2022,
yWorks GmbH.
All rights reserved.