|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jrefinery.report.preview.EncodingComboBoxModel
A model for the 'encoding' combo box.
This model is used in the CSVExportDialog class (and possibly others).
| Constructor Summary | |
EncodingComboBoxModel()
Creates a new model. |
|
| Method Summary | |
boolean |
addEncoding(java.lang.String name,
java.lang.String description)
Adds an encoding. |
void |
addEncodingUnchecked(java.lang.String name,
java.lang.String description)
Adds an encoding to the model without checking its validity. |
void |
addListDataListener(javax.swing.event.ListDataListener l)
Adds a listener to the list that's notified each time a change to the data model occurs. |
static EncodingComboBoxModel |
createDefaultModel()
Creates a default model containing a selection of encodings. |
void |
ensureEncodingAvailable(java.lang.String encoding)
Make sure, that this encoding is defined and selectable in the combobox model. |
protected void |
fireContentsChanged()
Notifies all registered listeners that the content of the model has changed. |
java.lang.String |
getDescription(int index)
Returns a description. |
java.lang.Object |
getElementAt(int index)
Returns the value at the specified index. |
java.lang.String |
getEncoding(int index)
Returns an encoding. |
java.lang.String |
getSelectedEncoding()
Returns the selected encoding. |
int |
getSelectedIndex()
Returns the selected index. |
java.lang.Object |
getSelectedItem()
Returns the selected item. |
int |
getSize()
Returns the length of the list. |
int |
indexOf(java.lang.String encoding)
Returns the index of an encoding. |
void |
removeListDataListener(javax.swing.event.ListDataListener l)
Removes a listener from the list that's notified each time a change to the data model occurs. |
void |
setSelectedItem(java.lang.Object anItem)
Set the selected item. |
void |
sort()
Sorts the encodings. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public EncodingComboBoxModel()
| Method Detail |
public boolean addEncoding(java.lang.String name,
java.lang.String description)
name - the name.description - the description.
true if the encoding is valid and added to the model, false
otherwise.
public void addEncodingUnchecked(java.lang.String name,
java.lang.String description)
name - the name.description - the description.public void ensureEncodingAvailable(java.lang.String encoding)
encoding - the encoding that should be verified.public void sort()
protected void fireContentsChanged()
public void setSelectedItem(java.lang.Object anItem)
ListDataListeners that the contents
have changed.
setSelectedItem in interface javax.swing.ComboBoxModelanItem - the list object to select or null
to clear the selectionpublic int getSelectedIndex()
public java.lang.String getSelectedEncoding()
public java.lang.Object getSelectedItem()
getSelectedItem in interface javax.swing.ComboBoxModelnull if there is no selectionpublic int getSize()
getSize in interface javax.swing.ListModelpublic java.lang.Object getElementAt(int index)
getElementAt in interface javax.swing.ListModelindex - the requested index
indexpublic void addListDataListener(javax.swing.event.ListDataListener l)
addListDataListener in interface javax.swing.ListModell - the ListDataListener to be addedpublic void removeListDataListener(javax.swing.event.ListDataListener l)
removeListDataListener in interface javax.swing.ListModell - the ListDataListener to be removedpublic static EncodingComboBoxModel createDefaultModel()
public int indexOf(java.lang.String encoding)
encoding - the encoding (name).
public java.lang.String getEncoding(int index)
index - the index.
public java.lang.String getDescription(int index)
index - the index.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||