Liking cljdoc? Tell your friends :D

javax.swing.DefaultListModel

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 XMLEncoder.

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 XMLEncoder.
raw docstring

->default-list-modelclj

(->default-list-model)

Constructor.

Constructor.
raw docstring

addclj

(add this index element)

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()).

index - index at which the specified element is to be inserted - int element - element to be inserted - 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()).

index - index at which the specified element is to be inserted - `int`
element - element to be inserted - `E`
raw docstring

add-elementclj

(add-element this element)

Adds the specified component to the end of this list.

element - the component to be added - E

Adds the specified component to the end of this list.

element - the component to be added - `E`
raw docstring

capacityclj

(capacity this)

Returns the current capacity of this list.

returns: the current capacity - int

Returns the current capacity of this list.

returns: the current capacity - `int`
raw docstring

clearclj

(clear this)

Removes all of the elements from this list. The list will be empty after this call returns (unless it throws an exception).

Removes all of the elements from this list.  The list will
be empty after this call returns (unless it throws an exception).
raw docstring

containsclj

(contains this elem)

Tests whether the specified object is a component in this list.

elem - an object - java.lang.Object

returns: true if the specified object is the same as a component in this list - boolean

Tests whether the specified object is a component in this list.

elem - an object - `java.lang.Object`

returns: true if the specified object
          is the same as a component in this list - `boolean`
raw docstring

copy-intoclj

(copy-into this an-array)

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.

an-array - the array into which the components get copied - java.lang.Object[]

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.

an-array - the array into which the components get copied - `java.lang.Object[]`
raw docstring

element-atclj

(element-at this index)

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.

index - an index into this list - int

returns: the component at the specified index - E

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.

index - an index into this list - `int`

returns: the component at the specified index - `E`
raw docstring

elementsclj

(elements this)

Returns an enumeration of the components of this list.

returns: an enumeration of the components of this list - java.util.Enumeration<E>

Returns an enumeration of the components of this list.

returns: an enumeration of the components of this list - `java.util.Enumeration<E>`
raw docstring

empty?clj

(empty? this)

Tests whether this list has any components.

returns: true if and only if this list has no components, that is, its size is zero; false otherwise - boolean

Tests whether this list has any components.

returns: true if and only if this list has
          no components, that is, its size is zero;
          false otherwise - `boolean`
raw docstring

ensure-capacityclj

(ensure-capacity this min-capacity)

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.

min-capacity - the desired minimum capacity - int

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.

min-capacity - the desired minimum capacity - `int`
raw docstring

first-elementclj

(first-element this)

Returns the first component of this list. Throws a NoSuchElementException if this vector has no components.

returns: the first component of this list - E

Returns the first component of this list.
 Throws a NoSuchElementException if this
 vector has no components.

returns: the first component of this list - `E`
raw docstring

getclj

(get this index)

Returns the element at the specified position in this list.

Throws an ArrayIndexOutOfBoundsException if the index is out of range (index < 0 || index >= size()).

index - index of element to return - int

returns: E

Returns the element at the specified position in this list.

 Throws an ArrayIndexOutOfBoundsException
 if the index is out of range
 (index < 0 || index >= size()).

index - index of element to return - `int`

returns: `E`
raw docstring

get-element-atclj

(get-element-at this index)

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.

index - an index into this list - int

returns: the component at the specified index - E

throws: java.lang.ArrayIndexOutOfBoundsException - if the index is negative or greater than the current size of this list

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.

index - an index into this list - `int`

returns: the component at the specified index - `E`

throws: java.lang.ArrayIndexOutOfBoundsException - if the index is negative or greater than the current size of this list
raw docstring

get-sizeclj

(get-size this)

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.

returns: the number of components in this list - int

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.

returns: the number of components in this list - `int`
raw docstring

index-ofclj

(index-of this elem)
(index-of this elem index)

Searches for the first occurrence of elem, beginning the search at index.

elem - an desired component - java.lang.Object index - the index from which to begin searching - int

returns: the index where the first occurrence of elem is found after index; returns -1 if the elem is not found in the list - int

Searches for the first occurrence of elem, beginning
 the search at index.

elem - an desired component - `java.lang.Object`
index - the index from which to begin searching - `int`

returns: the index where the first occurrence of elem
          is found after index; returns -1
          if the elem is not found in the list - `int`
raw docstring

insert-element-atclj

(insert-element-at this element index)

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.

element - the component to insert - E index - where to insert the new component - int

throws: java.lang.ArrayIndexOutOfBoundsException - if the index was invalid

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.

element - the component to insert - `E`
index - where to insert the new component - `int`

throws: java.lang.ArrayIndexOutOfBoundsException - if the index was invalid
raw docstring

last-elementclj

(last-element this)

Returns the last component of the list. Throws a NoSuchElementException if this vector has no components.

returns: the last component of the list - E

Returns the last component of the list.
 Throws a NoSuchElementException if this vector
 has no components.

returns: the last component of the list - `E`
raw docstring

last-index-ofclj

(last-index-of this elem)
(last-index-of this elem index)

Searches backwards for elem, starting from the specified index, and returns an index to it.

elem - the desired component - java.lang.Object index - the index to start searching from - int

returns: 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 - int

Searches backwards for elem, starting from the
 specified index, and returns an index to it.

elem - the desired component - `java.lang.Object`
index - the index to start searching from - `int`

returns: 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 - `int`
raw docstring

removeclj

(remove this index)

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()).

index - the index of the element to removed - int

returns: the element previously at the specified position - E

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()).

index - the index of the element to removed - `int`

returns: the element previously at the specified position - `E`
raw docstring

remove-all-elementsclj

(remove-all-elements this)

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.

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.
raw docstring

remove-elementclj

(remove-element this obj)

Removes the first (lowest-indexed) occurrence of the argument from this list.

obj - the component to be removed - java.lang.Object

returns: true if the argument was a component of this list; false otherwise - boolean

Removes the first (lowest-indexed) occurrence of the argument
 from this list.

obj - the component to be removed - `java.lang.Object`

returns: true if the argument was a component of this
          list; false otherwise - `boolean`
raw docstring

remove-element-atclj

(remove-element-at this index)

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.

index - the index of the object to remove - int

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.

index - the index of the object to remove - `int`
raw docstring

remove-rangeclj

(remove-range this from-index to-index)

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.

from-index - the index of the lower end of the range - int to-index - the index of the upper end of the range - int

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.

from-index - the index of the lower end of the range - `int`
to-index - the index of the upper end of the range - `int`
raw docstring

setclj

(set this index element)

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()).

index - index of element to replace - int element - element to be stored at the specified position - E

returns: the element previously at the specified position - 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()).

index - index of element to replace - `int`
element - element to be stored at the specified position - `E`

returns: the element previously at the specified position - `E`
raw docstring

set-element-atclj

(set-element-at this element index)

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.

element - what the component is to be set to - E index - the specified index - int

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.

element - what the component is to be set to - `E`
index - the specified index - `int`
raw docstring

set-sizeclj

(set-size this new-size)

Sets the size of this list.

new-size - the new size of this list - int

Sets the size of this list.

new-size - the new size of this list - `int`
raw docstring

sizeclj

(size this)

Returns the number of components in this list.

returns: the number of components in this list - int

Returns the number of components in this list.

returns: the number of components in this list - `int`
raw docstring

to-arrayclj

(to-array this)

Returns an array containing all of the elements in this list in the correct order.

returns: an array containing the elements of the list - java.lang.Object[]

Returns an array containing all of the elements in this list in the
 correct order.

returns: an array containing the elements of the list - `java.lang.Object[]`
raw docstring

to-stringclj

(to-string this)

Returns a string that displays and identifies this object's properties.

returns: a String representation of this object - java.lang.String

Returns a string that displays and identifies this
 object's properties.

returns: a String representation of this object - `java.lang.String`
raw docstring

trim-to-sizeclj

(trim-to-size this)

Trims the capacity of this list to be the list's current size.

Trims the capacity of this list to be the list's current size.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close