All Classes Namespaces Files Functions Variables
fi.jyu.mit.fxgui.ListChooser< T > Class Reference

A custom ListView control that supports easy addition of items in Scene Builder. More...

Inheritance diagram for fi.jyu.mit.fxgui.ListChooser< T >:
fi.jyu.mit.fxgui.Chooser< T >

Public Member Functions

 ListChooser ()
 Initializes the control.
 
void add (String name, T object)
 Adds the given object with given name.
 
void add (T object)
 Addes the given object to the list.
 
void addExample (String text)
 Adds example text to the list.
 
void clear ()
 Clears the ObservableList that holds the objects.
 
void setRivit (String jono)
 Sets the rows.
 
void setRivit (String[] rivit)
 Sets the rows.
 
getSelectedObject ()
 Palauttaa valitun olion tai null.
 
String getRivit ()
 Returns the contents of the ListChooser as a multiline string.
 
void setNollataanko (boolean reset)
 Sets the value if the component should be reset after the original example data.
 
boolean getNollataanko ()
 Returns if the component was selected to be cleared.
 
String getSelectedText ()
 Returns the first selected objects gui text.
 
int getSelectedIndex ()
 Returns the first selected index.
 
int setSelectedIndex (int index)
 Sets item in index selected.
 
void addSelectionListener (Consumer< T > event)
 Adds the selection change listener to the component.
 
String removeMnemonic (String item)
 Poistetaan alleviiva.
 

Private Member Functions

void setRows (String[] strings)
 

Private Attributes

StringProperty rivit = new SimpleStringProperty("\n")
 
BooleanProperty nollataanko = new SimpleBooleanProperty(false)
 

Detailed Description

A custom ListView control that supports easy addition of items in Scene Builder.

Author
Tero Paavolainen extended from ListChooser
Version
13.1.2017
Parameters
<T>mitä luokkaa tallennetaan

Definition at line 23 of file ListChooser.java.

Constructor & Destructor Documentation

fi.jyu.mit.fxgui.ListChooser< T >.ListChooser ( )
inline

Initializes the control.

Definition at line 32 of file ListChooser.java.

Member Function Documentation

void fi.jyu.mit.fxgui.ListChooser< T >.add ( String  name,
object 
)
inline

Adds the given object with given name.

Parameters
nameobjektin kohdalla näkyvä teksti
objecttallennettava olio

Implements fi.jyu.mit.fxgui.Chooser< T >.

Definition at line 44 of file ListChooser.java.

void fi.jyu.mit.fxgui.ListChooser< T >.add ( object)
inline

Addes the given object to the list.

Parameters
objecttallennettava olio

Implements fi.jyu.mit.fxgui.Chooser< T >.

Definition at line 54 of file ListChooser.java.

void fi.jyu.mit.fxgui.ListChooser< T >.addExample ( String  text)
inline

Adds example text to the list.

Parameters
textteksti joka näytetään

Implements fi.jyu.mit.fxgui.Chooser< T >.

Definition at line 64 of file ListChooser.java.

void fi.jyu.mit.fxgui.ListChooser< T >.addSelectionListener ( Consumer< T >  event)
inline

Adds the selection change listener to the component.

Parameters
eventto listen to

Implements fi.jyu.mit.fxgui.Chooser< T >.

Definition at line 174 of file ListChooser.java.

void fi.jyu.mit.fxgui.ListChooser< T >.clear ( )
inline

Clears the ObservableList that holds the objects.

Implements fi.jyu.mit.fxgui.Chooser< T >.

Definition at line 73 of file ListChooser.java.

boolean fi.jyu.mit.fxgui.ListChooser< T >.getNollataanko ( )
inline

Returns if the component was selected to be cleared.

Returns
should it be cleared

Definition at line 147 of file ListChooser.java.

String fi.jyu.mit.fxgui.ListChooser< T >.getRivit ( )
inline

Returns the contents of the ListChooser as a multiline string.

Returns
The contents of the ListChooser as a multiline string.

Definition at line 129 of file ListChooser.java.

int fi.jyu.mit.fxgui.ListChooser< T >.getSelectedIndex ( )
inline

Returns the first selected index.

Returns
index

Implements fi.jyu.mit.fxgui.Chooser< T >.

Definition at line 160 of file ListChooser.java.

T fi.jyu.mit.fxgui.ListChooser< T >.getSelectedObject ( )
inline

Palauttaa valitun olion tai null.

Returns
valittu olio tai null

Implements fi.jyu.mit.fxgui.Chooser< T >.

Definition at line 117 of file ListChooser.java.

String fi.jyu.mit.fxgui.ListChooser< T >.getSelectedText ( )
inline

Returns the first selected objects gui text.

Returns
text shown on gui

Implements fi.jyu.mit.fxgui.Chooser< T >.

Definition at line 153 of file ListChooser.java.

String fi.jyu.mit.fxgui.ListChooser< T >.removeMnemonic ( String  item)
inline

Poistetaan alleviiva.

Parameters
itemmistä poistetaan
Returns
ilman 1. alleviivaa

Implements fi.jyu.mit.fxgui.Chooser< T >.

Definition at line 192 of file ListChooser.java.

void fi.jyu.mit.fxgui.ListChooser< T >.setNollataanko ( boolean  reset)
inline

Sets the value if the component should be reset after the original example data.

Parameters
resetshould it be reset

Definition at line 138 of file ListChooser.java.

void fi.jyu.mit.fxgui.ListChooser< T >.setRivit ( String  jono)
inline

Sets the rows.

Parameters
jonoA multiline string, each line representing a single row.

Implements fi.jyu.mit.fxgui.Chooser< T >.

Definition at line 95 of file ListChooser.java.

void fi.jyu.mit.fxgui.ListChooser< T >.setRivit ( String[]  rivit)
inline

Sets the rows.

Parameters
rivitA string arrays, each line representing a single row.

Implements fi.jyu.mit.fxgui.Chooser< T >.

Definition at line 104 of file ListChooser.java.

void fi.jyu.mit.fxgui.ListChooser< T >.setRows ( String[]  strings)
inlineprivate

Definition at line 78 of file ListChooser.java.

int fi.jyu.mit.fxgui.ListChooser< T >.setSelectedIndex ( int  index)
inline

Sets item in index selected.

Parameters
indexitem to be selected
Returns
old selected index

Implements fi.jyu.mit.fxgui.Chooser< T >.

Definition at line 166 of file ListChooser.java.

Member Data Documentation

BooleanProperty fi.jyu.mit.fxgui.ListChooser< T >.nollataanko = new SimpleBooleanProperty(false)
private

Definition at line 26 of file ListChooser.java.

StringProperty fi.jyu.mit.fxgui.ListChooser< T >.rivit = new SimpleStringProperty("\n")
private

Definition at line 25 of file ListChooser.java.


The documentation for this class was generated from the following file: