Class ContextMenuContent.MenuItemContainer

java.lang.Object
javafx.scene.Node
javafx.scene.Parent
javafx.scene.layout.Region
com.sun.javafx.scene.control.ContextMenuContent.MenuItemContainer
All Implemented Interfaces:
LayoutMeasurable, LayoutMeasurableMixin, HasBackgroundProperty, HasBlendModeProperty, HasBorderProperty, HasClipProperty, HasEffectProperty, HasHeightProperty, HasLayoutXProperty, HasLayoutYProperty, HasManagedProperty, HasMaxHeightProperty, HasMaxWidthProperty, HasMinHeightProperty, HasMinWidthProperty, HasMouseTransparentProperty, HasOnMouseClickedProperty, HasOpacityProperty, HasPaddingProperty, HasParentProperty, HasPrefHeightProperty, HasPrefWidthProperty, HasSnapToPixelProperty, HasVisibleProperty, HasWidthProperty, Styleable, EventTarget, INode, PreferenceResizableNode
Enclosing class:
ContextMenuContent

public class ContextMenuContent.MenuItemContainer extends Region
  • Constructor Details

    • MenuItemContainer

      public MenuItemContainer(MenuItem item)
  • Method Details

    • getLabel

      protected Label getLabel()
    • getItem

      public MenuItem getItem()
    • dispose

      public void dispose()
    • layoutChildren

      protected void layoutChildren()
      Description copied from class: Parent
      Invoked during the layout pass to layout the children in this Parent. By default it will only set the size of managed, resizable content to their preferred sizes and does not do any node positioning.

      Subclasses should override this function to layout content as needed.

      Overrides:
      layoutChildren in class Parent
    • computePrefHeight

      protected double computePrefHeight(double width)
      Description copied from class: Region
      Computes the preferred height of this region for the given width; Region subclasses should override this method to return an appropriate value based on their content and layout strategy. If the subclass doesn't have a HORIZONTAL content bias, then the width parameter can be ignored.
      Overrides:
      computePrefHeight in class Region
      Parameters:
      width - the width that should be used if preferred height depends on it
      Returns:
      the computed preferred height for this region
    • computePrefWidth

      protected double computePrefWidth(double height)
      Description copied from class: Region
      Computes the preferred width of this region for the given height. Region subclasses should override this method to return an appropriate value based on their content and layout strategy. If the subclass doesn't have a VERTICAL content bias, then the height parameter can be ignored.
      Overrides:
      computePrefWidth in class Region
      Parameters:
      height - the height that should be used if preferred width depends on it
      Returns:
      the computed preferred width for this region