Top Description Inners Fields Constructors Methods
javafx.scene.control.skin

public Class MenuButtonSkinBase<C extends MenuButton>

extends SkinBase<C extends MenuButton>
Class Inheritance
Known Direct Subclasses
javafx.scene.control.skin.SplitMenuButtonSkin, javafx.scene.control.skin.MenuButtonSkin
Type Parameters
<C>
the type of the menu button control
Imports
java.util.ArrayList, .List, com.sun.javafx.scene.NodeHelper, com.sun.javafx.scene.control.ContextMenuContent, .ControlAcceleratorSupport, .LabeledImpl, .ListenerHelper, com.sun.javafx.scene.control.behavior.MenuButtonBehaviorBase, com.sun.javafx.scene.control.skin.Utils, javafx.application.Platform, javafx.event.ActionEvent, javafx.scene.Node, .Scene, javafx.scene.control.ContextMenu, .MenuButton, .Skin, .SkinBase, javafx.scene.input.Mnemonic, .MouseEvent, javafx.scene.layout.Region, .StackPane

Base class for MenuButtonSkin and SplitMenuButtonSkin. It consists of the label, the arrowButton with its arrow shape, and the popup.
Since
9

Nested and Inner Type Summary

Modifier and TypeClass and Description

Field Summary

Modifier and TypeField and Description
pack-priv final StackPane
pack-priv final StackPane
pack-priv boolean
behaveLikeButton

If true, the control should behave like a button for mouse button events.

pack-priv final LabeledImpl
pack-priv ContextMenu
pack-priv boolean

Constructor Summary

AccessConstructor and Description

Method Summary

Modifier and TypeMethod and Description
protected double
computeMaxHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computeMaxHeight.

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)

Overrides javafx.scene.control.SkinBase.computeMaxWidth.

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)

Overrides javafx.scene.control.SkinBase.computeMinHeight.

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)

Overrides javafx.scene.control.SkinBase.computeMinWidth.

Computes the minimum allowable width of the Skin, based on the provided height.

protected double
computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computePrefHeight.

Calculates the preferred height of this SkinBase.

protected double
computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computePrefWidth.

Calculates the preferred width of this SkinBase.

public void
dispose()

Overrides javafx.scene.control.SkinBase.dispose.

Implements javafx.scene.control.Skin.dispose.

Called when a previously installed skin is about to be removed from its associated control.

pack-priv MenuButtonBehaviorBase<C>
private void
hide()

protected void
layoutChildren(final double x, final double y, final double w, final double h)

Overrides javafx.scene.control.SkinBase.layoutChildren.

Called during the layout pass of the scenegraph.

pack-priv void
private void
pack-priv void
private void
show()

Inherited from javafx.scene.control.SkinBase:
computeBaselineOffsetconsumeMouseEventsexecuteAccessibleActiongetChildrengetClassCssMetaDatagetCssMetaDatagetNodegetSkinnablelayoutInArealayoutInArealayoutInAreapositionInAreapositionInAreapseudoClassStateChangedqueryAccessibleAttributeregisterChangeListenerregisterInvalidationListenerregisterListChangeListenersnappedBottomInsetsnappedLeftInsetsnappedRightInsetsnappedTopInsetsnapPositionsnapPositionXsnapPositionYsnapSizesnapSizeXsnapSizeYsnapSpacesnapSpaceXsnapSpaceYunregisterChangeListenersunregisterInvalidationListenersunregisterListChangeListeners

Field Detail

arrowback to summary
pack-priv final StackPane arrow
arrowButtonback to summary
pack-priv final StackPane arrowButton
behaveLikeButtonback to summary
pack-priv boolean behaveLikeButton

If true, the control should behave like a button for mouse button events.

labelback to summary
pack-priv final LabeledImpl label
requestFocusOnFirstMenuItemback to summary
pack-priv boolean requestFocusOnFirstMenuItem

Constructor Detail

Method Detail

computeMaxHeightback to summary
protected double computeMaxHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computeMaxHeight.

Doc from javafx.scene.control.SkinBase.computeMaxHeight.

Computes the maximum allowable height of the Skin, based on the provided width.

Annotations
@Override
computeMaxWidthback to summary
protected double computeMaxWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computeMaxWidth.

Doc from javafx.scene.control.SkinBase.computeMaxWidth.

Computes the maximum allowable width of the Skin, based on the provided height.

Annotations
@Override
computeMinHeightback to summary
protected double computeMinHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computeMinHeight.

Doc from javafx.scene.control.SkinBase.computeMinHeight.

Computes the minimum allowable height of the Skin, based on the provided width.

Annotations
@Override
computeMinWidthback to summary
protected double computeMinWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computeMinWidth.

Doc from javafx.scene.control.SkinBase.computeMinWidth.

Computes the minimum allowable width of the Skin, based on the provided height.

Annotations
@Override
computePrefHeightback to summary
protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computePrefHeight.

Doc from javafx.scene.control.SkinBase.computePrefHeight.

Calculates the preferred height of this 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.

Annotations
@Override
computePrefWidthback to summary
protected double computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computePrefWidth.

Doc from javafx.scene.control.SkinBase.computePrefWidth.

Calculates the preferred width of this 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.

Annotations
@Override
disposeback to summary
public void dispose()

Overrides javafx.scene.control.SkinBase.dispose.

Implements javafx.scene.control.Skin.dispose.

Doc from javafx.scene.control.SkinBase.dispose.

Called when a previously installed skin is about to be removed from its associated control. This allows the skin to do clean up, like removing listeners and bindings, and undo any changes to the control's properties. After this method completes, getSkinnable() and getNode() should return null.

Calling dispose() more than once has no effect.

Annotations
@Override
getBehaviorback to summary
pack-priv MenuButtonBehaviorBase<C> getBehavior()
hideback to summary
private void hide()
layoutChildrenback to summary
protected void layoutChildren(final double x, final double y, final double w, final double h)

Overrides javafx.scene.control.SkinBase.layoutChildren.

Doc from javafx.scene.control.SkinBase.layoutChildren.

Called during the layout pass of the scenegraph.

Annotations
@Override
putFocusOnFirstMenuItemback to summary
pack-priv void putFocusOnFirstMenuItem()
removeMnemonicsFromSceneback to summary
private void removeMnemonicsFromScene(List<Mnemonic> mnemonics, Scene scene)
requestFocusOnFirstMenuItemback to summary
pack-priv void requestFocusOnFirstMenuItem()
showback to summary
private void show()