Top Description Fields Constructors Methods
com.dlsc.pickerfx

public Class SegmentCell<T>

extends Label
Class Inheritance
Type Parameters
<T>
the type of the value / the item shown inside the cell
Imports
javafx.beans.property.BooleanProperty, .BooleanPropertyBase, .IntegerProperty, .SimpleIntegerProperty, javafx.css.PseudoClass, javafx.geometry.Pos, javafx.scene.control.Label

A cell used for displaying an item inside a Segement.
See Also
Segement

Field Summary

Modifier and TypeField and Description
private final IntegerProperty
index

The index of the model item shown by the cell.

private final IntegerProperty
position

The position is the "offset" of the cell from the middle.

private static final PseudoClass
private BooleanProperty

Constructor Summary

AccessConstructor and Description
public
SegmentCell(Pos alignment)

public

Method Summary

Modifier and TypeMethod and Description
public int
public int
public IntegerProperty
public final boolean
public IntegerProperty
public final BooleanProperty
public void
setIndex(int index)

public void
setPosition(int position)

public final void
setSelected(boolean value)

public void
update(T item)

Inherited from javafx.scene.control.Label:
createDefaultSkingetInitialFocusTraversablegetLabelForlabelForPropertysetLabelFor

Field Detail

indexback to summary
private final IntegerProperty index

The index of the model item shown by the cell.

See Also
Segment#getItems()
positionback to summary
private final IntegerProperty position

The position is the "offset" of the cell from the middle. The selected cell has the index 0, the cells above it are -1, -2, -3, etc.... The cells below the selected cell have the position value 1, 2, 3, .... The position is basically the distance from the selected value / the middle.

PSEUDO_CLASS_SELECTEDback to summary
private static final PseudoClass PSEUDO_CLASS_SELECTED
selectedback to summary
private BooleanProperty selected

Constructor Detail

SegmentCellback to summary
public SegmentCell(Pos alignment)
SegmentCellback to summary
public SegmentCell()

Method Detail

getIndexback to summary
public int getIndex()
getPositionback to summary
public int getPosition()
indexPropertyback to summary
public IntegerProperty indexProperty()
isSelectedback to summary
public final boolean isSelected()
positionPropertyback to summary
public IntegerProperty positionProperty()
selectedPropertyback to summary
public final BooleanProperty selectedProperty()
setIndexback to summary
public void setIndex(int index)
setPositionback to summary
public void setPosition(int position)
setSelectedback to summary
public final void setSelected(boolean value)
updateback to summary
public void update(T item)