org.chorem.lima.ui.combobox
Class FinancialPeriodComboBoxModel

java.lang.Object
  extended by javax.swing.AbstractListModel
      extended by org.chorem.lima.ui.combobox.FinancialPeriodComboBoxModel
All Implemented Interfaces:
Serializable, ComboBoxModel, ListModel, ServiceListener

public class FinancialPeriodComboBoxModel
extends AbstractListModel
implements ComboBoxModel, ServiceListener

Opened financial period combo box model.

Version:
$Revision: 3137 $ Last update : $Date: 2011-05-20 16:26:33 +0200 (Fri, 20 May 2011) $ By : $Author: vsalaun $
Author:
chatellier
See Also:
Serialized Form

Field Summary
protected  List<FinancialPeriod> datasCache
           
protected  FinancialPeriodServiceMonitorable financialPeriodService
           
protected  Object selectedFinancialPeriod
           
protected  FiscalPeriod selectedFiscalPeriod
           
 
Fields inherited from class javax.swing.AbstractListModel
listenerList
 
Constructor Summary
FinancialPeriodComboBoxModel()
          Constructor for locked period list.
FinancialPeriodComboBoxModel(boolean displayAllPeriods)
          Constructor for period list.
 
Method Summary
 List<FinancialPeriod> getAllDataList()
           
 List<FinancialPeriod> getDataList()
           
 Object getElementAt(int index)
           
 Object getSelectedItem()
           
 int getSize()
           
 void notifyMethod(String serviceName, String methodeName)
           
 void refresh()
           
 void refreshAll()
           
 void setFiscalPeriod(FiscalPeriod fiscalPeriod)
           
 void setSelectedItem(Object anItem)
           
 
Methods inherited from class javax.swing.AbstractListModel
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.ListModel
addListDataListener, removeListDataListener
 

Field Detail

selectedFinancialPeriod

protected Object selectedFinancialPeriod

datasCache

protected List<FinancialPeriod> datasCache

financialPeriodService

protected FinancialPeriodServiceMonitorable financialPeriodService

selectedFiscalPeriod

protected FiscalPeriod selectedFiscalPeriod
Constructor Detail

FinancialPeriodComboBoxModel

public FinancialPeriodComboBoxModel()
Constructor for locked period list.


FinancialPeriodComboBoxModel

public FinancialPeriodComboBoxModel(boolean displayAllPeriods)
Constructor for period list.

Parameters:
all - if true, display all available period, otherwize display only locked ones
Method Detail

setFiscalPeriod

public void setFiscalPeriod(FiscalPeriod fiscalPeriod)

getSize

public int getSize()
Specified by:
getSize in interface ListModel

getElementAt

public Object getElementAt(int index)
Specified by:
getElementAt in interface ListModel

setSelectedItem

public void setSelectedItem(Object anItem)
Specified by:
setSelectedItem in interface ComboBoxModel

getSelectedItem

public Object getSelectedItem()
Specified by:
getSelectedItem in interface ComboBoxModel

getDataList

public List<FinancialPeriod> getDataList()

getAllDataList

public List<FinancialPeriod> getAllDataList()

refresh

public void refresh()

refreshAll

public void refreshAll()

notifyMethod

public void notifyMethod(String serviceName,
                         String methodeName)
Specified by:
notifyMethod in interface ServiceListener


Copyright © 2008-2011 CodeLutin. All Rights Reserved.