java.lang.Object
swingtree.UIForAnything<I,M,JComponent>
swingtree.UIForAnySwing<I,M>
swingtree.UIForAnyButton<I,M>
swingtree.UIForAnyMenuItem<I,M>
- Type Parameters:
I- The type of the builder itself. This is used to allow for method chaining.M- The type of theJMenuItembeing built.
- Direct Known Subclasses:
UIForCheckBoxMenuItem,UIForMenu,UIForMenuItem,UIForRadioButtonMenuItem
A builder for
JMenuItems.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionwithKeyStroke(KeyStroke keyStroke) Sets the key combination which invokes the wrappedJMenuItem's action listeners without navigating the menu hierarchy.withKeyStroke(sprouts.Val<KeyStroke> keyStroke) Sets the key combination property which invokes the wrappedJMenuItem's action listeners without navigating the menu hierarchy.Methods inherited from class swingtree.UIForAnyButton
_onChange, _onClick, _onModelChange, isBorderPaintedIf, isBorderPaintedIf, isPressedIf, isSelectedIf, isSelectedIf, isSelectedIf, isSelectedIf, isSelectedIfNot, isSelectedIfNot, isSelectedIfNot, makePlain, onChange, onClick, withButtonGroup, withFont, withFont, withHorizontalAlignment, withHorizontalAlignment, withHorizontalTextAlignment, withHorizontalTextAlignment, withIcon, withIcon, withIcon, withIcon, withIcon, withIcon, withIcon, withIcon, withIconOnDisabled, withIconOnDisabled, withIconOnDisabled, withIconOnDisabled, withIconOnDisabled, withIconOnDisabled, withIconOnDisabled, withIconOnDisabled, withIconOnDisabledAndSelected, withIconOnDisabledAndSelected, withIconOnDisabledAndSelected, withIconOnDisabledAndSelected, withIconOnDisabledAndSelected, withIconOnDisabledAndSelected, withIconOnDisabledAndSelected, withIconOnDisabledAndSelected, withIconOnHover, withIconOnHover, withIconOnHover, withIconOnHover, withIconOnHover, withIconOnHover, withIconOnHover, withIconOnHover, withIconOnHoverAndSelected, withIconOnHoverAndSelected, withIconOnHoverAndSelected, withIconOnHoverAndSelected, withIconOnHoverAndSelected, withIconOnHoverAndSelected, withIconOnHoverAndSelected, withIconOnHoverAndSelected, withIconOnPress, withIconOnPress, withIconOnPress, withIconOnPress, withIconOnPress, withIconOnPress, withIconOnPress, withIconOnPress, withIconOnSelected, withIconOnSelected, withIconOnSelected, withIconOnSelected, withIconOnSelected, withIconOnSelected, withIconOnSelected, withIconOnSelected, withMargin, withMargin, withText, withText, withVerticalAlignment, withVerticalAlignment, withVerticalTextAlignment, withVerticalTextAlignmentMethods inherited from class swingtree.UIForAnySwing
_addComponentTo, _addViewableProps, _addViewableProps, _addViewableProps, _isUndefinedColor, _isUndefinedFont, _setBackground, _setEnabled, _setMinHeight, _setMinWidth, _setPrefWidth, _tryCalculatingDiffBetween, add, add, add, add, add, add, add, add, add, add, addAll, addAll, addAll, addAll, addAll, addAll, addAll, addAll, addAll, addAll, addAll, addAll, doUpdates, group, group, id, id, isEnabledIf, isEnabledIf, isEnabledIf, isEnabledIfNot, isEnabledIfNot, isEnabledIfNot, isFocusableIf, isFocusableIf, isFocusableIf, isFocusableIfNot, isFocusableIfNot, isFocusableIfNot, isValidIf, isVisibleIf, isVisibleIf, isVisibleIf, isVisibleIfNot, isVisibleIfNot, isVisibleIfNot, makeFocused, makeNonOpaque, makeOpaque, on, on, onCharTyped, onFocusGain, onFocusLoss, onHidden, onKeyPress, onKeyRelease, onKeyTyped, onMouseClick, onMouseDrag, onMouseEnter, onMouseEnter, onMouseEnterGreedy, onMouseExit, onMouseExit, onMouseExitGreedy, onMouseMove, onMousePress, onMouseRelease, onMouseWheelDown, onMouseWheelMove, onMouseWheelUp, onMoved, onPressed, onRelease, onResize, onShown, onTyped, onTyped, onView, withBackground, withBackground, withBackgroundColor, withBackgroundIf, withBackgroundIf, withBackgroundIf, withBackgroundIf, withBorder, withBorder, withBorderTitled, withBorderTitled, withBoxLayout, withCompoundBorder, withCompoundBorderTitled, withCursor, withCursor, withCursorIf, withCursorIf, withDragAway, withDropSite, withEmptyBorder, withEmptyBorder, withEmptyBorder, withEmptyBorder, withEmptyBorderTitled, withEmptyBorderTitled, withEmptyBorderTitled, withEmptyBorderTitled, withEmptyBorderTitled, withEmptyBorderTitled, withEmptyBorderTitled, withEmptyBorderTitled, withFlowLayout, withFlowLayout, withFlowLayout, withFontSize, withFontSize, withForeground, withForeground, withForegroundColor, withForegroundIf, withForegroundIf, withForegroundIf, withForegroundIf, withGridBagLayout, withGridLayout, withGridLayout, withGridLayout, withHeight, withHeight, withHeightExactly, withHeightExactly, withLayout, withLayout, withLayout, withLayout, withLayout, withLayout, withLayout, withLayout, withLayout, withLayout, withLayout, withLayout, withLineBorder, withLineBorder, withLineBorder, withLineBorderTitled, withLineBorderTitled, withLineBorderTitled, withLineBorderTitled, withMatteBorder, withMatteBorder, withMatteBorder, withMatteBorderTitled, withMatteBorderTitled, withMatteBorderTitled, withMaxHeight, withMaxHeight, withMaxSize, withMaxSize, withMaxSize, withMaxSize, withMaxSize, withMaxWidth, withMaxWidth, withMinHeight, withMinHeight, withMinSize, withMinSize, withMinSize, withMinSize, withMinSize, withMinWidth, withMinWidth, withPrefHeight, withPrefHeight, withPrefSize, withPrefSize, withPrefSize, withPrefSize, withPrefSize, withPrefWidth, withPrefWidth, withProperty, withRepaintOn, withRepaintOn, withRepaintOn, withRepaintOn, withRepaintOn, withRepaintOn, withRepaintOn, withRepaintOn, withRoundedLineBorder, withRoundedLineBorder, withRoundedLineBorder, withRoundedLineBorder, withRoundedLineBorderTitled, withRoundedLineBorderTitled, withRoundedLineBorderTitled, withRoundedLineBorderTitled, withRoundedLineBorderTitled, withRoundedLineBorderTitled, withRoundedLineBorderTitled, withSize, withSize, withSize, withSize, withSizeExactly, withSizeExactly, withSizeExactly, withSizeExactly, withStyle, withTooltip, withTooltip, withTransitionalStyle, withTransitoryStyle, withWidth, withWidth, withWidthExactly, withWidthExactlyMethods inherited from class swingtree.UIForAnything
_addBuildersTo, _addBuilderTo, _addComponentsTo, _disposeState, _newBuilderWithState, _onShow, _onShow, _onShowDelegated, _runInApp, _runInApp, _runInUI, _state, _this, _with, _withOnShow, _withOnShow, add, add, add, add, apply, applyIf, applyIfPresent, component, equals, get, getComponent, getType, hashCode, peek, toString
-
Constructor Details
-
UIForAnyMenuItem
public UIForAnyMenuItem()
-
-
Method Details
-
withKeyStroke
Sets the key combination which invokes the wrappedJMenuItem's action listeners without navigating the menu hierarchy. It is the UI's responsibility to install the correct action. Note that when the keyboard accelerator is typed, it will work whether or whether not the menu is currently displayed.- Parameters:
keyStroke- theKeyStrokewhich will serve as an accelerator- Returns:
- This very builder to allow for method chaining.
-
withKeyStroke
Sets the key combination property which invokes the wrappedJMenuItem's action listeners without navigating the menu hierarchy. It is the UI's responsibility to install the correct action. Note that when the keyboard accelerator is typed, it will work whether or whether not the menu is currently displayed.- Parameters:
keyStroke- the dynamically setKeyStrokeproperty which will serve as an accelerator- Returns:
- This very builder to allow for method chaining.
-