Class TableRowSkinBase<T, C extends IndexedCell, R extends IndexedCell>
java.lang.Object
javafx.scene.control.SkinBase<C>
javafx.scene.control.skin.LabeledSkinBase<C>
javafx.scene.control.skin.CellSkinBase<C>
javafx.scene.control.skin.TableRowSkinBase<T,C,R>
- Type Parameters:
T- The type of the cell (i.e. the generic type of theIndexedCellsubclass).C- The cell type (e.g. TableRow or TreeTableRow)R- The type of cell that is contained within each row (e.g.TableCellorTreeTableCell).
- All Implemented Interfaces:
Skin<C>
- Direct Known Subclasses:
TableRowSkin, TreeTableRowSkin
public abstract class TableRowSkinBase<T, C extends IndexedCell, R extends IndexedCell>
extends CellSkinBase<C>
TableRowSkinBase is the base skin class used by controls such as
TableRow and TreeTableRow
(the concrete classes are TableRowSkin and TreeTableRowSkin,
respectively).- Since:
- 9
- See Also:
-
Property Summary
PropertiesTypePropertyDescriptionprotected ObjectProperty<Node> Returns the graphic to draw on the inside of the disclosure node.Properties declared in class CellSkinBase
cellSize -
Constructor Summary
ConstructorsConstructorDescriptionTableRowSkinBase(C control) Creates a new instance of TableRowSkinBase, although note that this instance does not handle any behavior / input mappings - this needs to be handled appropriately by subclasses. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract RcreateCell(TableColumnBase<T, ?> tc) Creates a new cell instance that is suitable for representing the given table column instance.protected abstract TableColumnBase<T, ?> getTableColumn(R cell) Returns theTableColumnBaseinstance for the given cell instance.protected abstract ObservableList<? extends TableColumnBase> Returns an unmodifiable list containing the currently visible leaf columns.protected ObjectProperty<Node> Returns the graphic to draw on the inside of the disclosure node.protected abstract voidupdateCell(R cell, C row) A method to allow the given cell to be told that it is a member of the given row.Methods declared in class CellSkinBase
cellSizeProperty, getCellSize, getClassCssMetaDataModifier and TypeMethodDescriptionfinal ReadOnlyDoublePropertyThe default cell size.final doubleGets the value of thecellSizeproperty.static List<CssMetaData<? extends Styleable, ?>> Returns the CssMetaData associated with this class, which may include the CssMetaData of its superclasses.Methods declared in class LabeledSkinBase
computeBaselineOffset, computeMinWidth, layoutChildren, layoutLabelInArea, layoutLabelInArea, updateChildrenModifier and TypeMethodDescriptiondoublecomputeBaselineOffset(double topInset, double rightInset, double bottomInset, double leftInset) Calculates the baseline offset based on the first managed child.protected doublecomputeMinWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) Compute and return the minimum width of this Labeled.protected voidlayoutChildren(double x, double y, double w, double h) The Layout algorithm works like this: - Get the labeled w/h, graphic w/h, text w/h - Compute content w/h based on graphicVPos, graphicHPos, graphicTextGap, and graphic w/h and text w/h - (Note that the text content has been pre-truncated where necessary) - compute content x/y based on content w/h and labeled w/h and the labeled's hpos and vpos - position the graphic and textprotected voidlayoutLabelInArea(double x, double y, double w, double h) Performs the actual layout of the label content within the area given.protected voidlayoutLabelInArea(double x, double y, double w, double h, Pos alignment) Performs the actual layout of the label content within the area given.protected voidUpdates the children managed by LabeledSkinBase, which can be the Labeled graphic and/or a Text node.Methods declared in class SkinBase
computeMaxHeight, computeMaxWidth, computeMinHeight, computePrefHeight, computePrefWidth, consumeMouseEvents, dispose, executeAccessibleAction, getChildren, getCssMetaData, getNode, getSkinnable, layoutInArea, layoutInArea, layoutInArea, positionInArea, positionInArea, pseudoClassStateChanged, queryAccessibleAttribute, registerChangeListener, registerInvalidationListener, registerListChangeListener, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, unregisterChangeListeners, unregisterInvalidationListeners, unregisterListChangeListenersModifier and TypeMethodDescriptionprotected doublecomputeMaxHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) Computes the maximum allowable height of the Skin, based on the provided width.protected doublecomputeMaxWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) Computes the maximum allowable width of the Skin, based on the provided height.protected doublecomputeMinHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) Computes the minimum allowable height of the Skin, based on the provided width.protected doublecomputePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) Calculates the preferred height of thisSkinBase.protected doublecomputePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) Calculates the preferred width of thisSkinBase.protected final voidconsumeMouseEvents(boolean value) Determines whether all mouse events should be automatically consumed.voiddispose()Called when a previously installed skin is about to be removed from its associated control.protected voidexecuteAccessibleAction(AccessibleAction action, Object... parameters) This method is called by the assistive technology to request the action indicated by the argument should be executed.final ObservableList<Node> Returns the children of the skin.List<CssMetaData<? extends Styleable, ?>> This method should delegate toNode.getClassCssMetaData()so that a Node's CssMetaData can be accessed without the need for reflection.final NodegetNode()Gets the Node which represents this Skin.final CGets the Skinnable to which this Skin is assigned.protected voidlayoutInArea(Node child, double areaX, double areaY, double areaWidth, double areaHeight, double areaBaselineOffset, HPos halignment, VPos valignment) Utility method which lays out the child within an area of this skin defined byareaX,areaY,areaWidthxareaHeight, with a baseline offset relative to that area.protected voidlayoutInArea(Node child, double areaX, double areaY, double areaWidth, double areaHeight, double areaBaselineOffset, Insets margin, boolean fillWidth, boolean fillHeight, HPos halignment, VPos valignment) Utility method which lays out the child within an area of this skin defined byareaX,areaY,areaWidthxareaHeight, with a baseline offset relative to that area.protected voidlayoutInArea(Node child, double areaX, double areaY, double areaWidth, double areaHeight, double areaBaselineOffset, Insets margin, HPos halignment, VPos valignment) Utility method which lays out the child within an area of this skin defined byareaX,areaY,areaWidthxareaHeight, with a baseline offset relative to that area.protected voidpositionInArea(Node child, double areaX, double areaY, double areaWidth, double areaHeight, double areaBaselineOffset, HPos halignment, VPos valignment) Utility method which positions the child within an area of this skin defined byareaX,areaY,areaWidthxareaHeight, with a baseline offset relative to that area.protected voidpositionInArea(Node child, double areaX, double areaY, double areaWidth, double areaHeight, double areaBaselineOffset, Insets margin, HPos halignment, VPos valignment) Utility method which positions the child within an area of this skin defined byareaX,areaY,areaWidthxareaHeight, with a baseline offset relative to that area.final voidpseudoClassStateChanged(PseudoClass pseudoClass, boolean active) Used to specify that a pseudo-class of this Node has changed.protected ObjectqueryAccessibleAttribute(AccessibleAttribute attribute, Object... parameters) This method is called by the assistive technology to request the value for an attribute.protected final voidregisterChangeListener(ObservableValue<?> observable, Consumer<ObservableValue<?>> operation) Registers an operation to perform when the givenobservablesends a change event.protected final voidregisterInvalidationListener(Observable observable, Consumer<Observable> operation) Registers an operation to perform when the givenobservablesends an invalidation event.protected final voidregisterListChangeListener(ObservableList<?> observableList, Consumer<ListChangeListener.Change<?>> operation) Registers an operation to perform when the givenobservableListsends a list change event.protected doubleUtility method to get the bottom inset which includes padding and border inset.protected doubleUtility method to get the left inset which includes padding and border inset.protected doubleUtility method to get the right inset which includes padding and border inset.protected doubleUtility method to get the top inset which includes padding and border inset.protected doublesnapPosition(double value) Deprecated, for removal: This API element is subject to removal in a future version.protected doublesnapPositionX(double value) Convenience method for accessing thesnapPositionX()method on the skinnable.protected doublesnapPositionY(double value) Convenience method for accessing thesnapPositionY()method on the skinnable.protected doublesnapSize(double value) Deprecated, for removal: This API element is subject to removal in a future version.replaced bysnapSizeX()andsnapSizeY()protected doublesnapSizeX(double value) Convenience method for accessing thesnapSizeX()method on the skinnable.protected doublesnapSizeY(double value) Convenience method for accessing thesnapSizeY()method on the skinnable.protected doublesnapSpace(double value) Deprecated, for removal: This API element is subject to removal in a future version.replaced bysnapSpaceX()andsnapSpaceY()protected doublesnapSpaceX(double value) Convenience method for accessing thesnapSpaceX()method on the skinnable.protected doublesnapSpaceY(double value) Convenience method for accessing thesnapSpaceY()method on the skinnable.protected final Consumer<ObservableValue<?>> unregisterChangeListeners(ObservableValue<?> observable) Unregisters all operations that have been registered usingSkinBase.registerChangeListener(ObservableValue, Consumer)for the givenobservable.protected final Consumer<Observable> unregisterInvalidationListeners(Observable observable) Unregisters all operations that have been registered usingSkinBase.registerInvalidationListener(Observable, Consumer)for the givenobservable.protected final Consumer<ListChangeListener.Change<?>> unregisterListChangeListeners(ObservableList<?> observableList) Unregisters all operations that have been registered usingSkinBase.registerListChangeListener(ObservableList, Consumer)for the givenobservableList.
-
Property Details
-
graphic
Returns the graphic to draw on the inside of the disclosure node. Null is acceptable when no graphic should be shown. Commonly this is the graphic associated with a TreeItem (i.e. treeItem.getGraphic()), rather than a graphic associated with a cell.- See Also:
-
-
Constructor Details
-
TableRowSkinBase
Creates a new instance of TableRowSkinBase, although note that this instance does not handle any behavior / input mappings - this needs to be handled appropriately by subclasses.- Parameters:
control- The control that this skin should be installed onto.
-
-
Method Details
-
createCell
Creates a new cell instance that is suitable for representing the given table column instance.- Parameters:
tc- the table column- Returns:
- the created cell
-
updateCell
A method to allow the given cell to be told that it is a member of the given row. How this is implemented is dependent on the actual cell implementation.- Parameters:
cell- The cell for which we want to inform it of its owner row.row- The row which will be set on the given cell.
-
getTableColumn
Returns theTableColumnBaseinstance for the given cell instance.- Parameters:
cell- The cell for which a TableColumn is desired.- Returns:
- the table column
-
getVisibleLeafColumns
Returns an unmodifiable list containing the currently visible leaf columns.- Returns:
- the list of visible leaf columns
-
graphicProperty
Returns the graphic to draw on the inside of the disclosure node. Null is acceptable when no graphic should be shown. Commonly this is the graphic associated with a TreeItem (i.e. treeItem.getGraphic()), rather than a graphic associated with a cell.- Returns:
- the graphic to draw on the inside of the disclosure node
-
snapPositionX()andsnapPositionY()