Search this API

y.option
Class OptionSection

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.Vector
              extended by y.option.OptionSection
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.RandomAccess, AttributeOwner, PropertyChangeReporter

public class OptionSection
extends java.util.Vector
implements AttributeOwner, PropertyChangeReporter

This class represents a section within an OptionHandler. It bundles a set of OptionItem objects.

See Also:
Serialized Form
 

Field Summary
static java.lang.String ATTRIBUTE_CONTEXT
          Attribute key used to store the section context handlername.
static java.lang.String ATTRIBUTE_EXPANDED_TRACKER
           
static java.lang.String ATTRIBUTE_LONG_DESCRIPTION
          Attribute key used to store a detailed description.
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
OptionSection(java.lang.String name)
          Creates a new instance of OptionSection.
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener pcl)
          Adds a PropertyChangeListener to the listener list.
 void addPropertyChangeListener(java.lang.String propertyname, java.beans.PropertyChangeListener pcl)
          Adds a PropertyChangeListener to the listener list for a specific property.
 java.lang.Object getAttribute(java.lang.String name)
          Returns the value of the attribute with the specified name.
 javax.swing.JComponent getEditor(int editorWidth)
          Deprecated. Use EditorFactory.createEditor(y.option.OptionHandler) instead.
 javax.swing.JComponent getEditor(int editorWidth, GuiFactory factory, java.lang.String handlerName)
          Deprecated. Use EditorFactory.createEditor(y.option.OptionHandler) instead.
 java.lang.String getName()
          Returns the name of the section.
 OptionItem item(int index)
          Returns the OptionItem at position index within this section.
 int itemCount()
          Returns the number of items within this section.
 void removeAttribute(java.lang.String name)
          Removes the attribute with the specified name.
 void removePropertyChangeListener(java.beans.PropertyChangeListener pcl)
          Removes a PropertyChangeListener from the listener list.
 void removePropertyChangeListener(java.lang.String propertyname, java.beans.PropertyChangeListener pcl)
          Removes a PropertyChangeListener from the listener list for a specific property.
 void setAttribute(java.lang.String name, java.lang.Object value)
          Sets an arbitrary attribute with the specified name and value.
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Field Detail

ATTRIBUTE_CONTEXT

public static final java.lang.String ATTRIBUTE_CONTEXT
Attribute key used to store the section context handlername.


ATTRIBUTE_LONG_DESCRIPTION

public static final java.lang.String ATTRIBUTE_LONG_DESCRIPTION
Attribute key used to store a detailed description.


ATTRIBUTE_EXPANDED_TRACKER

public static final java.lang.String ATTRIBUTE_EXPANDED_TRACKER
Constructor Detail

OptionSection

public OptionSection(java.lang.String name)
Creates a new instance of OptionSection.

Parameters:
name - te name of the section.
Method Detail

getAttribute

public java.lang.Object getAttribute(java.lang.String name)
Returns the value of the attribute with the specified name.

Specified by:
getAttribute in interface AttributeOwner
Parameters:
name - the name of the attribute being queried
Returns:
the value of the attribute with the specified name

removeAttribute

public void removeAttribute(java.lang.String name)
Removes the attribute with the specified name.
Removing an attribute is reported with PropertyChange events.

Specified by:
removeAttribute in interface AttributeOwner
Parameters:
name - the name of the attribute being removed

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.Object value)
Sets an arbitrary attribute with the specified name and value.

If value is null, this method will remove the attribute.
Setting an attribute is reported with PropertyChange events.

Specified by:
setAttribute in interface AttributeOwner
Parameters:
name - the name of the attribute being added
value - the value of the attribute being added

getName

public java.lang.String getName()
Returns the name of the section.


getEditor

public javax.swing.JComponent getEditor(int editorWidth)
Deprecated. Use EditorFactory.createEditor(y.option.OptionHandler) instead.

Returns the component that provides editing capabilities for all option items within this section.


getEditor

public javax.swing.JComponent getEditor(int editorWidth,
                                        GuiFactory factory,
                                        java.lang.String handlerName)
Deprecated. Use EditorFactory.createEditor(y.option.OptionHandler) instead.

Returns the component that provides editing capabilities for all option items within this section using the provided factory and handler name to construct internationalized panels.


itemCount

public int itemCount()
Returns the number of items within this section.


item

public OptionItem item(int index)
Returns the OptionItem at position index within this section.


addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener pcl)
Adds a PropertyChangeListener to the listener list. The listener is registered for all bound properties of this class.

If listener is null, no exception is thrown and no action is performed.

Specified by:
addPropertyChangeListener in interface PropertyChangeReporter
Parameters:
pcl - the PropertyChangeListener to be added
See Also:
removePropertyChangeListener(java.beans.PropertyChangeListener), addPropertyChangeListener(String,java.beans.PropertyChangeListener)

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener pcl)
Removes a PropertyChangeListener from the listener list. This method should be used to remove the PropertyChangeListeners that were registered for all bound properties of this class.

If listener is null, no exception is thrown and no action is performed.

Specified by:
removePropertyChangeListener in interface PropertyChangeReporter
Parameters:
pcl - the PropertyChangeListener to be removed
See Also:
addPropertyChangeListener(java.beans.PropertyChangeListener), removePropertyChangeListener(String,java.beans.PropertyChangeListener)

addPropertyChangeListener

public void addPropertyChangeListener(java.lang.String propertyname,
                                      java.beans.PropertyChangeListener pcl)
Adds a PropertyChangeListener to the listener list for a specific property.

If listener is null, no exception is thrown and no action is performed.

Specified by:
addPropertyChangeListener in interface PropertyChangeReporter
Parameters:
propertyname - the name of the property to receive change notifications for
pcl - the PropertyChangeListener to be added
See Also:
addPropertyChangeListener(java.beans.PropertyChangeListener), removePropertyChangeListener(String,java.beans.PropertyChangeListener)

removePropertyChangeListener

public void removePropertyChangeListener(java.lang.String propertyname,
                                         java.beans.PropertyChangeListener pcl)
Removes a PropertyChangeListener from the listener list for a specific property. This method should be used to remove PropertyChangeListeners that were registered for a specific property.

If listener is null, no exception is thrown and no action is performed.

Specified by:
removePropertyChangeListener in interface PropertyChangeReporter
Parameters:
propertyname - a valid property name
pcl - the PropertyChangeListener to be removed
See Also:
addPropertyChangeListener(String,java.beans.PropertyChangeListener), removePropertyChangeListener(java.beans.PropertyChangeListener)

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