public abstract class MenuButtonSkinBase<C extends MenuButton,B extends MenuButtonBehaviorBase<C>> extends BehaviorSkinBase<C,B>
Modifier and Type | Class and Description |
---|---|
private class |
MenuButtonSkinBase.MenuLabeledImpl |
Modifier and Type | Field and Description |
---|---|
protected StackPane |
arrow |
protected StackPane |
arrowButton |
protected boolean |
behaveLikeButton
If true, the control should behave like a button for mouse button events.
|
private ListChangeListener<MenuItem> |
itemsChangedListener |
protected LabeledImpl |
label
*
UI Subcomponents *
*
|
protected ContextMenu |
popup |
IS_TOUCH_SUPPORTED
Constructor and Description |
---|
MenuButtonSkinBase(C control,
B behavior)
*
Constructors *
*
|
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 |
computeMaxWidth(double height,
double topInset,
double rightInset,
double bottomInset,
double leftInset)
Computes the maximum allowable width of the Skin, based on the provided
height.
|
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 |
computeMinWidth(double height,
double topInset,
double rightInset,
double bottomInset,
double leftInset)
*
Layout *
*
|
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 . |
void |
dispose()
Called by a Skinnable when the Skin is replaced on the Skinnable.
|
protected void |
handleControlPropertyChanged(java.lang.String p)
Handles changes to properties of the MenuButton.
|
private void |
hide() |
protected void |
layoutChildren(double x,
double y,
double w,
double h)
Called during the layout pass of the scenegraph.
|
private void |
show()
*
Control change handlers *
*
|
getBehavior, registerChangeListener, unregisterChangeListener
computeBaselineOffset, consumeMouseEvents, executeAccessibleAction, getChildren, getClassCssMetaData, getCssMetaData, getNode, getSkinnable, layoutInArea, layoutInArea, layoutInArea, positionInArea, positionInArea, pseudoClassStateChanged, queryAccessibleAttribute, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapSize, snapSpace
protected final LabeledImpl label
protected final StackPane arrow
protected final StackPane arrowButton
protected ContextMenu popup
protected boolean behaveLikeButton
private ListChangeListener<MenuItem> itemsChangedListener
public void dispose()
Skin.getSkinnable()
and Skin.getNode()
should return null following a call to dispose. Calling dispose twice
has no effect.dispose
in interface Skin<C extends MenuButton>
dispose
in class BehaviorSkinBase<C extends MenuButton,B extends MenuButtonBehaviorBase<C>>
private void show()
private void hide()
protected void handleControlPropertyChanged(java.lang.String p)
handleControlPropertyChanged
in class BehaviorSkinBase<C extends MenuButton,B extends MenuButtonBehaviorBase<C>>
protected double computeMinWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)
computeMinWidth
in class SkinBase<C extends MenuButton>
height
- The height of the Skin, in case this value might dictate
the minimum width.topInset
- 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 SkinBase<C extends MenuButton>
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 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 SkinBase<C extends MenuButton>
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 SkinBase<C extends MenuButton>
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 computeMaxWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)
SkinBase
computeMaxWidth
in class SkinBase<C extends MenuButton>
height
- The height of the Skin, in case this value might dictate
the maximum width.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 SkinBase<C extends MenuButton>
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 void layoutChildren(double x, double y, double w, double h)
SkinBase
layoutChildren
in class SkinBase<C extends MenuButton>