All Downloads are FREE. Search and download functionalities are using the official Maven repository.

monniasza.collects.ReadOnlyListModel Maven / Gradle / Ivy

Go to download

Dependency for the MultiMachineBuilder, a voxel game about building an industrial empire in a finite world. THIS RELEASE IS NOT PLAYABLE. To play the game, donwload from >ITCH.IO LINK HERE< or >GH releases link here<

The newest version!
/**
 * 
 */
package monniasza.collects;

import javax.swing.ListModel;
import javax.swing.event.ListDataListener;

/**
 * A read-only wrapper of a list model
 * @author oskar
 * @param  type of elements
 */
public class ReadOnlyListModel implements ListModel {
	private final ListModel model;
	/** 
	 * Wraps a list model
	 * @param model list model to be wrapped
	 */
	public ReadOnlyListModel(ListModel model) {
		this.model = model;
	}
	@Override
	public void addListDataListener(@SuppressWarnings("null") ListDataListener arg0) {
		model.addListDataListener(arg0);
	}

	@Override
	public E getElementAt(int arg0) {
		return model.getElementAt(arg0);
	}

	@Override
	public int getSize() {
		return model.getSize();
	}

	@Override
	public void removeListDataListener(@SuppressWarnings("null") ListDataListener arg0) {
		model.removeListDataListener(arg0);
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy