Tab
type (joe.win
)
The Tab
widget contains a Node
in a TabPane
.
Joe classes can extend the Tab
type.
- tab.content(node) → this
- tab.disable([flag]) → this
- tab.getProperty(keyword) → value
- tab.id(id) → this
- tab.isDisabled() → joe.Boolean
- tab.isSelected() → joe.Boolean
- tab.listenTo(keyword, listener) → this
- tab.properties() → joe.Set
- tab.setProperty(keyword, value) → this
- tab.styleClasses() → joe.List
- tab.styles(style, ...) → this
- tab.tabPane() → TabPane
- tab.text(text) → this
- tab.toString() → joe.String
Properties
All Node
widgets have the following properties.
Property | Type | Description |
---|---|---|
#content | Node | Content node |
#id | String | JavaFX ID |
#style | String | FXCSS style string |
#text | String | Tab text |
See Styling with CSS for more on using CSS.
Tab Initializer
Tab() → Tab
Returns a Tab
.
Methods
tab.content()
tab.content(node) → this
Sets the tab's #content
property to node.
tab.disable()
tab.disable([flag]) → this
Sets the tab's #disable
property to flag; if omitted,
flag defaults to true
. While true
, this tab and its
descendants in the scene graph will be disabled.
tab.getProperty()
tab.getProperty(keyword) → value
Gets the value of the property with the given keyword.
tab.id()
tab.id(id) → this
Sets the tab's #id
property to the given id string.
tab.isDisabled()
tab.isDisabled() → joe.Boolean
Returns true
if the tab has been disabled, and false
otherwise.
tab.isSelected()
tab.isSelected() → joe.Boolean
Returns true
if the tab is selected, and false
otherwise.
tab.listenTo()
tab.listenTo(keyword, listener) → this
Adds a listener to the property with the given keyword. The listener should be a callable taking the three arguments:
- The property keyword
- The old value of the property
- The new value of the property
The listener will be called when the property's value changes.
tab.properties()
tab.properties() → joe.Set
Returns a readonly Set
of the object's property keywords.
tab.setProperty()
tab.setProperty(keyword, value) → this
Sets the value of the property with the given keyword. The value must be assignable to the property's value type.
tab.styleClasses()
tab.styleClasses() → joe.List
Gets the list of the tab's FXCSS style class names. Values must be valid CSS style class names.
See Styling with CSS for more on using CSS.
tab.styles()
tab.styles(style, ...) → this
Sets the tab's FXCSS #style
property. The caller can pass
multiple style strings, which will be joined with semicolons.
See Styling with CSS for more on using CSS.
tab.tabPane()
tab.tabPane() → TabPane
Returns the TabPane
to which this tab belongs, or null if
none.
tab.text()
tab.text(text) → this
Sets the label's text.
tab.toString()
tab.toString() → joe.String
Returns the value's string representation.