Summ:  Nested Constr. Methods    Details:  Constr. Methods      Class:  Prev Next
com.artfulbits.aiCharts.Base
Class ChartCollection

java.lang.Object com.artfulbits.aiCharts.Base.ChartCollection

Declaration: public class ChartCollection extends Object
Direct Subclasses: ChartNamedCollection

 

Represents generic specialized collection for chart elements. Collection supports changes notification supplied by ChartCollection.IChangeListener upon creation.

 

Since: 1.0
See also: ChartNamedCollection

 

 

Nested Members Summary
static interface ChartCollection.IChangeListener
    
Represents IChangeListener class indented to be specified during initialization of ChartCollection as an object that handles changes.

 

 

Constructors Summary
ChartCollection(ChartCollection.IChangeListener listener)
    
Initializes a new instance of ChartCollection with instance of ChartCollection.IChangeListener listening class.

 

 

Methods Summary
void add(java.lang.Object obj)
    
Adds object to the collection.
void clear()
    
Removes all components from this collection.
boolean contains(java.lang.Object obj)
    
Indicates whether collection contains specified object.
java.lang.Object get(int index)
    
Gets object by specified index.
int indexOf(java.lang.Object obj)
    
Searches for the first occurrence of the given item, testing for equality using the equals method.
void set(int index, java.lang.Object obj)
    
Sets the object at the specified index of this vector to be the specified object.
int size()
    
Returns the number of items in this collection

 

Methods inherited from class: java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

 

 

 

ChartCollection

 

public ChartCollection( ChartCollection.IChangeListener listener)

 

Initializes a new instance of ChartCollection with instance of ChartCollection.IChangeListener listening class.

 

Parameters:
listener-
instance of collection change listener.

 

Since: 1.0

 

 

 

 

add

 

public void add( java.lang.Object obj)

 

Adds object to the collection.

 

Parameters:
obj-
object that is indented to be added to collection.

 

Since: 1.0

 

 

 

get

 

public java.lang.Object get( int index)

 

Gets object by specified index.

 

Parameters:
index-
position in collection.
Returns:
an object.

 

Since: 1.0

 

 

 

contains

 

public boolean contains( java.lang.Object obj)

 

Indicates whether collection contains specified object.

 

Parameters:
obj-
traget object.
Returns:
true if the specified object is an item in this collection, otherwise false.

 

Since: 1.0

 

 

 

size

 

public int size( )

 

Returns the number of items in this collection

 

Returns:
the number of items in this collection

 

Since: 1.0

 

 

 

indexOf

 

public int indexOf( java.lang.Object obj)

 

Searches for the first occurrence of the given item, testing for equality using the equals method.

 

Parameters:
obj-
an object.
Returns:
the index of the first occurrence of the argument in this vector; returns -1 if the object is not found.

 

Since: 1.0

 

 

 

set

 

public void set( int index,
java.lang.Object obj)

 

Sets the object at the specified index of this vector to be the specified object. The previous component at that position is discarded.

 

Parameters:
index-
the specified index.
obj-
an object

 

Since: 1.0

 

 

 

clear

 

public void clear( )

 

Removes all components from this collection.

 

Since: 1.0

 

 

© 2005 - 2010 ArtfulBits. All rights reserved.