Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## nextapp.echo2.app
Class MutableStyle

    java.lang.Object
      nextapp.echo2.app.MutableStyle

All Implemented Interfaces:
  java.io.Serializable, Style

Direct Known Subclasses:
  DerivedMutableStyle, MutableStyleEx

    public class MutableStyle

extends java.lang.Object
implements Style

A `Style` implementation which may be modified. Note that modifications to the `Style` will not necessarily be reflected in `Component`s that use the `Style` unless the `Component`s are specifically informed of the changes, i.e., by resetting the shared style of a `Component`. As such, shared `Style`s should not be updated once they are in use by `Component`s, as it will result in undefined behavior.

See Also:
  Serialized Form

Nested Class Summary
`class` | `MutableStyle.IndexedPropertyValue` A value object which stores the indexed values of a property.

Constructor Summary
`MutableStyle()` Default constructor.

Method Summary
`void` | `addStyleContent(Style style)` Adds the content of the specified style to this style.
`java.lang.Object` | `getIndexedProperty(java.lang.String propertyName, int propertyIndex)` Retrieves the value of the specified indexed property.
`java.lang.Object` | `getProperty(java.lang.String propertyName)` Retrieves the value of the specified property.
`java.util.Iterator` | `getPropertyIndices(java.lang.String propertyName)` Determines which indices of a particular property are set.
`java.util.Iterator` | `getPropertyNames()` Retrieves the names of all set properties.
`boolean` | `isIndexedPropertySet(java.lang.String propertyName, int index)` Determines if a particular index of an indexed property is set.
`boolean` | `isPropertySet(java.lang.String propertyName)` Determines if a particular property is set.
`void` | `removeIndexedProperty(java.lang.String propertyName, int propertyIndex)` Removes a value of an indexed property from the `Style`.
`void` | `removeProperty(java.lang.String propertyName)` Removes a property from the `Style`.
`void` | `setIndexedProperty(java.lang.String propertyName, int propertyIndex, java.lang.Object propertyValue)` Sets an indexed property of the `Style`
`void` | `setProperty(java.lang.String propertyName, java.lang.Object propertyValue)` Sets a property of the `Style`.
`int` | `size()` Returns the number of properties set.
`java.lang.String` | `toString()` Returns a debug representation.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### MutableStyle

    public MutableStyle()

  Default constructor.

Method Detail

### addStyleContent

    public void addStyleContent(Style style)

  Adds the content of the specified style to this style.

  Parameters:
    `style` - the style to add

### getIndexedProperty

    public java.lang.Object getIndexedProperty(java.lang.String propertyName,
                                               int propertyIndex)

  Description copied from interface: `Style`
  Retrieves the value of the specified indexed property.

  Specified by:
    `getIndexedProperty` in interface `Style`
  See Also:
    `Style.getIndexedProperty(java.lang.String, int)`

### getProperty

    public java.lang.Object getProperty(java.lang.String propertyName)

  Description copied from interface: `Style`
  Retrieves the value of the specified property.

  Specified by:
    `getProperty` in interface `Style`
  See Also:
    `Style.getProperty(java.lang.String)`

### getPropertyIndices

    public java.util.Iterator getPropertyIndices(java.lang.String propertyName)

  Description copied from interface: `Style`
  Determines which indices of a particular property are set.

  Specified by:
    `getPropertyIndices` in interface `Style`
  Returns:
    an `Iterator` that returns the set indices in incrementing order as `Integer`s
  See Also:
    `Style.getPropertyIndices(java.lang.String)`

### getPropertyNames

    public java.util.Iterator getPropertyNames()

  Description copied from interface: `Style`
  Retrieves the names of all set properties.

  Specified by:
    `getPropertyNames` in interface `Style`
  Returns:
    an `Iterator` that returns the names of all set properties
  See Also:
    `Style.getPropertyNames()`

### isIndexedPropertySet

    public boolean isIndexedPropertySet(java.lang.String propertyName,
                                        int index)

  Description copied from interface: `Style`
  Determines if a particular index of an indexed property is set.

  Specified by:
    `isIndexedPropertySet` in interface `Style`
  Parameters:
    `propertyName` - the property name
    `index` - the index
  Returns:
    true if the index is set
  See Also:
    `Style.isIndexedPropertySet(java.lang.String, int)`

### isPropertySet

    public boolean isPropertySet(java.lang.String propertyName)

  Description copied from interface: `Style`
  Determines if a particular property is set. In the case of an indexed property, this method will return true if any indices are set.

  Specified by:
    `isPropertySet` in interface `Style`
  Parameters:
    `propertyName` - the property name
  Returns:
    true if the property is set
  See Also:
    `Style.isPropertySet(java.lang.String)`

### removeIndexedProperty

    public void removeIndexedProperty(java.lang.String propertyName,
                                      int propertyIndex)

  Removes a value of an indexed property from the `Style`.

  Parameters:
    `propertyName` - the name of the property
    `propertyIndex` - the index of the property to remove

### removeProperty

    public void removeProperty(java.lang.String propertyName)

  Removes a property from the `Style`.

  Parameters:
    `propertyName` - the name of the property to remove

### setIndexedProperty

    public void setIndexedProperty(java.lang.String propertyName,
                                   int propertyIndex,
                                   java.lang.Object propertyValue)

  Sets an indexed property of the `Style`

  Parameters:
    `propertyName` - the name of the property
    `propertyIndex` - the index of the property
    `propertyValue` - the value of the property

### setProperty

    public void setProperty(java.lang.String propertyName,
                            java.lang.Object propertyValue)

  Sets a property of the `Style`. If `propertyValue` is null, the property will be removed.

  Parameters:
    `propertyName` - the name of the property
    `propertyValue` - the value of the property

### size

    public int size()

  Returns the number of properties set.

  Returns:
    the number of properties set

### toString

    public java.lang.String toString()

  Returns a debug representation.

  Overrides:
    `toString` in class `java.lang.Object`
  See Also:
    `Object.toString()`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD