B4J Programming Press on the image to return to the main documentation page.

jFXtrasControls

Written by Andrew Graham

This library contains additional controls from JFXtras Labs.
JFXtraBreadcrumbBar, JFXtraBreadcrumbItem, JFXtraNumberUpDown, JFXtraDatePicker, JFXtraTimePicker and JFXtraListSpinner.
This library uses the jfxtras-labs-2.2-r5.jar library from
JFXtras Labs.
This is the direct link to jfxtras-labs-2.2-r5.jar

To integrate these controls with SceneBuilder you need to manually add this line to your fxml layout file
after the existing set of imports at the start of the file. Note that in the following lines I've used [ and ]
instead of greater and less than characters to ensure the lines are not treated as mark-up in the help.

[?import jfxtras.labs.scene.control.*?]

Then in SceneBuilder add a simple control, TextArea is a good one, and name with a Node Id for B4J.
Position and size the controls and do the same for any other controls you want then close SceneBuilder.
Manually edit the fxml again by finding the TextArea lines

[TextArea id="Battery1" layoutX="49.0" layoutY="173.0" prefHeight="106.0" prefWidth="105.0" wrapText="true" /]
and change 'TextArea' to the required type and remove 'wrapText'
[XYControl id="XYControl1" layoutX="49.0" layoutY="173.0" prefHeight="106.0" prefWidth="105.0" /]
SceneBuilder type names are specified in the xml help for each control

When you next start SceneBuilder it will want a path to the unknown controls. Check "Set up classpath",
click the "+ Jar..." button and locate jfxtras-labs-2.2-r5.jar. Click "Apply" and "Close". You will have to do this
each time you restart SceneBuilder, although the path will be already selected, but for some reason SceneBuilder
will not automatically use it.

The controls should now be visible in SceneBuilder and also visible to "Generate Members" in B4J.

JFXtras and JFXtras Labs are licensed under the New BSD License.
Copyright (c) 2013, JFXtras
All rights reserved.

This library is therefore also licensed under the New BSD License.

List of types:

JFXtrasBreadcrumbBar
JFXtrasBreadcrumbItem
JFXtrasDatePicker
JFXtrasDateTextField
JFXtrasListSpinner
JFXtrasNumberUpDown
JFXtrasTimePicker
JFXtrasTimeTextField
JFXtrasXYControl

JFXtrasBreadcrumbBar

This object implements a BreadcrumbBar that contains BreadcrumbItems and an optional Home item.
BreadcrumbItems are displayed horizontally in the order in which they are added. Clicking any BreadcrumbItem
removes both it and any items added after it with exception that the Home item is never removed if clicked.

The ItemAction event is raised when an item in the BreadcrumbBar is clicked.

The SceneBuilder name for this control is 'BreadcrumbBar'

Events:

ItemAction 'A BreadcrumbItem has been clicked'

Members:


  AddHome

  AddItem (text As String, icon As javafx.scene.image.Image) As JFXtrasBreadcrumbItem

  ContextMenu As ContextMenuWrapper

  Enabled As Boolean

  Height As Double [read only]

  Id As String

  Initialize (arg1 As String)

  IsInitialized As Boolean

  Items As List [read only]

  Left As Double

  MouseCursor As javafx.scene.Cursor

  PrefHeight As Double

  PrefWidth As Double

  RemoveItem (item As jfxtras.labs.scene.control.BreadcrumbItem)

  RemoveItemAt (index As Int)

  RemoveNodeFromParent

  RequestFocus

  Snapshot As ImageWrapper

  Style As String

  StyleClasses As List [read only]

  Tag As Object

  TooltipText As String

  Top As Double

  Version As Double [read only]

  Visible As Boolean

  Width As Double [read only]

Members description:

AddHome
Add a Home BreadcrumbItem to the left end of the BreadcrumbBar.
AddItem (text As String, icon As javafx.scene.image.Image) As JFXtrasBreadcrumbItem
Adds a new BreadcrumbItem to the end of the BreadcrumbBar and returns the new item.
ContextMenu As ContextMenuWrapper
Enabled As Boolean
Height As Double [read only]
Id As String
Initialize (arg1 As String)
IsInitialized As Boolean
Items As List [read only]
Returns a List containing all the BreadcrumbItems in the BreadcrumbBar.
Left As Double
MouseCursor As javafx.scene.Cursor
PrefHeight As Double
PrefWidth As Double
RemoveItem (item As jfxtras.labs.scene.control.BreadcrumbItem)
Removes the BreadcrumbItem from the list of added items in the BreadcrumBar.
RemoveItemAt (index As Int)
Removes the BreadcrumbItem at index from the list of added items in the BreadcrumBar.
RemoveNodeFromParent
RequestFocus
Snapshot As ImageWrapper
Style As String
StyleClasses As List [read only]
Tag As Object
TooltipText As String
Top As Double
Version As Double [read only]
Returns the version number of the library.
Visible As Boolean
Width As Double [read only]

JFXtrasBreadcrumbItem

This BreadcrumbItem object can be added to a BreadcrumbBar. The only way of obtaining a BreadcrumbItem
is from the return of BreadcrumbBar.AddItem. A BreadcrumbItem can display text, an image or both.

The SceneBuilder name for this control is 'BreadcrumbItem'

Events:

None

Members:


  ContextMenu As ContextMenuWrapper

  Enabled As Boolean

  Height As Double [read only]

  Icon As javafx.scene.image.Image [read only]

  Id As String

  Initialize (item As jfxtras.labs.scene.control.BreadcrumbItem)

  IsFirst As Boolean [read only]

  IsInitialized As Boolean

  Left As Double

  MouseCursor As javafx.scene.Cursor

  PrefHeight As Double

  PrefWidth As Double

  RemoveNodeFromParent

  RequestFocus

  Snapshot As ImageWrapper

  Style As String

  StyleClasses As List [read only]

  Tag As Object

  Text As String [read only]

  TooltipText As String

  Top As Double

  Version As Double [read only]

  Visible As Boolean

  Width As Double [read only]

Members description:

ContextMenu As ContextMenuWrapper
Enabled As Boolean
Height As Double [read only]
Icon As javafx.scene.image.Image [read only]
Gets the icon of this BreadcrumbItem.
Id As String
Initialize (item As jfxtras.labs.scene.control.BreadcrumbItem)
Initialize the BreadcrumbItem with the return value of BreadcrumbBar.AddItem.
IsFirst As Boolean [read only]
Returns True if this BreadcrumbItem is the first item in the bar it belongs to, False otherwise.
IsInitialized As Boolean
Left As Double
MouseCursor As javafx.scene.Cursor
PrefHeight As Double
PrefWidth As Double
RemoveNodeFromParent
RequestFocus
Snapshot As ImageWrapper
Style As String
StyleClasses As List [read only]
Tag As Object
Text As String [read only]
Gets the text of this BreadcrumbItem.
TooltipText As String
Top As Double
Version As Double [read only]
Returns the version number of the library.
Visible As Boolean
Width As Double [read only]

JFXtrasDatePicker

This DatePicker allows dates and times to be selected. It does not provide any events so some other
mechanism will be needed for the user to indicate that the required selection has been made, most likely a custom modal dialog.

The SceneBuilder name for this control is 'CalendarPicker'

Events:

None

Members:


  ContextMenu As ContextMenuWrapper

  DateTime As Long

  Enabled As Boolean

  Height As Double [read only]

  Id As String

  Initialize (arg1 As String)

  IsInitialized As Boolean

  Left As Double

  Mode As String

  MouseCursor As javafx.scene.Cursor

  PrefHeight As Double

  PrefWidth As Double

  RemoveNodeFromParent

  RequestFocus

  ShowTime As Boolean

  Snapshot As ImageWrapper

  Style As String

  StyleClasses As List [read only]

  Tag As Object

  TimeZone As Int [write only]

  TooltipText As String

  Top As Double

  Version As Double [read only]

  Visible As Boolean

  Width As Double [read only]

Members description:

ContextMenu As ContextMenuWrapper
DateTime As Long
Gets or sets the date and time of the DatePicker as value in ticks.
Enabled As Boolean
Height As Double [read only]
Id As String
Initialize (arg1 As String)
IsInitialized As Boolean
Left As Double
Mode As String
Gets or sets the mode of the DatePicker. Valid values are
"SINGLE" - allows only a single date to be selected by clicking on it
"RANGE" - allows a single range of dates to be selected bu Shift-Click on the second date
"MULTIPLE" - allows multiple dates and date ranges to be selected.

Note that deselecting a date in MULTIPLE mode seems a little buggy, needing two clicks at times.
MouseCursor As javafx.scene.Cursor
PrefHeight As Double
PrefWidth As Double
RemoveNodeFromParent
RequestFocus
ShowTime As Boolean
Gets or sets the ShowTime property of the DatePicker.
This is only valid in SINGLE mode as this is the only mode where the time selector can be used.
Snapshot As ImageWrapper
Style As String
StyleClasses As List [read only]
Tag As Object
TimeZone As Int [write only]
Sets the time zone offset of the DatePicker.
This is only valid in SINGLE mode as this is the only mode where the time selector can be used.
TooltipText As String
Top As Double
Version As Double [read only]
Returns the version number of the library.
Visible As Boolean
Width As Double [read only]

JFXtrasDateTextField

This DateTextField allows dates and times to be selected and returned as a formatted text value.
If the user hovers over the field a tooltip will pop up detailing how to enter values in the control.
It does not provide any events so some other mechanism will be needed for the user to indicate that
the required selection has been made, most likely a custom modal dialog.

The SceneBuilder name for this control is 'CalendarTextField'

Events:

None

Members:


  ContextMenu As ContextMenuWrapper

  DateFormat As String [write only]

  DateTime As Long

  Enabled As Boolean

  Height As Double [read only]

  Id As String

  Initialize (arg1 As String)

  IsInitialized As Boolean

  Left As Double

  MouseCursor As javafx.scene.Cursor

  PrefHeight As Double

  PrefWidth As Double

  RemoveNodeFromParent

  RequestFocus

  Snapshot As ImageWrapper

  Style As String

  StyleClasses As List [read only]

  Tag As Object

  TimeZone As Int [write only]

  TooltipText As String

  Top As Double

  Version As Double [read only]

  Visible As Boolean

  Width As Double [read only]

Members description:

ContextMenu As ContextMenuWrapper
DateFormat As String [write only]
Gets or sets the format used to parse date strings.
See this page for the supported patterns:
formats:.
The default pattern is MM/dd/yyyy (04/23/2002 for example).
DateTime As Long
Gets or sets the date and time of the DateTextField as value in ticks.
Enabled As Boolean
Height As Double [read only]
Id As String
Initialize (arg1 As String)
IsInitialized As Boolean
Left As Double
MouseCursor As javafx.scene.Cursor
PrefHeight As Double
PrefWidth As Double
RemoveNodeFromParent
RequestFocus
Snapshot As ImageWrapper
Style As String
StyleClasses As List [read only]
Tag As Object
TimeZone As Int [write only]
Sets the time zone offset of the DateTextField.
TooltipText As String
Top As Double
Version As Double [read only]
Returns the version number of the library.
Visible As Boolean
Width As Double [read only]

JFXtrasListSpinner

This ListSpinner control allows the user to select from a List of strings.
The List may be maintained by adding to and removing from the default List of the ListSpinner.
ListSpinner implements most of the methods of a B4J List to enable this to done in a familiar way.
Otherwise a ready built B4J List that must contain only Strings may be assigned to the controls Items property.

The ListSpinner may be editable or read-only. If editable then when the user enters a new string
the AddCallback event is raised passing the new string as a parameter. The AddCallBack event Sub should
return an int value that is the index of the item to be displayed to the user.

The Cycle event is raised when the control wraps round in either direction.

The SceneBuilder name for this control is 'ListSpinner'

Events:

Cycle 'The Cylic property is True and the user has cycled from one end of the list to the other
AddCallBack As String) 'The ListSpinner is Editable and the user has entered a new item into the ListSpinner

Members:


  Add (item As String)

  AddAll (List As List)

  AddAllAt (index As Int, List As List)

  ArrowsPosition As String

  ArrowsVertical As Boolean

  Clear

  ContextMenu As ContextMenuWrapper

  Cyclic As Boolean

  Editable As Boolean

  Enabled As Boolean

  Get (index As Int) As String

  Height As Double [read only]

  Id As String

  Index As Int

  IndexOf (item As String) As Int

  Initialize (arg1 As String)

  InsertAt (index As Int, item As String)

  IsInitialized As Boolean

  Items As List

  Left As Double

  MouseCursor As javafx.scene.Cursor

  PrefHeight As Double

  PrefWidth As Double

  RemoveAt (index As Int)

  RemoveNodeFromParent

  RequestFocus

  Set (index As Int, item As String)

  Size As Int [read only]

  Snapshot As ImageWrapper

  Sort (ascending As Boolean)

  SortCaseInsensitive (Ascending As Boolean)

  Style As String

  StyleClasses As List [read only]

  Tag As Object

  TooltipText As String

  Top As Double

  Value As String

  Version As Double [read only]

  Visible As Boolean

  Width As Double [read only]

Members description:

Add (item As String)
Adds an item at the end of the list.
AddAll (List As List)
Adds all elements in the specified collection to the end of the list.
AddAllAt (index As Int, List As List)
Adds all elements in the specified collection starting at the specified index.
ArrowsPosition As String
Gets or sets the position of the arrows. Valid values are
"LEADING" - positions both arrows to the left of the ListSpinner.
"SPLIT" - positions the above/below or left.right according to the value of VerticalArrows.
"TRAILING" - positions both arrows to the right of the ListSpinner.
ArrowsVertical As Boolean
Gets or sets whether the ListSpinner arrows are vertically oriented..
Clear
Removes all the items from the list.
ContextMenu As ContextMenuWrapper
Cyclic As Boolean
Gets or sets whether the ListSpinner cycles to the beginning when the user gets to the last item.
Editable As Boolean
Gets or sets whether the user can enter new items.
Enabled As Boolean
Get (index As Int) As String
Gets the item in the specified index. The item is not removed from the list.
Height As Double [read only]
Id As String
Index As Int
Gets or sets the index in the List of the item that is to be displayed to the user.
IndexOf (item As String) As Int
Returns the index of the specified item, or -1 if it was not found.
Initialize (arg1 As String)
InsertAt (index As Int, item As String)
Inserts the specified Item in the specified index.
As a result all items with index larger than the specified index are moved.
IsInitialized As Boolean
Items As List
Gets or sets a List containing the strings the user can select.
Left As Double
MouseCursor As javafx.scene.Cursor
PrefHeight As Double
PrefWidth As Double
RemoveAt (index As Int)
Removes the item at the specified index.
RemoveNodeFromParent
RequestFocus
Set (index As Int, item As String)
Replaces the current item in the specified index with the new item.
Size As Int [read only]
Returns the number of items in the list.
Snapshot As ImageWrapper
Sort (ascending As Boolean)
Sorts the list.
SortCaseInsensitive (Ascending As Boolean)
Sorts the list ignoring the characters case.
Style As String
StyleClasses As List [read only]
Tag As Object
TooltipText As String
Top As Double
Value As String
Gets or sets the value of the item that is currently being displayed to the user.
Version As Double [read only]
Returns the version number of the library.
Visible As Boolean
Width As Double [read only]

JFXtrasNumberUpDown

This NumberUpDown control allows the user to specify a number. A number may be entered by the user
and accepted by pressing the Enter key. The number may be spun up and down by the arrows using a
step value set by the application program. Numbers are not restricted to integers, the underlying
type of the number is a Bigdecimal. The NumberUpDown can format the number using a specified pattern.
It does not provide any events so some other mechanism will be needed for the user to indicate that
the required selection has been made.

The SceneBuilder name for this control is 'BigDecimalField'

Events:

None

Members:


  ContextMenu As ContextMenuWrapper

  Decrement

  Enabled As Boolean

  Format As String

  Height As Double [read only]

  Id As String

  Increment

  Initialize (arg1 As String)

  IsInitialized As Boolean

  Left As Double

  MaxValue As Double

  MinValue As Double

  MouseCursor As javafx.scene.Cursor

  Number As Double

  PrefHeight As Double

  PrefWidth As Double

  RemoveNodeFromParent

  RequestFocus

  Snapshot As ImageWrapper

  Style As String

  StyleClasses As List [read only]

  Tag As Object

  TooltipText As String

  Top As Double

  Version As Double [read only]

  Visible As Boolean

  Width As Double [read only]

Members description:

ContextMenu As ContextMenuWrapper
Decrement
Enabled As Boolean
Format As String
Gets or sets the Format property of the NumberUpDown with the specified pattern.
Refer to the documentation for java.text.DecimalFormat for a description of patterns.
Height As Double [read only]
Id As String
Increment
Initialize (arg1 As String)
IsInitialized As Boolean
Left As Double
MaxValue As Double
Gets or sets the MaxValue property of the NumberUpDown
MinValue As Double
Gets or sets the MinValue property of the NumberUpDown
MouseCursor As javafx.scene.Cursor
Number As Double
Gets or sets the Number property of the NumberUpDown
PrefHeight As Double
PrefWidth As Double
RemoveNodeFromParent
RequestFocus
Snapshot As ImageWrapper
Style As String
StyleClasses As List [read only]
Tag As Object
TooltipText As String
Top As Double
Version As Double [read only]
Returns the version number of the library.
Visible As Boolean
Width As Double [read only]

JFXtrasTimePicker

This TimePicker allows a time to be selected. It does not provide any events so some other
mechanism will be needed for the user to indicate that the required selection has been made, most likely a custom modal dialog.

The SceneBuilder name for this control is 'CalendarTimePicker'

Events:

None

Members:


  ContextMenu As ContextMenuWrapper

  Enabled As Boolean

  Height As Double [read only]

  Id As String

  Initialize (arg1 As String)

  IsInitialized As Boolean

  Left As Double

  MinuteStep As Int

  MouseCursor As javafx.scene.Cursor

  PrefHeight As Double

  PrefWidth As Double

  RemoveNodeFromParent

  RequestFocus

  SetTimeZone (offsethours As Int)

  ShowLabels As Boolean

  Snapshot As ImageWrapper

  Style As String

  StyleClasses As List [read only]

  Tag As Object

  Time As Long

  TooltipText As String

  Top As Double

  Version As Double [read only]

  Visible As Boolean

  Width As Double [read only]

Members description:

ContextMenu As ContextMenuWrapper
Enabled As Boolean
Height As Double [read only]
Id As String
Initialize (arg1 As String)
IsInitialized As Boolean
Left As Double
MinuteStep As Int
Gets or sets the minute step property of the TimePicker.
MouseCursor As javafx.scene.Cursor
PrefHeight As Double
PrefWidth As Double
RemoveNodeFromParent
RequestFocus
SetTimeZone (offsethours As Int)
Sets the time zone offset of the TimePicker.
ShowLabels As Boolean
Gets or sets the ShowLabels property of the TimePicker.
Snapshot As ImageWrapper
Style As String
StyleClasses As List [read only]
Tag As Object
Time As Long
Gets or sets the time of the TimePicker as a ticks value
TooltipText As String
Top As Double
Version As Double [read only]
Returns the version number of the library.
Visible As Boolean
Width As Double [read only]

JFXtrasTimeTextField

This TimeTextField allows times to be selected and returned as a formatted text value.
If the user hovers over the field a tooltip will pop up detailing how to enter values in the control.
It does not provide any events so some other mechanism will be needed for the user to indicate that
the required selection has been made, most likely a custom modal dialog.

The SceneBuilder name for this control is 'CalendarTimeTextField'

Events:

None

Members:


  ContextMenu As ContextMenuWrapper

  DateTime As Long

  Enabled As Boolean

  Height As Double [read only]

  Id As String

  Initialize (arg1 As String)

  IsInitialized As Boolean

  Left As Double

  MouseCursor As javafx.scene.Cursor

  PrefHeight As Double

  PrefWidth As Double

  RemoveNodeFromParent

  RequestFocus

  ShowLabels As Boolean

  Snapshot As ImageWrapper

  Style As String

  StyleClasses As List [read only]

  Tag As Object

  TimeFormat As String

  TimeZone As Int [write only]

  TooltipText As String

  Top As Double

  Version As Double [read only]

  Visible As Boolean

  Width As Double [read only]

Members description:

ContextMenu As ContextMenuWrapper
DateTime As Long
Gets or sets the date and time of the TimeTextField as value in ticks.
Enabled As Boolean
Height As Double [read only]
Id As String
Initialize (arg1 As String)
IsInitialized As Boolean
Left As Double
MouseCursor As javafx.scene.Cursor
PrefHeight As Double
PrefWidth As Double
RemoveNodeFromParent
RequestFocus
ShowLabels As Boolean
Gets or sets the ShowLabels property of the TimeTextField.
Snapshot As ImageWrapper
Style As String
StyleClasses As List [read only]
Tag As Object
TimeFormat As String
Gets or sets the format used to parse time strings.
See this page for the supported patterns:
formats:.
The default pattern is HH:mm:ss (23:45:12 for example).
TimeZone As Int [write only]
Sets the time zone offset of the TimeTextField.
TooltipText As String
Top As Double
Version As Double [read only]
Returns the version number of the library.
Visible As Boolean
Width As Double [read only]

JFXtrasXYControl

This XYControl control allows the user to graphically specify a set of X and Y co-ordinates.

The SceneBuilder name for this control is 'XYControl'

Events:

None

Members:


  ContextMenu As ContextMenuWrapper

  Enabled As Boolean

  Height As Double [read only]

  Id As String

  Initialize (arg1 As String)

  IsInitialized As Boolean

  Left As Double

  MouseCursor As javafx.scene.Cursor

  Position() As Double

  PrefHeight As Double

  PrefWidth As Double

  RemoveNodeFromParent

  RequestFocus

  Snapshot As ImageWrapper

  Style As String

  StyleClasses As List [read only]

  Tag As Object

  TooltipText As String

  Top As Double

  Version As Double [read only]

  Visible As Boolean

  Width As Double [read only]

  X As Double

  XAxisLabel As String

  XAxisLabelVisible As Boolean

  Y As Double

  YAxisLabel As String

  YAxisLabelVisible As Boolean

Members description:

ContextMenu As ContextMenuWrapper
Enabled As Boolean
Height As Double [read only]
Id As String
Initialize (arg1 As String)
IsInitialized As Boolean
Left As Double
MouseCursor As javafx.scene.Cursor
Position() As Double
Gets or sets the X and Y value of XYControl using a Double(2) array.
Index 0 is the X value and index 1 is the Y value.
PrefHeight As Double
PrefWidth As Double
RemoveNodeFromParent
RequestFocus
Snapshot As ImageWrapper
Style As String
StyleClasses As List [read only]
Tag As Object
TooltipText As String
Top As Double
Version As Double [read only]
Returns the version number of the library.
Visible As Boolean
Width As Double [read only]
X As Double
Gets or sets the X value of the XYControl
XAxisLabel As String
Gets or sets the value of the X axis label
XAxisLabelVisible As Boolean
Gets or sets the visibility of the X axis label
Y As Double
Gets or sets the Y value of the XYControl
YAxisLabel As String
Gets or sets the value of the Y axis label
YAxisLabelVisible As Boolean
Gets or sets the visibility of the Y axis label
Top