public abstract class TableRowSkinBase<T,C extends IndexedCell,B extends CellBehaviorBase<C>,R extends IndexedCell> extends CellSkinBase<C,B>
Modifier and Type | Field and Description |
---|---|
protected java.util.List<R> |
cells |
protected java.util.WeakHashMap<TableColumnBase,java.lang.ref.Reference<R>> |
cellsMap
*
Private Fields *
*
|
private static int |
DEFAULT_FULL_REFRESH_COUNTER |
private static boolean |
DO_ANIMATIONS |
private static Duration |
FADE_DURATION |
private double |
fixedCellSize |
private boolean |
fixedCellSizeEnabled |
private int |
fullRefreshCounter |
private static boolean |
IS_STUB_TOOLKIT
*
Static Fields *
*
|
protected boolean |
isDirty |
(package private) static java.util.Map<Control,java.lang.Double> |
maxDisclosureWidthMap |
protected boolean |
updateCells |
private ListChangeListener<TableColumnBase> |
visibleLeafColumnsListener
*
Listeners *
*
|
private WeakListChangeListener<TableColumnBase> |
weakVisibleLeafColumnsListener |
DEFAULT_CELL_SIZE
bindings, ellipsisWidth, graphic, graphicPropertyChangedListener, invalidText, mnemonic_underscore, text, textWidth
IS_TOUCH_SUPPORTED
Constructor and Description |
---|
TableRowSkinBase(C control,
B behavior)
*
Constructors *
*
|
Modifier and Type | Method and Description |
---|---|
protected void |
checkState() |
protected double |
computeMaxHeight(double width,
double topInset,
double rightInset,
double bottomInset,
double leftInset)
Computes the maximum allowable height of the Skin, based on the provided
width.
|
protected double |
computeMinHeight(double width,
double topInset,
double rightInset,
double bottomInset,
double leftInset)
Computes the minimum allowable height of the Skin, based on the provided
width.
|
protected double |
computePrefHeight(double width,
double topInset,
double rightInset,
double bottomInset,
double leftInset)
Calculates the preferred height of this
SkinBase . |
protected double |
computePrefWidth(double height,
double topInset,
double rightInset,
double bottomInset,
double leftInset)
Calculates the preferred width of this
SkinBase . |
private R |
createCell(TableColumnBase col) |
private void |
fadeIn(Node node) |
private void |
fadeOut(Node node) |
protected abstract DoubleProperty |
fixedCellSizeProperty() |
protected abstract R |
getCell(TableColumnBase tc) |
protected Node |
getDisclosureNode() |
protected int |
getIndentationLevel(C control) |
protected double |
getIndentationPerLevel() |
protected abstract TableColumnBase<T,?> |
getTableColumnBase(R cell) |
protected TableColumnBase |
getTreeColumn()
Returns the table column that should show the disclosure nodes and / or
a graphic.
|
private VirtualFlow<C> |
getVirtualFlow() |
protected abstract Control |
getVirtualFlowOwner() |
protected TableColumnBase<T,?> |
getVisibleLeafColumn(int column) |
protected abstract ObservableList<? extends TableColumnBase> |
getVisibleLeafColumns() |
protected abstract ObjectProperty<Node> |
graphicProperty()
Returns the graphic to draw on the inside of the disclosure node.
|
protected void |
handleControlPropertyChanged(java.lang.String p)
*
Public Methods *
*
|
protected void |
init(C control) |
protected abstract boolean |
isColumnPartiallyOrFullyVisible(TableColumnBase tc) |
protected boolean |
isDisclosureNodeVisible()
Used to represent whether a disclosure node is visible for _this_
table row.
|
protected boolean |
isIndentationRequired()
Used to represent whether the current virtual flow owner is wanting
indentation to be used in this table row.
|
protected boolean |
isShowRoot() |
protected void |
layoutChildren(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 text
|
private void |
recreateCells() |
private void |
requestCellUpdate()
*
Private Implementation *
*
|
protected abstract void |
updateCell(R cell,
C row) |
protected void |
updateCells(boolean resetChildren) |
cellSizeProperty, getCellSize, getClassCssMetaData, getCssMetaData
bottomLabelPadding, computeBaselineOffset, computeMaxWidth, computeMinWidth, isIgnoreGraphic, isIgnoreText, layoutLabelInArea, layoutLabelInArea, leftLabelPadding, mnemonicTargetChanged, queryAccessibleAttribute, rightLabelPadding, topLabelPadding, updateChildren, updateDisplayedText
dispose, getBehavior, registerChangeListener, unregisterChangeListener
consumeMouseEvents, executeAccessibleAction, getChildren, getNode, getSkinnable, layoutInArea, layoutInArea, layoutInArea, positionInArea, positionInArea, pseudoClassStateChanged, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapSize, snapSpace
private static boolean IS_STUB_TOOLKIT
private static boolean DO_ANIMATIONS
private static final Duration FADE_DURATION
static final java.util.Map<Control,java.lang.Double> maxDisclosureWidthMap
private static final int DEFAULT_FULL_REFRESH_COUNTER
protected java.util.WeakHashMap<TableColumnBase,java.lang.ref.Reference<R extends IndexedCell>> cellsMap
protected final java.util.List<R extends IndexedCell> cells
private int fullRefreshCounter
protected boolean isDirty
protected boolean updateCells
private double fixedCellSize
private boolean fixedCellSizeEnabled
private ListChangeListener<TableColumnBase> visibleLeafColumnsListener
private WeakListChangeListener<TableColumnBase> weakVisibleLeafColumnsListener
protected void init(C control)
protected abstract ObjectProperty<Node> graphicProperty()
protected abstract Control getVirtualFlowOwner()
protected abstract ObservableList<? extends TableColumnBase> getVisibleLeafColumns()
protected abstract DoubleProperty fixedCellSizeProperty()
protected abstract boolean isColumnPartiallyOrFullyVisible(TableColumnBase tc)
protected abstract R getCell(TableColumnBase tc)
protected abstract TableColumnBase<T,?> getTableColumnBase(R cell)
protected void handleControlPropertyChanged(java.lang.String p)
handleControlPropertyChanged
in class LabeledSkinBase<C extends IndexedCell,B extends CellBehaviorBase<C>>
protected void layoutChildren(double x, double y, double w, double h)
LabeledSkinBase
layoutChildren
in class LabeledSkinBase<C extends IndexedCell,B extends CellBehaviorBase<C>>
protected int getIndentationLevel(C control)
protected double getIndentationPerLevel()
protected boolean isIndentationRequired()
protected TableColumnBase getTreeColumn()
protected Node getDisclosureNode()
protected boolean isDisclosureNodeVisible()
protected boolean isShowRoot()
protected TableColumnBase<T,?> getVisibleLeafColumn(int column)
protected void updateCells(boolean resetChildren)
private VirtualFlow<C> getVirtualFlow()
protected double computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)
SkinBase
SkinBase
. The default
implementation calculates this width as the width of the area occupied
by its managed children when they are positioned at their
current positions at their preferred widths.computePrefWidth
in class LabeledSkinBase<C extends IndexedCell,B extends CellBehaviorBase<C>>
height
- the height that should be used if preferred width depends on ittopInset
- the pixel snapped top insetrightInset
- the pixel snapped right insetbottomInset
- the pixel snapped bottom insetleftInset
- the pixel snapped left insetprotected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)
SkinBase
SkinBase
. The default
implementation calculates this height as the height of the area occupied
by its managed children when they are positioned at their current
positions at their preferred heights.computePrefHeight
in class LabeledSkinBase<C extends IndexedCell,B extends CellBehaviorBase<C>>
width
- the width that should be used if preferred height depends on ittopInset
- the pixel snapped top insetrightInset
- the pixel snapped right insetbottomInset
- the pixel snapped bottom insetleftInset
- the pixel snapped left insetprotected double computeMinHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)
SkinBase
computeMinHeight
in class LabeledSkinBase<C extends IndexedCell,B extends CellBehaviorBase<C>>
width
- The width of the Skin, in case this value might dictate
the minimum height.topInset
- the pixel snapped top insetrightInset
- the pixel snapped right insetbottomInset
- the pixel snapped bottom insetleftInset
- the pixel snapped left insetprotected double computeMaxHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)
SkinBase
computeMaxHeight
in class LabeledSkinBase<C extends IndexedCell,B extends CellBehaviorBase<C>>
width
- The width of the Skin, in case this value might dictate
the maximum height.topInset
- the pixel snapped top insetrightInset
- the pixel snapped right insetbottomInset
- the pixel snapped bottom insetleftInset
- the pixel snapped left insetprotected final void checkState()
private void requestCellUpdate()
private void recreateCells()
private R createCell(TableColumnBase col)
private void fadeOut(Node node)
private void fadeIn(Node node)