Base class for any single object that want to be added in multiples and then selected.
More...
|
| BaseBoxChooser () |
| Initializes the control.
|
|
void | addSelectionListener (Consumer< TO > event) |
| Adds a selection listener to the base component so when someone does selection this event is called.
|
|
void | add (String name, TO object) |
| Adds the given object with given name.
|
|
void | add (StringAndObject< TO > so) |
| Adds the StringAndObject to the system and creates components necessary.
|
|
ObservableList
< StringAndObject< TO > > | getItems () |
| Returns the inner ObservableList.
|
|
void | UpdateComponents (ObservableList< StringAndObject< TO >> list) |
| Updates the components to match given list.
|
|
void | add (TO 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.
|
|
TO | getSelectedObject () |
| Palauttaa valitun olion tai null.
|
|
String | getSelectedText () |
| Returns the first selected text component.
|
|
int | getSelectedIndex () |
| Returns the first selected index.
|
|
int | setSelectedIndex (int index) |
|
List< TO > | getSelectedObjects () |
|
List< String > | getSelectedTexts () |
|
List< Integer > | getSelectedIndices () |
|
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 | removeMnemonic (String item) |
| Poistetaan alleviiva.
|
|
|
abstract void | addChangeListener (TC box, ChangeListener< Boolean > listener) |
| Adds to the component a listener when its state is changed.
|
|
abstract TC | addCorrectComponent (String name, TO object) |
| Will give the created new component to this class so no reflection is needed.
|
|
abstract void | removeListener (TC node, ArrayList< ChangeListener< Boolean >> list) |
| Removes all the listeners from the node from the property they may be linked to.
|
|
abstract boolean | isComponentSelected (TC component) |
| Returns if the component should be selected by the baseboxchooser for getItems.
|
|
abstract boolean | setComponentSelected (TC component, boolean value) |
| Sets component selected.
|
|
|
StringProperty | rivit = new SimpleStringProperty("\n") |
| StringProperty for asking the example data from the scenebuilder.
|
|
BooleanProperty | nollataanko = new SimpleBooleanProperty(false) |
| Should the components example data be reset at start.
|
|
ArrayList< TC > | boxes = new ArrayList<TC>() |
| All of the components that were created.
|
|
ObservableList
< StringAndObject< TO > > | items = FXCollections.observableArrayList() |
| The stored items inside this system.
|
|
ArrayList< Consumer< TO > > | lambdaListeners = new ArrayList<Consumer<TO>>() |
| Listeners for everyone who registered to any kind of changes for this object.
|
|
ArrayList< ChangeListener
< Boolean > > | changeListenersForRemoval = new ArrayList<>() |
| Stored listeners for easy removal.
|
|
|
void | selectedChanged () |
| This calls the listeners in the class! Probably not useful elsewhere We scope this into the class for easier access to the baseClass instead of every this pointing to the ChangeListener-anonymous class The visibility of this should be package.
|
|
Base class for any single object that want to be added in multiples and then selected.
- Author
- terop
- Version
- 13.1.2017
- Parameters
-
<TO> | Type of objects to be stored. |
<TC> | Type of components to be used |
Definition at line 27 of file BaseBoxChooser.java.
fi.jyu.mit.fxgui.BaseBoxChooser< TO, TC extends Node >.BaseBoxChooser |
( |
| ) |
|
|
inline |
void fi.jyu.mit.fxgui.BaseBoxChooser< TO, TC extends Node >.add |
( |
String |
name, |
|
|
TO |
object |
|
) |
| |
|
inline |
Adds the given object with given name.
- Parameters
-
name | objektin kohdalla näkyvä teksti |
object | tallennettava olio |
Definition at line 107 of file BaseBoxChooser.java.
void fi.jyu.mit.fxgui.BaseBoxChooser< TO, TC extends Node >.add |
( |
StringAndObject< TO > |
so | ) |
|
|
inline |
Adds the StringAndObject to the system and creates components necessary.
- Parameters
-
Definition at line 116 of file BaseBoxChooser.java.
void fi.jyu.mit.fxgui.BaseBoxChooser< TO, TC extends Node >.add |
( |
TO |
object | ) |
|
|
inline |
abstract void fi.jyu.mit.fxgui.BaseBoxChooser< TO, TC extends Node >.addChangeListener |
( |
TC |
box, |
|
|
ChangeListener< Boolean > |
listener |
|
) |
| |
|
protectedpure virtual |
Adds to the component a listener when its state is changed.
Base cannot know which property is to be cared about
- Parameters
-
box | componetn to use |
listener | function listen |
abstract TC fi.jyu.mit.fxgui.BaseBoxChooser< TO, TC extends Node >.addCorrectComponent |
( |
String |
name, |
|
|
TO |
object |
|
) |
| |
|
protectedpure virtual |
Will give the created new component to this class so no reflection is needed.
Since the class is abstract anyways
- Parameters
-
- Returns
- ??
void fi.jyu.mit.fxgui.BaseBoxChooser< TO, TC extends Node >.addExample |
( |
String |
text | ) |
|
|
inline |
Adds example text to the list.
- Parameters
-
text | teksti joka näytetään |
Definition at line 205 of file BaseBoxChooser.java.
void fi.jyu.mit.fxgui.BaseBoxChooser< TO, TC extends Node >.addSelectionListener |
( |
Consumer< TO > |
event | ) |
|
|
inline |
Adds a selection listener to the base component so when someone does selection this event is called.
- Parameters
-
event | what to do when event happens |
Definition at line 96 of file BaseBoxChooser.java.
void fi.jyu.mit.fxgui.BaseBoxChooser< TO, TC extends Node >.clear |
( |
| ) |
|
|
inline |
ObservableList<StringAndObject<TO> > fi.jyu.mit.fxgui.BaseBoxChooser< TO, TC extends Node >.getItems |
( |
| ) |
|
|
inline |
Returns the inner ObservableList.
Will break functionality. You have been warned
- Returns
- the inner observableList
Definition at line 173 of file BaseBoxChooser.java.
boolean fi.jyu.mit.fxgui.BaseBoxChooser< TO, TC extends Node >.getNollataanko |
( |
| ) |
|
|
inline |
Returns if the component was selected to be cleared.
- Returns
- should it be cleared
Definition at line 411 of file BaseBoxChooser.java.
String fi.jyu.mit.fxgui.BaseBoxChooser< TO, TC extends Node >.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 393 of file BaseBoxChooser.java.
int fi.jyu.mit.fxgui.BaseBoxChooser< TO, TC extends Node >.getSelectedIndex |
( |
| ) |
|
|
inline |
List<Integer> fi.jyu.mit.fxgui.BaseBoxChooser< TO, TC extends Node >.getSelectedIndices |
( |
| ) |
|
|
inline |
TO fi.jyu.mit.fxgui.BaseBoxChooser< TO, TC extends Node >.getSelectedObject |
( |
| ) |
|
|
inline |
Palauttaa valitun olion tai null.
- Returns
- valittu olio tai null
Definition at line 282 of file BaseBoxChooser.java.
List<TO> fi.jyu.mit.fxgui.BaseBoxChooser< TO, TC extends Node >.getSelectedObjects |
( |
| ) |
|
|
inline |
String fi.jyu.mit.fxgui.BaseBoxChooser< TO, TC extends Node >.getSelectedText |
( |
| ) |
|
|
inline |
List<String> fi.jyu.mit.fxgui.BaseBoxChooser< TO, TC extends Node >.getSelectedTexts |
( |
| ) |
|
|
inline |
abstract boolean fi.jyu.mit.fxgui.BaseBoxChooser< TO, TC extends Node >.isComponentSelected |
( |
TC |
component | ) |
|
|
protectedpure virtual |
Returns if the component should be selected by the baseboxchooser for getItems.
- Parameters
-
component | the generic component that we want to know if is selected |
- Returns
- if the component is selected or not
abstract void fi.jyu.mit.fxgui.BaseBoxChooser< TO, TC extends Node >.removeListener |
( |
TC |
node, |
|
|
ArrayList< ChangeListener< Boolean >> |
list |
|
) |
| |
|
protectedpure virtual |
Removes all the listeners from the node from the property they may be linked to.
- Parameters
-
String fi.jyu.mit.fxgui.BaseBoxChooser< TO, TC extends Node >.removeMnemonic |
( |
String |
item | ) |
|
|
inline |
Poistetaan alleviiva.
- Parameters
-
- Returns
- ilman 1. alleviivaa
Definition at line 422 of file BaseBoxChooser.java.
void fi.jyu.mit.fxgui.BaseBoxChooser< TO, TC extends Node >.selectedChanged |
( |
| ) |
|
|
inlinepackage |
This calls the listeners in the class! Probably not useful elsewhere We scope this into the class for easier access to the baseClass instead of every this pointing to the ChangeListener-anonymous class The visibility of this should be package.
NOT public or private. Java seems to do this by not having a keyword at all! We don't what this definitely as public but nor do we want to create synthetic accessor(which might be preferred over public still)
- Parameters
-
box | the box that was selected |
Definition at line 143 of file BaseBoxChooser.java.
abstract boolean fi.jyu.mit.fxgui.BaseBoxChooser< TO, TC extends Node >.setComponentSelected |
( |
TC |
component, |
|
|
boolean |
value |
|
) |
| |
|
protectedpure virtual |
Sets component selected.
- Parameters
-
component | the generic component that we want to know if is selected |
value | value to set for component |
- Returns
- if the component was selected or not
void fi.jyu.mit.fxgui.BaseBoxChooser< TO, TC extends Node >.setNollataanko |
( |
boolean |
reset | ) |
|
|
inline |
Sets the value if the component should be reset after the original example data.
- Parameters
-
Definition at line 402 of file BaseBoxChooser.java.
void fi.jyu.mit.fxgui.BaseBoxChooser< TO, TC extends Node >.setRivit |
( |
String |
jono | ) |
|
|
inline |
Sets the rows.
- Parameters
-
jono | A multiline string, each line representing a single row. |
Definition at line 254 of file BaseBoxChooser.java.
void fi.jyu.mit.fxgui.BaseBoxChooser< TO, TC extends Node >.setRivit |
( |
String[] |
rivit | ) |
|
|
inline |
Sets the rows.
- Parameters
-
rivit | A string arrays, each line representing a single row. |
Definition at line 268 of file BaseBoxChooser.java.
void fi.jyu.mit.fxgui.BaseBoxChooser< TO, TC extends Node >.setRows |
( |
String[] |
strings | ) |
|
|
inlineprivate |
int fi.jyu.mit.fxgui.BaseBoxChooser< TO, TC extends Node >.setSelectedIndex |
( |
int |
index | ) |
|
|
inline |
void fi.jyu.mit.fxgui.BaseBoxChooser< TO, TC extends Node >.UpdateComponents |
( |
ObservableList< StringAndObject< TO >> |
list | ) |
|
|
inline |
Updates the components to match given list.
- Parameters
-
list | the objects to make the gui look like |
Definition at line 182 of file BaseBoxChooser.java.
ArrayList<TC> fi.jyu.mit.fxgui.BaseBoxChooser< TO, TC extends Node >.boxes = new ArrayList<TC>() |
|
protected |
ArrayList<ChangeListener<Boolean> > fi.jyu.mit.fxgui.BaseBoxChooser< TO, TC extends Node >.changeListenersForRemoval = new ArrayList<>() |
|
protected |
ObservableList<StringAndObject<TO> > fi.jyu.mit.fxgui.BaseBoxChooser< TO, TC extends Node >.items = FXCollections.observableArrayList() |
|
protected |
ArrayList<Consumer<TO> > fi.jyu.mit.fxgui.BaseBoxChooser< TO, TC extends Node >.lambdaListeners = new ArrayList<Consumer<TO>>() |
|
protected |
Listeners for everyone who registered to any kind of changes for this object.
Definition at line 47 of file BaseBoxChooser.java.
BooleanProperty fi.jyu.mit.fxgui.BaseBoxChooser< TO, TC extends Node >.nollataanko = new SimpleBooleanProperty(false) |
|
protected |
StringProperty fi.jyu.mit.fxgui.BaseBoxChooser< TO, TC extends Node >.rivit = new SimpleStringProperty("\n") |
|
protected |
StringProperty for asking the example data from the scenebuilder.
Definition at line 31 of file BaseBoxChooser.java.
The documentation for this class was generated from the following file: