|
Mp3dings 20100427 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.mospace.swing.text.HistoryTextField
public class HistoryTextField
A text field that remembers the last values entered. The GUI representation
is actually a JComboBox that can be retrieved with the getJComboBox method.
| Constructor Summary | |
|---|---|
HistoryTextField(Preferences prefNode,
int id)
Constructs a HistoryTextField with the specified id and initializes it with all previously saved values. |
|
HistoryTextField(Preferences prefNode,
int id,
int len)
Constructs a HistoryTextField with the specified id and initializes it with at most len
previously saved values. |
|
| Method Summary | |
|---|---|
void |
addCurrentItem()
Adds the item that is currently edited to this text field's history. |
void |
addToHistory(String str)
Adds a new string to this text field's history. |
void |
clearHistory()
Clears this text field's history. |
JComboBox |
getComboBox()
Gets the single JComboBox object that serves as a GUI representation of this history text field. |
String[] |
getStringArray()
Returns the items in this text field's history as a newly allocated String array. |
boolean |
isAutoSave()
Returns whether items newly added to this text field's combo box will automatically be added to the history and saved under the preference node and id that this text field has been loaded from. |
void |
save(Preferences prefNode,
int id)
Saves this text fields history to the specified preference node and id. |
void |
setAutoSave(boolean b)
Sets whether items newly added to this text field's combo box will automatically be added to the history and saved under the preference node and id that this text field has been loaded from. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HistoryTextField(Preferences prefNode,
int id,
int len)
len
previously saved values.
prefNode - the preference node that values will be loaded fromid - an integer identifying the history text field whose values
to loadlen - the maximum number of values to load from the preferences,
if it is {0 | negative} then {all | no} saved values will be loaded
public HistoryTextField(Preferences prefNode,
int id)
prefNode - the preference node that values will be loaded fromid - an integer identifying this history text field whose values
to load| Method Detail |
|---|
public void save(Preferences prefNode,
int id)
prefNode - the preference node that values will be written toid - an integer identifying this history text fieldpublic void addToHistory(String str)
str - the string to addpublic void addCurrentItem()
public void clearHistory()
public JComboBox getComboBox()
setAutoSave(boolean)public void setAutoSave(boolean b)
b - whether new items should be saved automaticallyisAutoSave()public boolean isAutoSave()
setAutoSave(boolean)public String[] getStringArray()
|
Mp3dings 20100427 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||