Chart FX 7 for Java Server

com.softwarefx.chartfx.server
Class ConditionalAttributesCollection

java.lang.Object
  extended by com.softwarefx.chartfx.server.LabelAwareCollection
      extended by com.softwarefx.chartfx.server.PointAttributesAwareCollection
          extended by com.softwarefx.chartfx.server.ConditionalAttributesCollection
All Implemented Interfaces:
ILegendBoxItem, ILegendBoxItemCollection, Iterable<ConditionalAttributes>, Collection<ConditionalAttributes>

public class ConditionalAttributesCollection
extends PointAttributesAwareCollection
implements ILegendBoxItem, ILegendBoxItemCollection, Iterable<ConditionalAttributes>, Collection<ConditionalAttributes>

Provides access to the ConditionalAttributesCollection object.

Charts may support an unlimited ConditionalAttributes objects. The ConditionalAttributesCollection is a collection of all the ConditionalAttribute items for a chart.


Constructor Summary
ConditionalAttributesCollection()
           
 
Method Summary
 boolean add(ConditionalAttributes o)
          Appends the specified element to the ConditionalAttributesCollection collection.
 boolean addAll(Collection<? extends ConditionalAttributes> c)
          Adds all of the elements in the specified collection to the ConditionalAttributesCollection collection.
 void addRange(ConditionalAttributes[] items)
          Adds an array of objects to the ConditionalAttributesCollection collection.
 void clear()
          Removes all of the elements from this collection.
 boolean contains(Object o)
          Returns true if the ConditionalAttributesCollection contains the specified element.
 boolean containsAll(Collection<?> c)
          Returns true if the ConditionalAttributesCollection collection contains all of the elements in the specified collection.
 void copyTo(ConditionalAttributes[] items, int index)
          Copies the entire Collection to a compatible one-dimensional Array, starting at the specified index of the target array.
 ConditionalAttributes get(int index)
          Returns the element at the specified position in the ConditionalAttributesCollection.
 void insert(int index, ConditionalAttributes item)
          Inserts an element into the ArrayList at the specified index.
 boolean isEmpty()
          Returns true if this collection contains no elements.
 boolean isShowInLegend()
          Gets the ShowInLegend.
 Iterator<ConditionalAttributes> iterator()
          Returns an iterator over the elements in this collection.
 void recalculate()
          Reapplies all the conditional attributes for the current chart.
 boolean remove(Object o)
          Removes the specified element from the ConditionalAttributesCollection collection.
 boolean removeAll(Collection<?> c)
          Removes all of the elements in the specified collection from the ConditionalAttributesCollection collection.
 void removeAt(int index)
          Removes the element in the specified position from the ConditionalAttributesCollection collection.
 void resumeUpdate()
          Resumes the automatic behavior of re-applying Conditional attributes when data is modified in the chart.
 boolean retainAll(Collection<?> c)
          Retains only the elements in the ConditionalAttributesCollection collection that are contained in the specified collection.
 void setShowInLegend(boolean value)
          Sets a value indicating whether or not to show ConditionaAttributes in the legend.
 int size()
          Returns the number of elements in this collection.
 void suspendUpdate()
          Suspends the automatic behavior of re-applying Conditional attributes when data is modified in the chart.
 Object[] toArray()
          Returns an array containing all of the elements in this collection in proper sequence.
<T> T[]
toArray(T[] a)
          Returns an array containing all of the elements in this collection in proper sequence.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Collection
equals, hashCode
 

Constructor Detail

ConditionalAttributesCollection

public ConditionalAttributesCollection()
Method Detail

add

public boolean add(ConditionalAttributes o)

Appends the specified element to the ConditionalAttributesCollection collection.

Specified by:
add in interface Collection<ConditionalAttributes>
Parameters:
o - The item to add to the ConditionalAttributesCollection collection.

addAll

public boolean addAll(Collection<? extends ConditionalAttributes> c)

Adds all of the elements in the specified collection to the ConditionalAttributesCollection collection.

Specified by:
addAll in interface Collection<ConditionalAttributes>
Parameters:
c - Elements to be inserted into this collection.

addRange

public void addRange(ConditionalAttributes[] items)

Adds an array of objects to the ConditionalAttributesCollection collection.

Parameters:
items - An array of objects to add to the collection.

clear

public void clear()

Removes all of the elements from this collection.

Specified by:
clear in interface Collection<ConditionalAttributes>
Overrides:
clear in class LabelAwareCollection

contains

public boolean contains(Object o)

Returns true if the ConditionalAttributesCollection contains the specified element.

Specified by:
contains in interface Collection<ConditionalAttributes>
Parameters:
o - Element whose presence in this collection is to be tested.

containsAll

public boolean containsAll(Collection<?> c)

Returns true if the ConditionalAttributesCollection collection contains all of the elements in the specified collection.

Specified by:
containsAll in interface Collection<ConditionalAttributes>
Parameters:
c - Collection to be checked for containment in this collection.

copyTo

public void copyTo(ConditionalAttributes[] items,
                   int index)

Copies the entire Collection to a compatible one-dimensional Array, starting at the specified index of the target array.

Parameters:
items - The one-dimensional Array that is the destination of the elements copied from ConditionalAttributesCollection. The Array must have zero-based indexing.
index - The zero-based index in array at which copying begins.

get

public ConditionalAttributes get(int index)

Returns the element at the specified position in the ConditionalAttributesCollection.

Parameters:
index - Index of element to return.

insert

public void insert(int index,
                   ConditionalAttributes item)

Inserts an element into the ArrayList at the specified index.

Parameters:
index - The zero-based index at which position should be inserted.
item - The item to insert.

isEmpty

public boolean isEmpty()

Returns true if this collection contains no elements.

Specified by:
isEmpty in interface Collection<ConditionalAttributes>

isShowInLegend

public boolean isShowInLegend()

Gets the ShowInLegend. For more detail see setShowInLegend(boolean).


iterator

public Iterator<ConditionalAttributes> iterator()

Returns an iterator over the elements in this collection.

Specified by:
iterator in interface Iterable<ConditionalAttributes>
Specified by:
iterator in interface Collection<ConditionalAttributes>

recalculate

public void recalculate()

Reapplies all the conditional attributes for the current chart.

Remarks:
  • When data values are modified, the configured conditional attributes are automatically applied to the chart. However, if the values of the Conditional Attributes themselves are modified, this method must be called to re-apply the attributes with new settings to the chart.

  • See Also:
    suspendUpdate(), resumeUpdate(), ConditionalAttributes

    remove

    public boolean remove(Object o)

    Removes the specified element from the ConditionalAttributesCollection collection.

    Specified by:
    remove in interface Collection<ConditionalAttributes>
    Parameters:
    o - The item to remove from the ConditionalAttributesCollection collection.

    removeAll

    public boolean removeAll(Collection<?> c)

    Removes all of the elements in the specified collection from the ConditionalAttributesCollection collection.

    Specified by:
    removeAll in interface Collection<ConditionalAttributes>
    Parameters:
    c - Elements to be removed from this collection.

    removeAt

    public void removeAt(int index)

    Removes the element in the specified position from the ConditionalAttributesCollection collection.

    Overrides:
    removeAt in class LabelAwareCollection
    Parameters:
    index - The index of the item to remove from the ConditionalAttributesCollection collection.

    resumeUpdate

    public void resumeUpdate()

    Resumes the automatic behavior of re-applying Conditional attributes when data is modified in the chart.

    Remarks:
  • When the chart's data array is modified (chart values change), the automatic behavior of configured ConditionalAttributes are to be re-applied to the chart. Using the suspendUpdate() method, developers can disable this default behavior. Using the ResumeUpdate method, developers may resume automatic updates by Chart FX.

  • If you plan on modifiying a large number of data values in a chart, you may wish to call the suspendUpdate()
    method until this processing is complete. This allows for improved performance.

  • Developers may always force this update by calling the recalculate() method.

  • See Also:
    suspendUpdate(), recalculate()

    retainAll

    public boolean retainAll(Collection<?> c)

    Retains only the elements in the ConditionalAttributesCollection collection that are contained in the specified collection.

    Specified by:
    retainAll in interface Collection<ConditionalAttributes>
    Parameters:
    c - Elements to be retained in this collection.

    setShowInLegend

    public void setShowInLegend(boolean value)

    Sets a value indicating whether or not to show ConditionaAttributes in the legend.

    Remarks:
  • The Chart.getConditionalAttributes() property of the Chart object is used to access the ConditionalAttributesCollection object of a chart.

  • See Also:
    Chart.getConditionalAttributes(), Chart

    size

    public int size()

    Returns the number of elements in this collection.

    Specified by:
    size in interface Collection<ConditionalAttributes>

    suspendUpdate

    public void suspendUpdate()

    Suspends the automatic behavior of re-applying Conditional attributes when data is modified in the chart.

    Remarks:
  • When the chart's data array is modified (chart values change), the automatic behavior of configured ConditionalAttributes are to be re-applied to the chart. Using the SuspendUpdate method, developers can disable this default behavior. Using the resumeUpdate() method, developers may resume automatic updates by Chart FX.

  • If you plan on modifiying a large number of data values in a chart, you may wish to call the SuspendUpdate
    method until this processing is complete. This allows for improved performance.

  • Developers may always force this update by calling the recalculate() method.

  • See Also:
    recalculate(), resumeUpdate()

    toArray

    public Object[] toArray()

    Returns an array containing all of the elements in this collection in proper sequence.

    Specified by:
    toArray in interface Collection<ConditionalAttributes>

    toArray

    public <T> T[] toArray(T[] a)

    Returns an array containing all of the elements in this collection in proper sequence.

    Specified by:
    toArray in interface Collection<ConditionalAttributes>

    http://www.softwarefx.com

    2008 Software FX, Inc. All Rights Reserved. Chart FX is a registered trademark of Software FX, Inc
    All other names are trademarks or registered trademarks of their respective owners.