net.sf.sfac.setting
Class SubSettingsList

java.lang.Object
  extended by net.sf.sfac.setting.SubSettingsList
All Implemented Interfaces:
ComboBoxModel, ListModel

public class SubSettingsList
extends Object
implements ListModel, ComboBoxModel

Helper managing a list of sub-settings stored in a single setting.
It allows to easily make profiles (= different set of identical settings saved in the same global settings file).

Author:
Olivier Berlanger

Constructor Summary
SubSettingsList(Settings sett, String prefix)
           
 
Method Summary
 void addListDataListener(ListDataListener l)
           
 Settings addSubSetting()
           
 Settings addSubSetting(int indexInList)
           
 Settings addSubSetting(int indexInList, String subSettingName)
           
 void clear()
          Remove all the settings corresponding to this list from the parent settings.
 void fireDataChanged()
           
 void fireSelectionChanged()
           
 Object getElementAt(int index)
           
 Object getSelectedItem()
           
 int getSize()
           
 Settings getSubSettingAt(int i)
           
 void removeListDataListener(ListDataListener l)
           
 void removeSubSettingAt(int i)
           
 void removeSubSettings(Settings subSett)
           
 void setSelectedItem(Object anItem)
           
 void sort()
           
 void synchronizeWithSettings()
          Synchronize the internal state of this object when parent settings is modified by outer code (for example: settings are reloaded).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubSettingsList

public SubSettingsList(Settings sett,
                       String prefix)
Method Detail

synchronizeWithSettings

public void synchronizeWithSettings()
Synchronize the internal state of this object when parent settings is modified by outer code (for example: settings are reloaded).


getSubSettingAt

public Settings getSubSettingAt(int i)

addSubSetting

public Settings addSubSetting()

addSubSetting

public Settings addSubSetting(int indexInList)

addSubSetting

public Settings addSubSetting(int indexInList,
                              String subSettingName)

removeSubSettings

public void removeSubSettings(Settings subSett)

removeSubSettingAt

public void removeSubSettingAt(int i)

clear

public void clear()
Remove all the settings corresponding to this list from the parent settings.


sort

public void sort()

getElementAt

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

getSize

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

getSelectedItem

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

setSelectedItem

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

addListDataListener

public void addListDataListener(ListDataListener l)
Specified by:
addListDataListener in interface ListModel

removeListDataListener

public void removeListDataListener(ListDataListener l)
Specified by:
removeListDataListener in interface ListModel

fireDataChanged

public void fireDataChanged()

fireSelectionChanged

public void fireSelectionChanged()


Copyright © 2012. All Rights Reserved.