us.zuercher.gpx2map.gui
Class FontSizeComboBoxModel

java.lang.Object
  extended by javax.swing.AbstractListModel
      extended by javax.swing.DefaultComboBoxModel
          extended by us.zuercher.gpx2map.gui.FontSizeComboBoxModel
All Implemented Interfaces:
Serializable, ComboBoxModel, ListModel, MutableComboBoxModel

public class FontSizeComboBoxModel
extends DefaultComboBoxModel

FontSizeComboBoxModel defines the choices available in the font size combo box of the Gpx2Map GUI.

Author:
Stephan Zuercher
See Also:
Serialized Form

Nested Class Summary
static class FontSizeComboBoxModel.FontSizeChoice
          FontChoice represents a choice in the font size selection combo box.
 
Field Summary
private static int defaultIndex
          Default font size choice.
private static FontSizeComboBoxModel.FontSizeChoice[] fontSizeChoices
          Array of font sizes choices initialized once during the first construction of this class.
 
Fields inherited from class javax.swing.AbstractListModel
listenerList
 
Constructor Summary
FontSizeComboBoxModel()
          Constructs a new FontSizeComboBoxModel.
 
Method Summary
private static FontSizeComboBoxModel.FontSizeChoice[] getFontSizeChoices()
          Generates a list of FontSizeComboBoxModel.FontSizeChoice objects.
 
Methods inherited from class javax.swing.DefaultComboBoxModel
addElement, getElementAt, getIndexOf, getSelectedItem, getSize, insertElementAt, removeAllElements, removeElement, removeElementAt, setSelectedItem
 
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

fontSizeChoices

private static FontSizeComboBoxModel.FontSizeChoice[] fontSizeChoices
Array of font sizes choices initialized once during the first construction of this class.


defaultIndex

private static int defaultIndex
Default font size choice.

Constructor Detail

FontSizeComboBoxModel

public FontSizeComboBoxModel()
Constructs a new FontSizeComboBoxModel.

Method Detail

getFontSizeChoices

private static FontSizeComboBoxModel.FontSizeChoice[] getFontSizeChoices()
Generates a list of FontSizeComboBoxModel.FontSizeChoice objects. The sizes are relatively standard and cannot be changed. The list is only generated once and stored in fontSizeChoices. In addition, defaultIndex is initialized.

Returns:
list of FontSizeChoice objectgs.