001package jmaster.jumploader.model.api.common;
002
003/**
004 * IListSelection
005 * 
006 * @author timur
007 */
008
009public interface IListSelection {
010        //---------------------------------------------------------------
011        //      constants
012        //---------------------------------------------------------------
013        //---------------------------------------------------------------
014        //      business methods
015        //---------------------------------------------------------------
016        /**
017         * add listener
018         */
019        public void addListener( IListSelectionListener listener );
020        /**
021         * remove listener
022         */
023        public void removeListener( IListSelectionListener listener );
024        /**
025         * selected indices retrieval
026         */
027        public int[] getSelectedIndices();
028        /**
029         * selected indices retrieval as strings
030         */
031        public String[] getSelectedIndicesAsStrings();
032        /**
033         * selected indices set
034         */
035        public void setSelectedIndices( int[] indices );
036        /**
037         * selected item count retrieval
038         */
039        public int getSelectedItemCount();
040        /**
041         * selected item index retrieval at specified position
042         */
043        public int getSelectedItemIndexAt( int index );
044        /**
045         * check whether specified index is selected
046         */
047        public boolean isIndexSelected( int index );
048        /**
049         * retrieve index of specified index
050         */
051        public int indexOf( int index );
052}