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

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

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

Public Member Functions

 ComboBoxChooser ()
 Initializes the control.
 
void setRivit (String jono)
 Sets the rows.
 
void setRivit (String[] rivit)
 Sets the rows.
 
String getRivit ()
 
StringProperty getRivitProperty ()
 
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.
 
getSelectedObject ()
 Returns the first seleceted object.
 
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.
 
boolean getSelectFirst ()
 Returns the value of property getSelectFirst.
 
void setSelectFirst (boolean value)
 Sets the value of setFirst.
 
void addSelectionListener (Consumer< T > event)
 Adds the selection change listener to the component.
 
String removeMnemonic (String item)
 Poistetaan alleviiva.
 

Protected Attributes

BooleanProperty selectFirst = new SimpleBooleanProperty(true)
 Is the first to be selected on each run.
 

Private Member Functions

void setRows (String[] strings)
 

Private Attributes

StringProperty rivit = new SimpleStringProperty()
 

Detailed Description

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

Author
vesal modified by Tero Paavolainen
Version
13.1.2017
Parameters
<T>Mitä luokkaa tallennetaan

Definition at line 24 of file ComboBoxChooser.java.

Constructor & Destructor Documentation

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

Initializes the control.

Definition at line 34 of file ComboBoxChooser.java.

Member Function Documentation

void fi.jyu.mit.fxgui.ComboBoxChooser< 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 96 of file ComboBoxChooser.java.

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

Addes the given object to the list.

Parameters
objecttallennettava olio

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

Definition at line 106 of file ComboBoxChooser.java.

void fi.jyu.mit.fxgui.ComboBoxChooser< 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 116 of file ComboBoxChooser.java.

void fi.jyu.mit.fxgui.ComboBoxChooser< 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 178 of file ComboBoxChooser.java.

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

Clears the ObservableList that holds the objects.

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

Definition at line 125 of file ComboBoxChooser.java.

String fi.jyu.mit.fxgui.ComboBoxChooser< T >.getRivit ( )
inline
Returns
The contents of the Chooser as a multiline string.

Definition at line 77 of file ComboBoxChooser.java.

StringProperty fi.jyu.mit.fxgui.ComboBoxChooser< T >.getRivitProperty ( )
inline
Returns
The rows of the Chooser as a StringProperty.

Definition at line 85 of file ComboBoxChooser.java.

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

Returns the first selected index.

Returns
index

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

Definition at line 146 of file ComboBoxChooser.java.

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

Returns the first seleceted object.

Returns
selected object

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

Definition at line 131 of file ComboBoxChooser.java.

String fi.jyu.mit.fxgui.ComboBoxChooser< 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 139 of file ComboBoxChooser.java.

boolean fi.jyu.mit.fxgui.ComboBoxChooser< T >.getSelectFirst ( )
inline

Returns the value of property getSelectFirst.

Returns
if to be selected

Definition at line 163 of file ComboBoxChooser.java.

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

Poistetaan alleviiva.

Parameters
itemmistä poistetaan
Returns
ilman 1. alleviivaa

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

Definition at line 199 of file ComboBoxChooser.java.

void fi.jyu.mit.fxgui.ComboBoxChooser< 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 57 of file ComboBoxChooser.java.

void fi.jyu.mit.fxgui.ComboBoxChooser< 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 65 of file ComboBoxChooser.java.

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

Definition at line 41 of file ComboBoxChooser.java.

int fi.jyu.mit.fxgui.ComboBoxChooser< 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 152 of file ComboBoxChooser.java.

void fi.jyu.mit.fxgui.ComboBoxChooser< T >.setSelectFirst ( boolean  value)
inline

Sets the value of setFirst.

Parameters
valuenew value

Definition at line 172 of file ComboBoxChooser.java.

Member Data Documentation

StringProperty fi.jyu.mit.fxgui.ComboBoxChooser< T >.rivit = new SimpleStringProperty()
private

Definition at line 25 of file ComboBoxChooser.java.

BooleanProperty fi.jyu.mit.fxgui.ComboBoxChooser< T >.selectFirst = new SimpleBooleanProperty(true)
protected

Is the first to be selected on each run.

Definition at line 29 of file ComboBoxChooser.java.


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