declare namespace javax { namespace swing { /** * This class loosely implements the java.util.Vector * API, in that it implements the 1.1.x version of * java.util.Vector, has no collection class support, * and notifies the ListDataListeners when changes occur. * Presently it delegates to a Vector, * in a future release it will be a real Collection implementation. *

* Warning: * Serialized objects of this class will not be compatible with * future Swing releases. The current serialization support is * appropriate for short term storage or RMI between applications running * the same version of Swing. As of 1.4, support for long term storage * of all JavaBeans™ * has been added to the java.beans package. * Please see {@link java.beans.XMLEncoder}. * @param the type of the elements of this model * @author Hans Muller */ // @ts-ignore class DefaultListModel extends javax.swing.AbstractListModel { // @ts-ignore constructor() /** * Returns the number of components in this list. *

* This method is identical to size, which implements the * List interface defined in the 1.2 Collections framework. * This method exists in conjunction with setSize so that * size is identifiable as a JavaBean property. * @return the number of components in this list * @see #size() */ // @ts-ignore public getSize(): number /*int*/ /** * Returns the component at the specified index. *

* Note: Although this method is not deprecated, the preferred * method to use is get(int), which implements the * List interface defined in the 1.2 Collections framework. *
* @param index an index into this list * @return the component at the specified index * @exception ArrayIndexOutOfBoundsException if the index * is negative or greater than the current size of this * list * @see #get(int) */ // @ts-ignore public getElementAt(index: number /*int*/): E /** * Copies the components of this list into the specified array. * The array must be big enough to hold all the objects in this list, * else an IndexOutOfBoundsException is thrown. * @param anArray the array into which the components get copied * @see Vector#copyInto(Object[]) */ // @ts-ignore public copyInto(anArray: java.lang.Object[] | any[]): void /** * Trims the capacity of this list to be the list's current size. * @see Vector#trimToSize() */ // @ts-ignore public trimToSize(): void /** * Increases the capacity of this list, if necessary, to ensure * that it can hold at least the number of components specified by * the minimum capacity argument. * @param minCapacity the desired minimum capacity * @see Vector#ensureCapacity(int) */ // @ts-ignore public ensureCapacity(minCapacity: number /*int*/): void /** * Sets the size of this list. * @param newSize the new size of this list * @see Vector#setSize(int) */ // @ts-ignore public setSize(newSize: number /*int*/): void /** * Returns the current capacity of this list. * @return the current capacity * @see Vector#capacity() */ // @ts-ignore public capacity(): number /*int*/ /** * Returns the number of components in this list. * @return the number of components in this list * @see Vector#size() */ // @ts-ignore public size(): number /*int*/ /** * Tests whether this list has any components. * @return true if and only if this list has * no components, that is, its size is zero; * false otherwise * @see Vector#isEmpty() */ // @ts-ignore public isEmpty(): boolean /** * Returns an enumeration of the components of this list. * @return an enumeration of the components of this list * @see Vector#elements() */ // @ts-ignore public elements(): java.util.Enumeration /** * Tests whether the specified object is a component in this list. * @param elem an object * @return true if the specified object * is the same as a component in this list * @see Vector#contains(Object) */ // @ts-ignore public contains(elem: java.lang.Object | any): boolean /** * Searches for the first occurrence of elem. * @param elem an object * @return the index of the first occurrence of the argument in this * list; returns -1 if the object is not found * @see Vector#indexOf(Object) */ // @ts-ignore public indexOf(elem: java.lang.Object | any): number /*int*/ /** * Searches for the first occurrence of elem, beginning * the search at index. * @param elem an desired component * @param index the index from which to begin searching * @return the index where the first occurrence of elem * is found after index; returns -1 * if the elem is not found in the list * @see Vector#indexOf(Object,int) */ // @ts-ignore public indexOf(elem: java.lang.Object | any, index: number /*int*/): number /*int*/ /** * Returns the index of the last occurrence of elem. * @param elem the desired component * @return the index of the last occurrence of elem * in the list; returns -1 if the object is not found * @see Vector#lastIndexOf(Object) */ // @ts-ignore public lastIndexOf(elem: java.lang.Object | any): number /*int*/ /** * Searches backwards for elem, starting from the * specified index, and returns an index to it. * @param elem the desired component * @param index the index to start searching from * @return the index of the last occurrence of the elem * in this list at position less than index; * returns -1 if the object is not found * @see Vector#lastIndexOf(Object,int) */ // @ts-ignore public lastIndexOf(elem: java.lang.Object | any, index: number /*int*/): number /*int*/ /** * Returns the component at the specified index. * Throws an ArrayIndexOutOfBoundsException if the index * is negative or not less than the size of the list. *
* Note: Although this method is not deprecated, the preferred * method to use is get(int), which implements the * List interface defined in the 1.2 Collections framework. *
* @param index an index into this list * @return the component at the specified index * @see #get(int) * @see Vector#elementAt(int) */ // @ts-ignore public elementAt(index: number /*int*/): E /** * Returns the first component of this list. * Throws a NoSuchElementException if this * vector has no components. * @return the first component of this list * @see Vector#firstElement() */ // @ts-ignore public firstElement(): E /** * Returns the last component of the list. * Throws a NoSuchElementException if this vector * has no components. * @return the last component of the list * @see Vector#lastElement() */ // @ts-ignore public lastElement(): E /** * Sets the component at the specified index of this * list to be the specified element. The previous component at that * position is discarded. *

* Throws an ArrayIndexOutOfBoundsException if the index * is invalid. *

* Note: Although this method is not deprecated, the preferred * method to use is set(int,Object), which implements the * List interface defined in the 1.2 Collections framework. *
* @param element what the component is to be set to * @param index the specified index * @see #set(int,Object) * @see Vector#setElementAt(Object,int) */ // @ts-ignore public setElementAt(element: E, index: number /*int*/): void /** * Deletes the component at the specified index. *

* Throws an ArrayIndexOutOfBoundsException if the index * is invalid. *

* Note: Although this method is not deprecated, the preferred * method to use is remove(int), which implements the * List interface defined in the 1.2 Collections framework. *
* @param index the index of the object to remove * @see #remove(int) * @see Vector#removeElementAt(int) */ // @ts-ignore public removeElementAt(index: number /*int*/): void /** * Inserts the specified element as a component in this list at the * specified index. *

* Throws an ArrayIndexOutOfBoundsException if the index * is invalid. *

* Note: Although this method is not deprecated, the preferred * method to use is add(int,Object), which implements the * List interface defined in the 1.2 Collections framework. *
* @param element the component to insert * @param index where to insert the new component * @exception ArrayIndexOutOfBoundsException if the index was invalid * @see #add(int,Object) * @see Vector#insertElementAt(Object,int) */ // @ts-ignore public insertElementAt(element: E, index: number /*int*/): void /** * Adds the specified component to the end of this list. * @param element the component to be added * @see Vector#addElement(Object) */ // @ts-ignore public addElement(element: E): void /** * Removes the first (lowest-indexed) occurrence of the argument * from this list. * @param obj the component to be removed * @return true if the argument was a component of this * list; false otherwise * @see Vector#removeElement(Object) */ // @ts-ignore public removeElement(obj: java.lang.Object | any): boolean /** * Removes all components from this list and sets its size to zero. *
* Note: Although this method is not deprecated, the preferred * method to use is clear, which implements the * List interface defined in the 1.2 Collections framework. *
* @see #clear() * @see Vector#removeAllElements() */ // @ts-ignore public removeAllElements(): void /** * Returns a string that displays and identifies this * object's properties. * @return a String representation of this object */ // @ts-ignore public toString(): string /** * Returns an array containing all of the elements in this list in the * correct order. * @return an array containing the elements of the list * @see Vector#toArray() */ // @ts-ignore public toArray(): any[] /** * Returns the element at the specified position in this list. *

* Throws an ArrayIndexOutOfBoundsException * if the index is out of range * (index < 0 || index >= size()). * @param index index of element to return */ // @ts-ignore public get(index: number /*int*/): E /** * Replaces the element at the specified position in this list with the * specified element. *

* Throws an ArrayIndexOutOfBoundsException * if the index is out of range * (index < 0 || index >= size()). * @param index index of element to replace * @param element element to be stored at the specified position * @return the element previously at the specified position */ // @ts-ignore public set(index: number /*int*/, element: E): E /** * Inserts the specified element at the specified position in this list. *

* Throws an ArrayIndexOutOfBoundsException if the * index is out of range * (index < 0 || index > size()). * @param index index at which the specified element is to be inserted * @param element element to be inserted */ // @ts-ignore public add(index: number /*int*/, element: E): void /** * Removes the element at the specified position in this list. * Returns the element that was removed from the list. *

* Throws an ArrayIndexOutOfBoundsException * if the index is out of range * (index < 0 || index >= size()). * @param index the index of the element to removed * @return the element previously at the specified position */ // @ts-ignore public remove(index: number /*int*/): E /** * Removes all of the elements from this list. The list will * be empty after this call returns (unless it throws an exception). */ // @ts-ignore public clear(): void /** * Deletes the components at the specified range of indexes. * The removal is inclusive, so specifying a range of (1,5) * removes the component at index 1 and the component at index 5, * as well as all components in between. *

* Throws an ArrayIndexOutOfBoundsException * if the index was invalid. * Throws an IllegalArgumentException if * fromIndex > toIndex. * @param fromIndex the index of the lower end of the range * @param toIndex the index of the upper end of the range * @see #remove(int) */ // @ts-ignore public removeRange(fromIndex: number /*int*/, toIndex: number /*int*/): void } } }