com.habibsweb.commons.components.list.DefaultScrollableListModel Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of selectlistbox Show documentation
Show all versions of selectlistbox Show documentation
List box with multiple ways to select including a selection rectangle
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.habibsweb.commons.components.list;
import com.habibsweb.commons.components.ScrollableList;
import java.io.Serializable;
import java.util.Arrays;
import java.util.List;
/**
*
* @author Charles Hamilton
*/
public class DefaultScrollableListModel extends AbstractScrollableListModel
implements Serializable {
private final ScrollableList scrollableList;
/**
* Constructs a new DefaultScrollableListModel
*
* @param scrollableList the ScrollableList
this is attached to
*/
public DefaultScrollableListModel(ScrollableList scrollableList) {
this(new Object[0], scrollableList);
}
/**
* Constructs a new DefaultScrollableListModel
and fills the
* items
*
* @param items an Array
of items to be added to the model
* @param scrollableList the ScrollableList
this is attached to
*/
public DefaultScrollableListModel(Object[] items, ScrollableList scrollableList) {
this(Arrays.asList(items), scrollableList);
}
/**
* Constructs a new DefaultScrollableListModel
and fills the
* items
*
* @param items a List
of items to be added to the model
* @param scrollableList the ScrollableList
this is attached to
*/
public DefaultScrollableListModel(List