protected class

SynthFileChooserUIImpl.DirectoryComboBoxModel

extends AbstractListModel
implements ComboBoxModel
java.lang.Object
   ↳ javax.swing.AbstractListModel
     ↳ sun.swing.plaf.synth.SynthFileChooserUIImpl.DirectoryComboBoxModel

Class Overview

Data model for a type-face selection combo-box.

Summary

[Expand]
Inherited Fields
From class javax.swing.AbstractListModel
Public Constructors
SynthFileChooserUIImpl.DirectoryComboBoxModel()
Public Methods
void addItem(File directory)
Adds the directory to the model and sets it to be selected, additionally clears out the previous selected directory and the paths leading up to it, if any.
int getDepth(int i)
Object getElementAt(int index)
Returns the value at the specified index.
Object getSelectedItem()
Returns the selected item
int getSize()
Returns the length of the list.
void setSelectedItem(Object selectedDirectory)
Set the selected item.
[Expand]
Inherited Methods
From class javax.swing.AbstractListModel
From class java.lang.Object
From interface javax.swing.ComboBoxModel
From interface javax.swing.ListModel

Public Constructors

public SynthFileChooserUIImpl.DirectoryComboBoxModel ()

Public Methods

public void addItem (File directory)

Adds the directory to the model and sets it to be selected, additionally clears out the previous selected directory and the paths leading up to it, if any.

public int getDepth (int i)

public Object getElementAt (int index)

Returns the value at the specified index.

Parameters
index the requested index
Returns
  • the value at index

public Object getSelectedItem ()

Returns the selected item

Returns
  • The selected item or null if there is no selection

public int getSize ()

Returns the length of the list.

Returns
  • the length of the list

public void setSelectedItem (Object selectedDirectory)

Set the selected item. The implementation of this method should notify all registered ListDataListeners that the contents have changed.

Parameters
selectedDirectory the list object to select or null to clear the selection