public class TreeCellSkin<T> extends CellSkinBase<TreeCell<T>,TreeCellBehavior<T>>
Modifier and Type | Class and Description |
---|---|
private static class |
TreeCellSkin.StyleableProperties |
Modifier and Type | Field and Description |
---|---|
private boolean |
disclosureNodeDirty |
private double |
fixedCellSize |
private boolean |
fixedCellSizeEnabled |
private DoubleProperty |
indent
The amount of space to multiply by the treeItem.level to get the left
margin for this tree cell.
|
private static java.util.Map<TreeView<?>,java.lang.Double> |
maxDisclosureWidthMap |
private TreeItem<?> |
treeItem |
private MultiplePropertyChangeListenerHandler |
treeItemListener |
DEFAULT_CELL_SIZE
bindings, ellipsisWidth, graphic, graphicPropertyChangedListener, invalidText, mnemonic_underscore, text, textWidth
IS_TOUCH_SUPPORTED
Constructor and Description |
---|
TreeCellSkin(TreeCell<T> control) |
Modifier and Type | Method and Description |
---|---|
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 . |
static java.util.List<CssMetaData<? extends Styleable,?>> |
getClassCssMetaData() |
java.util.List<CssMetaData<? extends Styleable,?>> |
getCssMetaData()
This method should delegate to
Node.getClassCssMetaData() so that
a Node's CssMetaData can be accessed without the need for reflection. |
double |
getIndent() |
protected void |
handleControlPropertyChanged(java.lang.String p)
*
Control State Changes *
*
|
DoubleProperty |
indentProperty() |
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
|
void |
setIndent(double value) |
protected void |
updateChildren()
Updates the children managed by LabeledSkinBase, which can be the Labeled
graphic and/or a Text node.
|
private void |
updateDisclosureNode() |
private void |
updateDisclosureNodeRotation(boolean animate) |
private void |
updateTreeItem() |
cellSizeProperty, getCellSize
bottomLabelPadding, computeBaselineOffset, computeMaxWidth, computeMinWidth, isIgnoreGraphic, isIgnoreText, layoutLabelInArea, layoutLabelInArea, leftLabelPadding, mnemonicTargetChanged, queryAccessibleAttribute, rightLabelPadding, topLabelPadding, 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 final java.util.Map<TreeView<?>,java.lang.Double> maxDisclosureWidthMap
private DoubleProperty indent
private boolean disclosureNodeDirty
private TreeItem<?> treeItem
private double fixedCellSize
private boolean fixedCellSizeEnabled
private MultiplePropertyChangeListenerHandler treeItemListener
public final void setIndent(double value)
public final double getIndent()
public final DoubleProperty indentProperty()
protected void handleControlPropertyChanged(java.lang.String p)
LabeledSkinBase
handleControlPropertyChanged
in class LabeledSkinBase<TreeCell<T>,TreeCellBehavior<T>>
private void updateDisclosureNodeRotation(boolean animate)
private void updateTreeItem()
private void updateDisclosureNode()
protected void updateChildren()
LabeledSkinBase
updateChildren
in class LabeledSkinBase<TreeCell<T>,TreeCellBehavior<T>>
protected void layoutChildren(double x, double y, double w, double h)
LabeledSkinBase
layoutChildren
in class LabeledSkinBase<TreeCell<T>,TreeCellBehavior<T>>
protected double computeMinHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)
SkinBase
computeMinHeight
in class LabeledSkinBase<TreeCell<T>,TreeCellBehavior<T>>
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 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<TreeCell<T>,TreeCellBehavior<T>>
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 computeMaxHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)
SkinBase
computeMaxHeight
in class LabeledSkinBase<TreeCell<T>,TreeCellBehavior<T>>
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 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<TreeCell<T>,TreeCellBehavior<T>>
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 insetpublic static java.util.List<CssMetaData<? extends Styleable,?>> getClassCssMetaData()
public java.util.List<CssMetaData<? extends Styleable,?>> getCssMetaData()
Node.getClassCssMetaData()
so that
a Node's CssMetaData can be accessed without the need for reflection.getCssMetaData
in class CellSkinBase<TreeCell<T>,TreeCellBehavior<T>>