edu.upenn.cis.pdtb.graphics
Class FileNoComboBoxModel

java.lang.Object
  extended byedu.upenn.cis.pdtb.graphics.FileNoComboBoxModel
All Implemented Interfaces:
javax.swing.event.ChangeListener, javax.swing.ComboBoxModel, java.util.EventListener, java.awt.event.ItemListener, javax.swing.ListModel

public class FileNoComboBoxModel
extends java.lang.Object
implements javax.swing.ComboBoxModel, java.awt.event.ItemListener, javax.swing.event.ChangeListener

ComboBoxModel representing the files that are present in a given section. The section number is obtained by setting this as a listener on the combo box for section numbers.

Author:
nikhild
See Also:
SecNoComboBoxModel

Constructor Summary
FileNoComboBoxModel(java.util.LinkedList[] fileNumbers)
          Creates a new instance of FileNoComboBoxModel
 
Method Summary
 void addListDataListener(javax.swing.event.ListDataListener listDataListener)
           
 java.lang.Object getElementAt(int param)
           
 java.lang.String getFirstFileNo()
           
 java.lang.String getLastFileNo()
           
 java.lang.String getNextFileNo()
           
 java.lang.String getPrevFileNo()
           
 java.lang.Object getSelectedItem()
           
 int getSize()
           
 void itemStateChanged(java.awt.event.ItemEvent e)
           
 void removeListDataListener(javax.swing.event.ListDataListener listDataListener)
           
protected  void setSectionNo(int secNo)
          Set the section number
 void setSelectedItem(java.lang.Object obj)
           
 void stateChanged(javax.swing.event.ChangeEvent e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileNoComboBoxModel

public FileNoComboBoxModel(java.util.LinkedList[] fileNumbers)
Creates a new instance of FileNoComboBoxModel

Method Detail

addListDataListener

public void addListDataListener(javax.swing.event.ListDataListener listDataListener)
Specified by:
addListDataListener in interface javax.swing.ListModel

getElementAt

public java.lang.Object getElementAt(int param)
Specified by:
getElementAt in interface javax.swing.ListModel

getSelectedItem

public java.lang.Object getSelectedItem()
Specified by:
getSelectedItem in interface javax.swing.ComboBoxModel

setSectionNo

protected void setSectionNo(int secNo)
Set the section number

Parameters:
secNo - the section number

getSize

public int getSize()
Specified by:
getSize in interface javax.swing.ListModel

removeListDataListener

public void removeListDataListener(javax.swing.event.ListDataListener listDataListener)
Specified by:
removeListDataListener in interface javax.swing.ListModel

setSelectedItem

public void setSelectedItem(java.lang.Object obj)
Specified by:
setSelectedItem in interface javax.swing.ComboBoxModel

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent e)
Specified by:
itemStateChanged in interface java.awt.event.ItemListener

getNextFileNo

public java.lang.String getNextFileNo()

getPrevFileNo

public java.lang.String getPrevFileNo()

getFirstFileNo

public java.lang.String getFirstFileNo()

getLastFileNo

public java.lang.String getLastFileNo()

stateChanged

public void stateChanged(javax.swing.event.ChangeEvent e)
Specified by:
stateChanged in interface javax.swing.event.ChangeListener