T
- mitä luokkaa tallennetaanpublic interface Chooser<T>
Modifier and Type | Method and Description |
---|---|
void |
add(String name,
T object)
Adds a single object to the system
|
void |
add(T object)
Adds only the object to the system
|
void |
addExample(String name)
Adds an example string to the gui without stored object
|
void |
addSelectionListener(Consumer<T> event)
Adds the selection change listener to the component
|
void |
clear()
Clears the components of objects
|
int |
getSelectedIndex()
Returns the first selected index
|
T |
getSelectedObject()
Returns the first seleceted object
|
String |
getSelectedText()
Returns the first selected objects gui text
|
String |
removeMnemonic(String item)
Poistetaan alleviiva
|
void |
setRivit(String jono)
Sets the rows.
|
void |
setRivit(String[] rivit)
Sets the rows.
|
int |
setSelectedIndex(int index)
Sets item in index selected
|
void add(String name, T object)
name
- name to be displayed in guiobject
- object to be storedvoid addSelectionListener(Consumer<T> event)
event
- to listen tovoid addExample(String name)
name
- string to be shown on guivoid clear()
T getSelectedObject()
String getSelectedText()
int getSelectedIndex()
int setSelectedIndex(int index)
index
- item to be selectedvoid setRivit(String jono)
jono
- A multiline string, each line representing a single row.void setRivit(String[] rivit)
rivit
- A string arrays, each line representing a single row.String removeMnemonic(String item)
item
- mistä poistetaan