Interface ListModel

All Superinterfaces:
ListModel
All Known Implementing Classes:
DefaultListModel

public interface ListModel extends ListModel
Modelo del control ListManager
Author:
Fernando González Cortés
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Appends the specified element to the end of this Vector
    Obtains the objects that are in the model
    void
    insertAt(int i, Object o)
    Inserts the specified element at the specified position in this Vector.
    remove(int i)
    Removes the element at the specified position in this Vector. shifts any subsequent elements to the left (subtracts one from their indices).

    Methods inherited from interface javax.swing.ListModel

    addListDataListener, getElementAt, getSize, removeListDataListener
  • Method Details

    • remove

      Object remove(int i) throws ArrayIndexOutOfBoundsException
      Removes the element at the specified position in this Vector. shifts any subsequent elements to the left (subtracts one from their indices). Returns the element that was removed from the Vector.
      Parameters:
      i - Índice del elemento que se quiere eliminar
      Returns:
      Objeto eliminado
      Throws:
      ArrayIndexOutOfBoundsException - Si el índice está fuera del array
    • insertAt

      void insertAt(int i, Object o)
      Inserts the specified element at the specified position in this Vector. Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices).
      Parameters:
      i - index at which the specified element is to be inserted.
      o - element to be inserted.
    • add

      void add(Object o)
      Appends the specified element to the end of this Vector
      Parameters:
      o - element to be appended to this Vector
    • getObjects

      Vector getObjects()
      Obtains the objects that are in the model
      Returns:
      Vector with the objetos