Class JComponentList.JComponentListModel

    • Constructor Detail

      • JComponentListModel

        public JComponentListModel()
    • Method Detail

      • add

        public void add​(int index,
                        Object element)
        Inserts the specified JComponent at the specified position in this list.
        Overrides:
        add in class DefaultListModel
        Parameters:
        index - index at which the specified element is to be inserted
        element - JComponet to be inserted
      • addElement

        public void addElement​(Object obj)
        Adds the specified JComponent to the end of this list.
        Overrides:
        addElement in class DefaultListModel
        Parameters:
        obj - the JComponent to be added
      • set

        public Object set​(int index,
                          Object element)
        Replaces the JComponent at the specified position in this list with the specified JComponent.
        Overrides:
        set in class DefaultListModel
        Parameters:
        index - index of JComponent to replace
        element - JComponent to be stored at the specified position
        Returns:
        the JComponent previously at the specified position
      • setElementAt

        public void setElementAt​(Object obj,
                                 int index)
        Sets the JComponent at the specified index of this list to be the specified object.
        Overrides:
        setElementAt in class DefaultListModel
        Parameters:
        obj - what the JComponent is to be set to
        index - the specified index